Bug 983520 - Create the remoting endpoint, backed by daemon threads, for CLI. Solves shutdown problems
Create the remoting endpoint, backed by daemon threads, for CLI. Solves shutd...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ER4
: EAP 6.1.1
Assigned To: Tom Fonteyne
:
Depends On:
Blocks: 983557
  Show dependency treegraph
 
Reported: 2013-07-11 07:09 EDT by Tom Fonteyne
Modified: 2013-09-16 16:23 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The CLI native client in previous versions of Red Hat JBoss Enterprise Application Platform 6 created the remoting endpoint in a user thread instead of a daemon thread. This meant that the JVM did not kill these threads when it exited. Those threads would prevent some applications from exiting cleanly and cause them to hang. The remoting endpoint is now created in a deamon thread which allows the JVM to automatically kill it on shut down. As a result, applications now close as expected and no longer hang on JVM exit.
Story Points: ---
Clone Of:
: 983557 (view as bug list)
Environment:
Last Closed: 2013-09-16 16:23:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tfonteyn: needinfo+


Attachments (Terms of Use)

  None (edit)
Description Tom Fonteyne 2013-07-11 07:09:29 EDT
When using the native management api, calls to commandContext.disconnectController() do not cause all threads to be killed, which causes the application to hang, instead of exiting.

This is fixed in WildFly:

https://github.com/jaikiran/wildfly/commit/dc3f3b4492e89cd7f97d48ab08d6a4869708da90

This BZ is for backporting to EAP 6.x
Comment 1 Tom Fonteyne 2013-07-11 08:18:05 EDT
pull request done:

https://github.com/jbossas/jboss-eap/pull/239
Comment 2 Tom Fonteyne 2013-07-11 08:51:35 EDT
corrected pull request:

https://github.com/jbossas/jboss-eap/pull/240
Comment 3 Scott Mumford 2013-07-31 00:20:44 EDT
Thanks for the release notes draft Tom.

We need a bit more information to complete the text (questions marked in square brackets below):

Cause: 
When using the native management api, calls to commandContext.disconnectController() do not cause all threads to be killed. 
[Why didn't the disconnectController kill the threads? This cause is actually part of the consequence.] 

Consequence: 
This meant calls to commandContext.disconnectController() did not kill all threads which caused the application to hang, instead of exiting.

Fix: 
In this version of EAP 6, affected threads are started as deamons [why does this solve the problem? Are deamons killed in a different way?]

Result:
The result is that threads get killed as expected, allowing the application to  exit normally.
Comment 4 Tom Fonteyne 2013-07-31 03:58:38 EDT
I think this is better now.
Comment 5 Petr Kremensky 2013-07-31 04:18:21 EDT
Verified on EAP 6.1.1 ER4
Comment 6 Scott Mumford 2013-07-31 20:44:38 EDT
Have added a new version of the release notes draft.

Setting NEEDINFO to request verification for technical accuracy.
Comment 7 Scott Mumford 2013-08-28 20:23:16 EDT
Marking for exclusion from the 6.1.1 Release Notes document as an entry for this bug could not be completed or verified in time.

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