Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036153 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | minor | have not tried | 2017-05-31 15:57 | 2017-06-06 23:11 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 2c04119aeb87 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | mtaal | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036153: Connection leaks in StoreServerVersionHandler and MobileMainServerCheck | |||||||
Description | The following connection leaks have been detected in StoreServerVersionHandler and MobileMainServerCheck: May 30, 2017 1:28:16 PM org.apache.tomcat.jdbc.pool.ConnectionPool suspect WARNING: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@630862bb][88325 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.core.SessionHandler.find(SessionHandler.java:534) at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:500) at org.openbravo.dal.service.OBDal.get(OBDal.java:353) at org.openbravo.mobile.core.servercontroller.MobileServerController.getThisServerDefinition(MobileServerController.java:391) at org.openbravo.retail.storeserver.synchronization.StoreServerVersionHandler$1.run(StoreServerVersionHandler.java:186) at java.lang.Thread.run(Thread.java:745) May 30, 2017 1:36:16 PM org.apache.tomcat.jdbc.pool.ConnectionPool suspect WARNING: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@6737fa02][53361 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.core.SessionHandler.find(SessionHandler.java:534) at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:500) at org.openbravo.dal.service.OBDal.get(OBDal.java:353) at org.openbravo.mobile.core.servercontroller.MobileServerController.getThisServerDefinition(MobileServerController.java:391) at org.openbravo.mobile.core.servercontroller.MobileServerController.getThisMobileServerState(MobileServerController.java:370) at org.openbravo.mobile.core.servercontroller.MobileServerController.transitionToOnline(MobileServerController.java:543) at org.openbravo.mobile.core.servercontroller.MobileMainServerCheck.run(MobileMainServerCheck.java:140) at java.lang.Thread.run(Thread.java:745) | |||||||
Steps To Reproduce | The log pasted in the description field was taken from a store server where the performance tests are being performed. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0097058) hgbot (developer) 2017-05-31 16:02 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: d5c83db20617ef947b7228755cfe420ec305d740 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Wed May 31 16:01:28 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/d5c83db20617ef947b7228755cfe420ec305d740 [^] Related with issue 36153: Prevents connection leak in StoreServerVersionHandler --- M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java --- |
(0097059) hgbot (developer) 2017-05-31 16:05 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: ff15f8de4aac5f5bf5c7d3f0359163b5466db797 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Wed May 31 16:03:35 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff15f8de4aac5f5bf5c7d3f0359163b5466db797 [^] Fixes issue 36153: Prevents connection leak in MobileMainServerCheck --- M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java --- |
(0097126) mtaal (viewer) 2017-06-05 12:08 |
The commit and close should be within the try block and not in the finally block. This so that it is executed before the enableprev-mode and also that any errors do not cause a missed enableprev-mode. [1] Here, just before the err=false line: https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/d5c83db20617/src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java#l220 [^] [2] Should be added as last line in the try block: https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/ff15f8de4aac/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java#l146 [^] |
(0097142) hgbot (developer) 2017-06-05 18:33 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: b525df267dc5b4b6dfee41bb956418d6305ba6cb Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Mon Jun 05 18:33:14 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b525df267dc5b4b6dfee41bb956418d6305ba6cb [^] Related with issue 36153: Puts commitAndClose statement in proper place Commits the transaction at the end of the try block, to make sure that an error during the commit does not result in OBContext.restorePreviousMode(); not being executed. --- M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java --- |
(0097147) hgbot (developer) 2017-06-05 18:40 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 2c04119aeb87e46713d925755adab1ed5049c56e Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Mon Jun 05 18:35:03 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2c04119aeb87e46713d925755adab1ed5049c56e [^] Fixes issue 36153: Puts commitAndClose statement in proper place Commits the transaction at the end of the try block, to make sure that an error during the commit does not result in OBContext.restorePreviousMode(); not being executed. --- M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java --- |
(0097176) mtaal (viewer) 2017-06-06 23:11 |
Reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2017-05-31 15:57 | AugustoMauch | New Issue | |
2017-05-31 15:57 | AugustoMauch | Assigned To | => AugustoMauch |
2017-05-31 15:57 | AugustoMauch | OBNetwork customer | => No |
2017-05-31 15:57 | AugustoMauch | Triggers an Emergency Pack | => No |
2017-05-31 16:02 | hgbot | Checkin | |
2017-05-31 16:02 | hgbot | Note Added: 0097058 | |
2017-05-31 16:05 | hgbot | Checkin | |
2017-05-31 16:05 | hgbot | Note Added: 0097059 | |
2017-05-31 16:05 | hgbot | Status | new => resolved |
2017-05-31 16:05 | hgbot | Resolution | open => fixed |
2017-05-31 16:05 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff15f8de4aac5f5bf5c7d3f0359163b5466db797 [^] |
2017-05-31 16:06 | AugustoMauch | Review Assigned To | => mtaal |
2017-06-05 12:08 | mtaal | Note Added: 0097126 | |
2017-06-05 12:08 | mtaal | Status | resolved => new |
2017-06-05 12:08 | mtaal | Resolution | fixed => open |
2017-06-05 18:33 | hgbot | Checkin | |
2017-06-05 18:33 | hgbot | Note Added: 0097142 | |
2017-06-05 18:40 | hgbot | Checkin | |
2017-06-05 18:40 | hgbot | Note Added: 0097147 | |
2017-06-05 18:40 | hgbot | Status | new => resolved |
2017-06-05 18:40 | hgbot | Resolution | open => fixed |
2017-06-05 18:40 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff15f8de4aac5f5bf5c7d3f0359163b5466db797 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2c04119aeb87e46713d925755adab1ed5049c56e [^] |
2017-06-06 23:11 | mtaal | Note Added: 0097176 | |
2017-06-06 23:11 | mtaal | Status | resolved => closed |
2017-06-06 23:11 | mtaal | Fixed in Version | => RR17Q3 |
Copyright © 2000 - 2009 MantisBT Group |