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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036384
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServermajorhave not tried2017-07-03 11:002017-07-04 09:06
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionRR17Q4
StatusclosedFix in branchFixed in SCM revisiond0dc67e84549
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression levelPackaging and release
Regression date2017-06-08
Regression introduced in releaseRR17Q2
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b9d05b616c97890bac563e72fcc415931f75f89 [^]
Triggers an Emergency PackNo
Summary

0036384: Connection leak in ServerStateBackground is there are no servers to ping

DescriptionThis changeset [1] fixed a connection leak in ServerStateBackground, but only if there was at least one store server to be pinged from the central server. If there are none, connections are still being leaked:

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7edfb4a12cd4eec4d8a87c3a394b4c6ebd92ceae [^]
Steps To ReproduceIn a central server with no store server registered:
- Start tomcat
- Wait until the ServerStateBackground process is invoked. Each time it is invoked a connection will be leaked:

jul 03, 2017 10:56:07 AM org.apache.tomcat.jdbc.pool.ConnectionPool suspect
ADVERTENCIA: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@5667c6bd][33259 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:130)
    at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnection(JdbcExternalConnectionPool.java:110)
    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.authenticate.MobileAuthenticationKeyUtils.getKey(MobileAuthenticationKeyUtils.java:133)
    at org.openbravo.mobile.core.authenticate.MobileAuthenticationKeyUtils.encrypt(MobileAuthenticationKeyUtils.java:88)
    at org.openbravo.mobile.core.authenticate.MobileAuthenticationKeyUtils.getEncryptedAuthenticationToken(MobileAuthenticationKeyUtils.java:77)
    at org.openbravo.mobile.core.servercontroller.MobileServerUtils.getAuthenticationQueryParams(MobileServerUtils.java:198)
    at org.openbravo.mobile.core.servercontroller.ServerStateBackground$PingRunnable.run(ServerStateBackground.java:414)
TagsNo tags attached.
Attached Files? file icon 36384.export [^] (1,172 bytes) 2017-07-03 11:18

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0035378 closedmtaal The ServerStateBackground process pings store server sequentially 
depends on backport 0036385RR17Q3 closedmtaal Connection leak in ServerStateBackground is there are no servers to ping 

-  Notes
(0097792)
hgbot (developer)
2017-07-03 12:18

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d0dc67e8454982f51484d2e970dfe43530660402
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jul 03 11:04:14 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d0dc67e8454982f51484d2e970dfe43530660402 [^]

Fixes issue 36384: Fixes connection leak in ServerStateBackground

Commits the connection outside the for loop, to ensure the connections is commited even if there are no store server to be pinged.

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0097817)
mtaal (manager)
2017-07-04 09:06

Reviewed

- Issue History
Date Modified Username Field Change
2017-07-03 11:00 AugustoMauch New Issue
2017-07-03 11:00 AugustoMauch Assigned To => AugustoMauch
2017-07-03 11:00 AugustoMauch Triggers an Emergency Pack => No
2017-07-03 11:05 AugustoMauch Relationship added related to 0035378
2017-07-03 11:17 AugustoMauch Regression level => Packaging and release
2017-07-03 11:17 AugustoMauch Regression date => 2017-06-08
2017-07-03 11:17 AugustoMauch Regression introduced in release => RR17Q2
2017-07-03 11:17 AugustoMauch Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b9d05b616c97890bac563e72fcc415931f75f89 [^]
2017-07-03 11:17 AugustoMauch Status new => scheduled
2017-07-03 11:18 AugustoMauch File Added: 36384.export
2017-07-03 12:18 hgbot Checkin
2017-07-03 12:18 hgbot Note Added: 0097792
2017-07-03 12:18 hgbot Status scheduled => resolved
2017-07-03 12:18 hgbot Resolution open => fixed
2017-07-03 12:18 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d0dc67e8454982f51484d2e970dfe43530660402 [^]
2017-07-04 09:06 mtaal Review Assigned To => mtaal
2017-07-04 09:06 mtaal Note Added: 0097817
2017-07-04 09:06 mtaal Status resolved => closed
2017-07-04 09:06 mtaal Fixed in Version => RR17Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker