Bug 1115650

Summary: [GSS] (6.4.0) jboss-remote-naming thread does not shutdown even if calling "javax.naming.InitialContext#close()"
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Masafumi Miura <mmiura>
Component: NamingAssignee: David M. Lloyd <david.lloyd>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.2.4, 6.3.0CC: jmartisk, kkhan, mmiura, mnovak, myarboro
Target Milestone: DR1   
Target Release: ---, EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1131628    
Bug Blocks:    

Description Masafumi Miura 2014-07-02 20:10:30 UTC
Description of problem:

The following jboss-remote-naming thread ("naming-client-message-receiver-*") does not shutdown and still remains after calling "javax.naming.InitialContext#close()".

"naming-client-message-receiver-1-thread-1" daemon prio=10 tid=0x00007f7f24001800 nid=0xdebae waiting on condition [0x00007f7f8cd85000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x0000000783119180> (a java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
    at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

How reproducible:

Steps to Reproduce:
1. Use the attached helloworld-jms-clearthreadpool.tar.gz, which is based on the jboss quickstart helloworld-jms 
2. Take a thread dump after calling "javax.naming.InitialContext#close()"

Actual results:
"naming-client-message-receiver-*" does not shutdown after calling "javax.naming.InitialContext#close()"

Expected results:
"naming-client-message-receiver-*" shutdown after calling "javax.naming.InitialContext#close()".

Comment 6 Jan Martiska 2014-11-27 10:03:03 UTC
Verified in EAP 6.4.0.DR11 / remote naming 1.0.10.Final-redhat-1. The thread naming-client-message-receiver-1-thread-1 no longer persists after the context is closed.