Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039767 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | critical | have not tried | 2018-12-06 22:55 | 2018-12-10 09:58 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 7678179d3b72 | ||||
Projection | none | ETA | none | Target Version | ||||
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 | 0039767: Connection Leak in ServerStateBackground process | |||||||
Description | See attached screenshot, the thread which calls the servers to get the status uses separate threads [1]. If an exception occurs it will not release the connection it retrieved. [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java#l454 [^] | |||||||
Steps To Reproduce | Force an error in the loop somewhere | |||||||
Proposed Solution | Add a rollback in a finally/exception block in the try-catch-finally here [1] [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java#l454 [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | WhatsApp Image 2018-12-06 at 19.00.03 (1).jpeg [^] (252,871 bytes) 2018-12-06 22:55
39767.diff [^] (802 bytes) 2018-12-09 14:08 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0108347) mtaal (manager) 2018-12-09 14:04 |
Can be reproduced by forcing an error for example add this line // force NPE System.err.println(resp.toString()); in the pingServer method after the declaration of the resp variable. |
(0108348) hgbot (developer) 2018-12-09 22:05 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 7678179d3b72b5ad4fb73adf50b18218c147b053 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Sun Dec 09 22:05:12 2018 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7678179d3b72b5ad4fb73adf50b18218c147b053 [^] Fixes issue 39767: Connection Leak in ServerStateBackground process Do rollback and close in case of error and ensure that commit and close is called last if no error --- M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java --- |
(0108354) AugustoMauch (manager) 2018-12-10 09:58 |
Code reviewed and verified. The change itself makes sense, and it makes the code more robust against errors during the ping process. Note though that the screenshot attached to the issue does not show a memory leak, just a slow execution of the process. Line printed at 12:53:02 states that the connection was returned to the pool. |
Issue History | |||
Date Modified | Username | Field | Change |
2018-12-06 22:55 | mtaal | New Issue | |
2018-12-06 22:55 | mtaal | Assigned To | => mtaal |
2018-12-06 22:55 | mtaal | File Added: WhatsApp Image 2018-12-06 at 19.00.03 (1).jpeg | |
2018-12-06 22:55 | mtaal | Triggers an Emergency Pack | => No |
2018-12-09 14:04 | mtaal | Note Added: 0108347 | |
2018-12-09 14:08 | mtaal | File Added: 39767.diff | |
2018-12-09 22:05 | hgbot | Checkin | |
2018-12-09 22:05 | hgbot | Note Added: 0108348 | |
2018-12-09 22:05 | hgbot | Status | new => resolved |
2018-12-09 22:05 | hgbot | Resolution | open => fixed |
2018-12-09 22:05 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7678179d3b72b5ad4fb73adf50b18218c147b053 [^] |
2018-12-09 22:06 | mtaal | Review Assigned To | => AugustoMauch |
2018-12-10 09:58 | AugustoMauch | Note Added: 0108354 | |
2018-12-10 09:58 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |