New Exception with CR1 preventing a full shutdown
Ian Swett
iswett at yahoo.com
Tue Jun 23 19:48:18 EDT 2009
I think the reason it is not exiting is actually my fault, because I'm blocking on LinkedBlockingQueue.take() forever in the last thread, and I believe the original error/stack trace is causing me not to get the response I'm expecting.
Here is the jstack output:
Debugger attached successfully.
Client compiler detected.
JVM version is 1.5.0_19-137
Deadlock Detection:
No deadlocks found.
Thread t at 60931: (state = IN_NATIVE)
- sun.nio.ch.KQueueArrayWrapper.kevent0(int, long, int, long) @bci=0 (Interpreted frame)
- sun.nio.ch.KQueueArrayWrapper.poll(long) @bci=12, line=136 (Interpreted frame)
- sun.nio.ch.KQueueSelectorImpl.doSelect(long) @bci=46, line=69 (Interpreted frame)
- sun.nio.ch.SelectorImpl.lockAndDoSelect(long) @bci=37, line=69 (Interpreted frame)
- sun.nio.ch.SelectorImpl.select(long) @bci=30, line=80 (Interpreted frame)
- org.jboss.netty.channel.socket.nio.NioWorker.run() @bci=60, line=165 (Interpreted frame)
- org.jboss.netty.util.ThreadRenamingRunnable.run() @bci=55, line=110 (Interpreted frame)
- org.jboss.netty.util.internal.IoWorkerRunnable.run() @bci=13, line=53 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=43, line=651 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=676 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)
Thread t at 64003: (state = IN_NATIVE)
- sun.nio.ch.KQueueArrayWrapper.kevent0(int, long, int, long) @bci=0 (Interpreted frame)
- sun.nio.ch.KQueueArrayWrapper.poll(long) @bci=12, line=136 (Interpreted frame)
- sun.nio.ch.KQueueSelectorImpl.doSelect(long) @bci=46, line=69 (Interpreted frame)
- sun.nio.ch.SelectorImpl.lockAndDoSelect(long) @bci=37, line=69 (Interpreted frame)
- sun.nio.ch.SelectorImpl.select(long) @bci=30, line=80 (Interpreted frame)
- sun.nio.ch.ServerSocketAdaptor.accept() @bci=165, line=105 (Interpreted frame)
- org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run() @bci=10, line=215 (Interpreted frame)
- org.jboss.netty.util.ThreadRenamingRunnable.run() @bci=55, line=110 (Interpreted frame)
- org.jboss.netty.util.internal.IoWorkerRunnable.run() @bci=13, line=53 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=43, line=651 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=676 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)
Thread t at 66051: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.util.TimerThread.mainLoop() @bci=201, line=509 (Interpreted frame)
- java.util.TimerThread.run() @bci=1, line=462 (Interpreted frame)
Thread t at 66307: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
- org.mortbay.jetty.bio.SocketConnector.accept(int) @bci=4, line=99 (Interpreted frame)
- org.mortbay.jetty.AbstractConnector$Acceptor.run() @bci=151, line=707 (Interpreted frame)
- org.mortbay.thread.QueuedThreadPool$PoolThread.run() @bci=25, line=520 (Interpreted frame)
Thread t at 66563: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- org.mortbay.thread.QueuedThreadPool$PoolThread.run() @bci=275, line=563 (Interpreted frame)
Thread t at 66819: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
- sun.nio.cs.StreamDecoder$CharsetSD.readBytes() @bci=130, line=411 (Interpreted frame)
- sun.nio.cs.StreamDecoder$CharsetSD.implRead(char[], int, int) @bci=112, line=453 (Interpreted frame)
- sun.nio.cs.StreamDecoder.read(char[], int, int) @bci=180, line=183 (Interpreted frame)
- java.io.InputStreamReader.read(char[], int, int) @bci=7, line=167 (Interpreted frame)
- java.io.BufferedReader.fill() @bci=145, line=136 (Interpreted frame)
- java.io.BufferedReader.readLine(boolean) @bci=44, line=299 (Compiled frame)
- java.io.BufferedReader.readLine() @bci=2, line=362 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.RemoteTestRunner$ReaderThread.run() @bci=9, line=140 (Interpreted frame)
Thread t at 68099: (state = BLOCKED)
Thread t at 68355: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=120 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=136 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Interpreted frame)
Thread t at 68611: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame)
Thread t at 68867: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park() @bci=5, line=118 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=41, line=1841 (Interpreted frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=359 (Interpreted frame)
- com.appliedminds.mql.MQLServer.start() @bci=4, line=406 (Interpreted frame)
- junit.framework.TestCase.runBare() @bci=3, line=128 (Interpreted frame)
- junit.framework.TestResult$1.protect() @bci=4, line=106 (Interpreted frame)
- junit.framework.TestResult.runProtected(junit.framework.Test, junit.framework.Protectable) @bci=1, line=124 (Interpreted frame)
- junit.framework.TestResult.run(junit.framework.TestCase) @bci=18, line=109 (Interpreted frame)
- junit.framework.TestCase.run(junit.framework.TestResult) @bci=2, line=120 (Interpreted frame)
- junit.framework.TestSuite.runTest(junit.framework.Test, junit.framework.TestResult) @bci=2, line=230 (Interpreted frame)
- junit.framework.TestSuite.run(junit.framework.TestResult) @bci=37, line=225 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(org.eclipse.jdt.internal.junit.runner.TestExecution) @bci=40, line=130 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.TestExecution.run(org.eclipse.jdt.internal.junit.runner.ITestReference[]) @bci=17, line=38 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(java.lang.String[], java.lang.String, org.eclipse.jdt.internal.junit.runner.TestExecution) @bci=61, line=460 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(org.eclipse.jdt.internal.junit.runner.TestExecution) @bci=10, line=673 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run() @bci=70, line=386 (Interpreted frame)
- org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(java.lang.String[]) @bci=14, line=196 (Interpreted frame)
----- Original Message ----
From: 이희승 (Trustin Lee) <trustin at gmail.com>
To: netty-users at lists.jboss.org
Sent: Tuesday, June 23, 2009 10:54:06 AM
Subject: Re: New Exception with CR1 preventing a full shutdown
Hi Ian,
Thanks for reporting the problem. This bug has been triggered by the
side effect of AIX bug fix. Could you post the full thread dump when it
does not shut down? (i.e. two servers in one vm case)
On 2009-06-24 오전 2:29, Ian Swett wrote:
>
> I get the following exception at a point during startup. The program runs properly after this exception, but when I got to shutdown, there are threads which don't get shutdown, so the JVM doesn't exit. Sometimes I do not get this exception, and then everything goes smoothly. I verified that when I switch back to Beta3, this problem never occurs.
>
> I am running two Netty servers in the same JVM. When I only run one, this exception still occurs, but the JVM shuts down cleanly.
>
> Exception in thread "pool-1-thread-1" java.nio.channels.ClosedSelectorException
> at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)
> at sun.nio.ch.SelectorImpl.selectNow(SelectorImpl.java:88)
> at sun.nio.ch.Util.releaseTemporarySelector(Util.java:135)
> at sun.nio.ch.ServerSocketAdaptor.accept(ServerSocketAdaptor.java:120)
> at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:215)
> at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:110)
> at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:53)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
> at java.lang.Thread.run(Thread.java:613)
>
> This is on MacOSX 10.5.7 with JDK 1.5.
>
> Thanks, Ian
>
>
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
--
— Trustin Lee, http://gleamynode.net/
More information about the netty-users
mailing list