Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041057
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServermajorhave not tried2019-06-07 18:272019-06-10 12:30
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision84057576dec0
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tojarmendariz
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041057: Connection Leak when Storing server log in transition to online

DescriptionThis line [1] opens a connection but does not close it if the transition to online did not fail. The auto-close does not happen because this runs in a separate thread. See the stacktrace [2].

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l718 [^]

[2]
WARNING: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@30f35965][54561 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:299)
    at org.openbravo.dal.core.SessionHandler.createSession(SessionHandler.java:234)
    at org.openbravo.dal.core.SessionHandler.begin(SessionHandler.java:575)
    at org.openbravo.dal.core.SessionHandler.getSession(SessionHandler.java:182)
    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:359)
    at org.openbravo.mobile.core.servercontroller.MobileServerController.getThisServerDefinition(MobileServerController.java:410)
    at org.openbravo.mobile.core.servercontroller.MobileServerController$TransitionToOnline.run(MobileServerController.java:718)
    at java.lang.Thread.run(Thread.java:745)
Steps To ReproduceRun multi-server, set status to OFF in the ss database for the store server mobile server record.
Run ServerStateBackground process
Proposed SolutionDo the commit after the if statement, or set the status in before the other commits.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0112512)
hgbot (developer)
2019-06-07 18:27

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1463fc25f6722c5b2080f7a7da63e0e5fea1f612
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Jun 07 18:27:48 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1463fc25f6722c5b2080f7a7da63e0e5fea1f612 [^]

Fixes issue 41057: Connection Leak when Storing server log in transition to online
Do commit after the if

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0112515)
hgbot (developer)
2019-06-08 16:55

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 84057576dec03fcdec4ad7b0e2719ae238eef206
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Jun 08 16:54:54 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/84057576dec03fcdec4ad7b0e2719ae238eef206 [^]

Fixes issue 41057: Connection Leak when Storing server log in transition to online
Seems better to set the status log in the same transaction as the status itself

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0112534)
jarmendariz (developer)
2019-06-10 12:30

Reviewed

- Issue History
Date Modified Username Field Change
2019-06-07 18:27 mtaal New Issue
2019-06-07 18:27 mtaal Assigned To => mtaal
2019-06-07 18:27 mtaal Triggers an Emergency Pack => No
2019-06-07 18:27 hgbot Checkin
2019-06-07 18:27 hgbot Note Added: 0112512
2019-06-07 18:27 hgbot Status new => resolved
2019-06-07 18:27 hgbot Resolution open => fixed
2019-06-07 18:27 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1463fc25f6722c5b2080f7a7da63e0e5fea1f612 [^]
2019-06-07 18:28 mtaal Review Assigned To => jarmendariz
2019-06-07 18:34 mtaal Proposed Solution updated
2019-06-08 16:55 hgbot Checkin
2019-06-08 16:55 hgbot Note Added: 0112515
2019-06-08 16:55 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1463fc25f6722c5b2080f7a7da63e0e5fea1f612 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/84057576dec03fcdec4ad7b0e2719ae238eef206 [^]
2019-06-10 12:30 jarmendariz Note Added: 0112534
2019-06-10 12:30 jarmendariz Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker