Bug 1035787 - Thread leak in JBossWeb after :reload
Summary: Thread leak in JBossWeb after :reload
Keywords:
Status: CLOSED DUPLICATE of bug 1032552
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: EAP 6.3.0
Assignee: Rémy Maucherat
QA Contact: Radim Hatlapatka
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-28 13:26 UTC by Ladislav Thon
Modified: 2014-06-29 22:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-19 09:36:16 UTC
Type: Bug


Attachments (Terms of Use)
reproducer (344 bytes, application/x-shellscript)
2013-11-28 13:26 UTC, Ladislav Thon
no flags Details
preliminary patch (1.17 KB, patch)
2013-11-28 13:27 UTC, Ladislav Thon
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1032552 None None None Never

Internal Links: 1032552

Description Ladislav Thon 2013-11-28 13:26:55 UTC
Created attachment 830235 [details]
reproducer

Description of problem:

JBossWeb threads keep running after :reload, even though the subsystem is stopped successfully.

Version-Release number of selected component (if applicable):

EAP 6.2.0.CR3

How reproducible:

Always

Steps to Reproduce:
1. Start EAP
2. Invoke :reload via the CLI several times
3. Look at the number of running threads named "http-/127.0.0.1:8080-*" via jstack

I have this automated in the repro.sh script (see attachment).

Actual results:

The number of threads keeps rising during the test.

Expected results:

The number of threads is still the same during the test.

Additional info:

I looked into the implementation of JBossWeb and I believe I fixed the problem. Attaching a patch for the org.apache.tomcat.util.net.JIoEndpoint class -- note that this totally needs review, as I'm not familiar with the codebase. Also note that similar patch might be needed for NioEndpoint and maybe others, not sure.

Comment 1 Ladislav Thon 2013-11-28 13:27:29 UTC
Created attachment 830236 [details]
preliminary patch

Comment 2 Rémy Maucherat 2013-11-29 16:56:47 UTC
Very good catch, it would leak 2 or 3 threads depending on the connector. Obviously it was a bit hard to notice.

I applied something like your patch (for all connectors).

Comment 3 Radim Hatlapatka 2013-12-19 09:36:16 UTC
Closing as duplicate as it is about the same issue as in BZ#1032552

*** This bug has been marked as a duplicate of bug 1032552 ***


Note You need to log in before you can comment on or make changes to this bug.