[jboss-jira] [JBoss JIRA] Commented: (AS7-1225) jboss-admin.sh fails to exit when run in single command mode
Scott Stark (JIRA)
jira-events at lists.jboss.org
Thu Jul 7 17:17:23 EDT 2011
[ https://issues.jboss.org/browse/AS7-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613005#comment-12613005 ]
Scott Stark commented on AS7-1225:
----------------------------------
I see the code is just returning from main when in non-interactive mode, but there are non-daemon threads keeping the process from exiting:
[271](ironmaiden:bin) > ./jboss-admin.sh --connect command=:shutdown
The controller is not available at localhost:9999
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
^\2011-07-07 14:13:36
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.1-b02-334 mixed mode):
"DestroyJavaVM" prio=5 tid=101801000 nid=0x100601000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"pool-1-thread-3" prio=5 tid=102940000 nid=0x10c50a000 waiting on condition [10c509000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7f42c8aa0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
"pool-1-thread-2" prio=5 tid=101a06000 nid=0x10c793000 waiting on condition [10c792000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7f42c8aa0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
"pool-1-thread-1" prio=5 tid=10bb09000 nid=0x10c407000 waiting on condition [10c406000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7f42c8aa0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
"Poller SunPKCS11-Darwin" daemon prio=1 tid=101964000 nid=0x10c304000 waiting on condition [10c303000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:692)
at java.lang.Thread.run(Thread.java:680)
"Reference Reaper" daemon prio=5 tid=101a07000 nid=0x10c201000 in Object.wait() [10c200000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f42b4070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7f42b4070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at org.jboss.modules.ref.References$ReaperThread.run(References.java:68)
"Low Memory Detector" daemon prio=5 tid=10280c000 nid=0x10b201000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread1" daemon prio=9 tid=10280b000 nid=0x10a70a000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=9 tid=10280a800 nid=0x10a607000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=9 tid=102809800 nid=0x10a504000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"Surrogate Locker Thread (CMS)" daemon prio=5 tid=102809000 nid=0x10a401000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=1018d2000 nid=0x109eea000 in Object.wait() [109ee9000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f42b4260> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7f42b4260> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=1018d1000 nid=0x109de7000 in Object.wait() [109de6000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f42b0180> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <7f42b0180> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=9 tid=1018cc800 nid=0x109ce4000 runnable
"Gang worker#0 (Parallel GC Threads)" prio=9 tid=101802800 nid=0x10176a000 runnable
"Gang worker#1 (Parallel GC Threads)" prio=9 tid=101803000 nid=0x102301000 runnable
"Gang worker#2 (Parallel GC Threads)" prio=9 tid=101803800 nid=0x102404000 runnable
"Gang worker#3 (Parallel GC Threads)" prio=9 tid=101804000 nid=0x102507000 runnable
"Concurrent Mark-Sweep GC Thread" prio=9 tid=10187f800 nid=0x1099f0000 runnable
"VM Periodic Task Thread" prio=10 tid=10281d800 nid=0x10b501000 waiting on condition
"Exception Catcher Thread" prio=10 tid=101801800 nid=0x100704000 runnable
JNI global references: 955
Heap
par new generation total 19136K, used 6068K [7f3000000, 7f44c0000, 7f44c0000)
eden space 17024K, 26% used [7f3000000, 7f3457300, 7f40a0000)
from space 2112K, 76% used [7f42b0000, 7f4445ea8, 7f44c0000)
to space 2112K, 0% used [7f40a0000, 7f40a0000, 7f42b0000)
concurrent mark-sweep generation total 63872K, used 0K [7f44c0000, 7f8320000, 7fae00000)
concurrent-mark-sweep perm gen total 21248K, used 11850K [7fae00000, 7fc2c0000, 800000000)
> jboss-admin.sh fails to exit when run in single command mode
> ------------------------------------------------------------
>
> Key: AS7-1225
> URL: https://issues.jboss.org/browse/AS7-1225
> Project: Application Server 7
> Issue Type: Bug
> Components: CLI
> Affects Versions: 7.0.0.CR1
> Reporter: Scott Stark
>
> This seems to be a new behavior, but regardless it is a problem that breaks other frameworks that call out to the command line shell with a single command and expect it to return. Currently it fails to exit, and callers hang. This is true both in the case of the server running with a management interface, and when one is missing:
> [269](ironmaiden:bin) > ./jboss-admin.sh --connect command=:shutdown
> Connected to standalone controller at localhost:9999
> Communication error: Channel closed
> Closed connection to localhost:9999
> ^C
> [270](ironmaiden:bin) > ./jboss-admin.sh --connect command=:shutdown
> The controller is not available at localhost:9999
> You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
> ^C
> When running a mode where the commands to run are from a file or command line, that is, non-interactive mode, the cli should exit with a status.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list