Re: [Bug# 228886] Multiple Glassfish threads hanging in memory
Petr Jiricka <[email protected]> Tue, 21 May 2013 15:58:43 +0200
| Newsgroups | gmane.comp.java.netbeans.reviewers |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_B1845CFE-81FB-4142-92BC-72C1571A7601
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=iso-8859-1
On May 21, 2013, at 1:42 PM, Tomas Kraus wrote:
> Bug 228886 - Multiple Glassfish threads hanging in memory
>=20
> Zombie thread is left after GlassFish Log Reader thread has been =
interrupted in build task.
> - Start NetBeans
> - Start VisualVM and open NetBeans, threads table, sort by Thread
> - Create sample project ServletStateless
> - Start GlassFish server in debug mode
> - Undeploy all projects
> Repeat the following cycle
> - Run project ServletStateless
> creates one thread FetchLogPiped
> - Clean and build project
> creates one thread FetchLogPiped.
>=20
> So if you run this cyle 3 times you should have 6 FetchLogPiped =
threads.
> Fix in GF plugin was made in 4 steps (253015:70350e3b09dc, =
253069:422df5694675, 253094:1ad1e811d955 and 253176:e0be6fab29ed), =
combined diff is attached as =
https://netbeans.org/bugzilla/attachment.cgi?id=3D134564&action=3Ddiff
>=20
> I made single thread pool (ExecutorService) to be shared for all =
GlassFish Log Reader threads. Threads are run under top level =
ThreadGroup to not be interrupted by build task. Threads have =
setDaemon(true) set to avoid them being NB exit blockers.
>=20
> GlassFish Tooling Library changeset is 502:280234be9cb0.
Tomas, please attach a diff for this.
Thanks,
Petr
>=20
> It allows to pass external ExecutorService into GlassFish Log Reader =
thread starting code.
>=20
> Code went trough 2 reviews - Petr Hejl and Peter Benedikovic. It was =
cleaned up thanks to Petr Hejl notes and now I believe it's safe enough =
to be pushed in to 7.3.1 release branch. QA testing was done by Jiri =
Skrivanek. More details are in the bug.
>=20
--Apple-Mail=_B1845CFE-81FB-4142-92BC-72C1571A7601
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=iso-8859-1
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 21, 2013, at 1:42 PM, Tomas Kraus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div bgcolor="#FFFFFF" text="#000000">
<a href="https://netbeans.org/bugzilla/show_bug.cgi?id=228886"><b>Bug 228886</b></a>
-<span id="summary_alias_container"> <span id="short_desc_nonedit_display">Multiple Glassfish threads
hanging in memory<br>
<br>
Zombie thread is left after GlassFish Log Reader thread has been
interrupted in build task.<br>
</span></span>
<pre class="bz_comment_text">- Start NetBeans
- Start VisualVM and open NetBeans, threads table, sort by Thread
- Create sample project ServletStateless
- Start GlassFish server in debug mode
- Undeploy all projects
Repeat the following cycle
- Run project ServletStateless
creates one thread FetchLogPiped
- Clean and build project
creates one thread FetchLogPiped.
So if you run this cyle 3 times you should have 6 FetchLogPiped threads.</pre>
Fix in GF plugin was made in 4 steps (253015:70350e3b09dc,
253069:422df5694675, 253094:1ad1e811d955
and 253176:e0be6fab29ed), combined diff is attached as
<a class="moz-txt-link-freetext" href="https://netbeans.org/bugzilla/attachment.cgi?id=134564&action=diff">https://netbeans.org/bugzilla/attachment.cgi?id=134564&action=diff</a><br>
<br>
I made single thread pool (ExecutorService) to be shared for all <span id="summary_alias_container"><span id="short_desc_nonedit_display">GlassFish
Log Reader </span></span>threads. Threads are run under top
level ThreadGroup to not be interrupted by build task. Threads have
setDaemon(true) set to avoid them being NB exit blockers.<br>
<br>
GlassFish Tooling Library changeset is 502:280234be9cb0.<br></div></blockquote><div><br></div><div>Tomas, please attach a diff for this.</div><div><br></div><div>Thanks,</div><div>Petr</div><div><br></div><br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">
<br>
It allows to pass external ExecutorService into <span id="summary_alias_container"><span id="short_desc_nonedit_display">GlassFish
Log Reader </span></span>thread starting code.<br>
<br>
Code went trough 2 reviews - Petr Hejl and Peter Benedikovic. It was
cleaned up thanks to Petr Hejl notes and now I believe it's safe
enough to be pushed in to 7.3.1 release branch. QA testing was done
by Jiri Skrivanek. More details are in the bug.<br>
<br>
</div>
</blockquote></div><br></body></html>
--Apple-Mail=_B1845CFE-81FB-4142-92BC-72C1571A7601--