Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0052189 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | always | 2023-04-20 08:30 | 2023-04-20 15:12 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | PR23Q1.2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | PR23Q1.2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0052189: resources (open file descriptors and java threads) leaked on push API | |||||||
Description | Push API, technically any user of ExternalSystem, generate over the time many open file descriptors that are never closed as well as many HttpClient-xx-SelectorManager threads. | |||||||
Steps To Reproduce | 1.1 Observe a customer with usage of push API, see how open file descriptors (lsof) and HttpClient threads increase over the time. Execute for monitoring: watch 'PID=$(jps | grep Bootstrap | cut -f1 -d " "); echo "HttpClient threads: $(jstack $PID | grep HttpClient- | wc -l)"; echo "pipes and polls $(lsof -p $PID | grep -e pipe -e eventpoll | wc -l)"' or create the following artificial reproducer 2.1 Apply the attached reproducer 2.2 Having installed api modules, create a subscription to order creation 2.3 In Openbravo open about form to launch the reproducer 2.4 Monitor with the previous command | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0148642) hgbot (developer) 2023-04-20 14:28 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/861 [^] |
(0148646) hgbot (developer) 2023-04-20 15:12 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/861 [^] |
(0148647) hgbot (developer) 2023-04-20 15:12 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: c49798aa8c71c9ad6a087e997ade3e4fbd680fd8 Author: Asier Lostalé <asier.lostale@openbravo.com> Date: 20-04-2023 14:25:34 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/c49798aa8c71c9ad6a087e997ade3e4fbd680fd8 [^] fixes BUG-52189: ExternalSystem instances are leaked Injecting @Depedent scoped ExternalSystem instances in @ApplicationScoped ExternalSystemProvider caused the former instances to be retained as part of the latte's context. Each HttpExternalSystem references to a JDK's HttpClient intance which causes its threads and file descriptors to be kept open forever even after the ExternalSystem is disposed from the cache. Instantiating them through the BeanManager (which is indirectly done by the WeldUtils) prevents this leak --- M src/org/openbravo/service/externalsystem/ExternalSystemProvider.java --- |
Issue History | |||
Date Modified | Username | Field | Change |
2023-04-20 14:13 | alostale | Type | defect => backport |
2023-04-20 14:13 | alostale | Target Version | => PR23Q1.2 |
2023-04-20 14:28 | hgbot | Note Added: 0148642 | |
2023-04-20 15:12 | hgbot | Resolution | open => fixed |
2023-04-20 15:12 | hgbot | Status | scheduled => closed |
2023-04-20 15:12 | hgbot | Fixed in Version | => PR23Q1.2 |
2023-04-20 15:12 | hgbot | Note Added: 0148646 | |
2023-04-20 15:12 | hgbot | Note Added: 0148647 |
Copyright © 2000 - 2009 MantisBT Group |