Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036503 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | major | have not tried | 2017-07-17 01:40 | 2017-07-31 17:04 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | d2b3f0abb40c | ||||
Projection | none | ETA | none | Target Version | RR17Q3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | AugustoMauch | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036503: Store server version provider has connection leak if server version computation is done in separate thread | |||||||
Description | The code here [1] runs in a separate thread and checks if the symmetric ds table has been created [2]. This check opens a dal connection which is not closed. [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/b03057ff4b63/src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java#l411 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/b03057ff4b63/src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java#l419 [^] [3] Jul 17, 2017 1:37:15 AM org.apache.tomcat.jdbc.pool.ConnectionPool suspect WARNING: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@3d51df43][83875 ms.]:java.lang.Exception at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1096) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:799) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:648) at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:200) at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnectionFromDS(JdbcExternalConnectionPool.java:134) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnection(JdbcExternalConnectionPool.java:114) at org.openbravo.dal.core.SessionHandler.getNewConnection(SessionHandler.java:300) at org.openbravo.dal.core.SessionHandler.createSession(SessionHandler.java:235) at org.openbravo.dal.core.SessionHandler.begin(SessionHandler.java:561) at org.openbravo.dal.core.SessionHandler.getSession(SessionHandler.java:183) at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:193) at org.openbravo.service.db.DalConnectionProvider.getConnection(DalConnectionProvider.java:95) at org.openbravo.service.db.DalConnectionProvider.getPreparedStatement(DalConnectionProvider.java:158) at org.openbravo.retail.storeserver.synchronization.StoreServerVersionHandler.symmetricDsTriggersAreCreated(StoreServerVersionHandler.java:392) at org.openbravo.retail.storeserver.synchronization.StoreServerVersionHandler.isSymmetricDSReady(StoreServerVersionHandler.java:383) at org.openbravo.retail.storeserver.synchronization.StoreServerVersionHandler.access$1(StoreServerVersionHandler.java:382) at org.openbravo.retail.storeserver.synchronization.StoreServerVersionHandler$2.run(StoreServerVersionHandler.java:422) at java.lang.Thread.run(Thread.java:745) | |||||||
Steps To Reproduce | Install multi-server Set the following parameters in Openbravo.properties db.pool.logAbandoned=true db.pool.suspectTimeout=30 Somehow let the version computation code start the separate thread. This can be done by changing the code slightly | |||||||
Proposed Solution | Close the connection in the separate thread | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0098181) hgbot (developer) 2017-07-22 00:05 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: d2b3f0abb40cd17eb73a3afb5b1ffda1f9ae4e8b Author: Martin Taal <martin.taal <at> openbravo.com> Date: Sat Jul 22 00:04:57 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/d2b3f0abb40cd17eb73a3afb5b1ffda1f9ae4e8b [^] Fixes issue 36503: Store server version provider has connection leak if server version computation is done in separate thread Move the try/finally block so that it encapsulates more code --- M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java --- |
(0098282) AugustoMauch (manager) 2017-07-31 17:04 |
Code reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2017-07-17 01:40 | mtaal | New Issue | |
2017-07-17 01:40 | mtaal | Assigned To | => mtaal |
2017-07-17 01:40 | mtaal | Triggers an Emergency Pack | => No |
2017-07-21 23:52 | mtaal | Review Assigned To | => AugustoMauch |
2017-07-22 00:05 | hgbot | Checkin | |
2017-07-22 00:05 | hgbot | Note Added: 0098181 | |
2017-07-22 00:05 | hgbot | Status | new => resolved |
2017-07-22 00:05 | hgbot | Resolution | open => fixed |
2017-07-22 00:05 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/d2b3f0abb40cd17eb73a3afb5b1ffda1f9ae4e8b [^] |
2017-07-31 17:04 | AugustoMauch | Note Added: 0098282 | |
2017-07-31 17:04 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |