Bug 983520

Summary: Create the remoting endpoint, backed by daemon threads, for CLI. Solves shutdown problems
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tom Fonteyne <tfonteyn>
Component: CLIAssignee: Tom Fonteyne <tfonteyn>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: cdewolf, jawilson, myarboro, pgier, pkremens, smumford, tfonteyn
Target Milestone: ER4Flags: tfonteyn: needinfo+
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 20:23:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 983557    

Description Tom Fonteyne 2013-07-11 11:09:29 UTC
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 12:18:05 UTC
pull request done:

https://github.com/jbossas/jboss-eap/pull/239

Comment 2 Tom Fonteyne 2013-07-11 12:51:35 UTC
corrected pull request:

https://github.com/jbossas/jboss-eap/pull/240

Comment 3 Scott Mumford 2013-07-31 04:20:44 UTC
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 07:58:38 UTC
I think this is better now.

Comment 5 Petr Kremensky 2013-07-31 08:18:21 UTC
Verified on EAP 6.1.1 ER4

Comment 6 Scott Mumford 2013-08-01 00:44:38 UTC
Have added a new version of the release notes draft.

Setting NEEDINFO to request verification for technical accuracy.

Comment 7 Scott Mumford 2013-08-29 00:23:16 UTC
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.