]
Mladen Turk updated AS7-3834:
-----------------------------
Attachment: no-unlock-accept.patch
You might try with this patch.
It removes unlockAccept and directly closes the sockets.
The only difference is that when the connector is inside pause it can accept (but still
not process) a single connection.
It also makes shutdown a bit faster but that's not the point.
IMHO unlockAccept needlessly complicate the things, but I might be wrong and there is a
good reason for its existence.
Socket bind for JIoEndpoint fails on shutdown when using link-local
IPv6 address
--------------------------------------------------------------------------------
Key: AS7-3834
URL:
https://issues.jboss.org/browse/AS7-3834
Project: Application Server 7
Issue Type: Bug
Components: Web
Affects Versions: 7.1.0.Final
Environment: Fedora 14
Reporter: Richard Achmatowicz
Assignee: Jean-Frederic Clere
Labels: eap6_need_triage
Fix For: 7.1.2.Final-redhat1
Attachments: no-unlock-accept.patch
Start AS 7.1.0.Final with a link local IPv6 address, *specifying* the numeric zone id:
{noformat}
[nrla@lenovo ~]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr F0:DE:F1:40:75:B8
inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::f2de:f1ff:fe40:75b8/64 Scope:Link
inet6 addr: 3ffe:ffff:100:f101::1/64 Scope:Global
[nrla@lenovo ~]$ ./standalone.sh -Djboss.bind.address=fe80::f2de:f1ff:fe40:75b8%2
-Djboss.bind.address.management=fe80::f2de:f1ff:fe40:75b8%2
{noformat}
The server starts up correctly, but it hangs when shutting down:
{noformat}
18:49:20,854 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS
7.1.1.Final-SNAPSHOT "Thunder" started in 2169ms - Started 136 of 207 services
(70 services are passive or on-demand)
^C18:49:22,489 INFO [org.jboss.as.logging] JBAS011503: Restored bootstrap log handlers
18:49:22,489 INFO [org.apache.catalina.core.StandardContext] Container
org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been
started
18:49:22,492 INFO [com.arjuna.ats.jbossatx] ARJUNA032018: Destroying
TransactionManagerService
18:49:22,493 INFO [com.arjuna.ats.jbossatx] ARJUNA032014: Stopping transaction recovery
manager
[stops here]
{noformat}
A stack trace shows that a thread in org.apache.coyote.http11.Http11Protocol is trying to
open a socket (as a client) using the link local address:
{noformat}
2012-02-20 18:51:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode):
"MSC Shutdown Thread" prio=10 tid=0x00007f32546b0800 nid=0x732b waiting on
condition [0x00007f323aeed000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000f6fd9d70> (a
java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
at
org.jboss.msc.service.ServiceContainerImpl$ShutdownHookHolder$1$1.run(ServiceContainerImpl.java:129)
at java.lang.Thread.run(Thread.java:662)
"SIGINT handler" daemon prio=10 tid=0x00007f3294001800 nid=0x7328 in
Object.wait() [0x00007f32bdae3000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e032d850> (a java.lang.Thread)
at java.lang.Thread.join(Thread.java:1186)
- locked <0x00000000e032d850> (a java.lang.Thread)
at java.lang.Thread.join(Thread.java:1239)
at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:79)
at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:24)
at java.lang.Shutdown.runHooks(Shutdown.java:79)
at java.lang.Shutdown.sequence(Shutdown.java:123)
at java.lang.Shutdown.exit(Shutdown.java:168)
- locked <0x00000000d0711640> (a java.lang.Class for java.lang.Shutdown)
at java.lang.Terminator$1.handle(Terminator.java:35)
at sun.misc.Signal$1.run(Signal.java:195)
at java.lang.Thread.run(Thread.java:662)
"Transaction Reaper Worker 0" daemon prio=10 tid=0x00007f3270150800 nid=0x7327
in Object.wait() [0x00007f323b1f0000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000f696a560> (a java.util.LinkedList)
at java.lang.Object.wait(Object.java:485)
at
com.arjuna.ats.arjuna.coordinator.TransactionReaper.waitForCancellations(TransactionReaper.java:321)
- locked <0x00000000f696a560> (a java.util.LinkedList)
at
com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:65)
"Transaction Reaper" daemon prio=10 tid=0x00007f3270111800 nid=0x7326 in
Object.wait() [0x00007f323b2f1000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000f69662d0> (a
com.arjuna.ats.arjuna.coordinator.TransactionReaper)
at com.arjuna.ats.internal.arjuna.coordinator.ReaperThread.run(ReaperThread.java:90)
- locked <0x00000000f69662d0> (a
com.arjuna.ats.arjuna.coordinator.TransactionReaper)
"http--fe80%3A0%3A0%3A0%3Af2de%3Af1ff%3Afe40%3A75b8%252-8080-Acceptor-0" daemon
prio=10 tid=0x00007f3278019800 nid=0x731f runnable [0x00007f323b9f8000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
- locked <0x00000000f99ebda8> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:462)
at java.net.ServerSocket.accept(ServerSocket.java:430)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:322)
at java.lang.Thread.run(Thread.java:662)
"http--fe80%3A0%3A0%3A0%3Af2de%3Af1ff%3Afe40%3A75b8%252-8080-Poller" daemon
prio=10 tid=0x00007f3278016000 nid=0x731d in Object.wait() [0x00007f323bbfa000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000f9917300> (a
org.apache.tomcat.util.net.JIoEndpoint$Poller)
at org.apache.tomcat.util.net.JIoEndpoint$Poller.run(JIoEndpoint.java:743)
- locked <0x00000000f9917300> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at java.lang.Thread.run(Thread.java:662)
"ContainerBackgroundProcessor[StandardEngine[jboss.web]]" daemon prio=10
tid=0x00007f3274098000 nid=0x731c waiting on condition [0x00007f323bcfb000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)
at java.lang.Thread.run(Thread.java:662)
"DestroyJavaVM" prio=10 tid=0x00007f32c4007800 nid=0x72cd waiting on condition
[0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"MSC service thread 1-8" prio=10 tid=0x00007f327003f000 nid=0x72e3 waiting on
condition [0x00007f32bdcfb000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-7" prio=10 tid=0x00007f327003d800 nid=0x72e2 waiting on
condition [0x00007f32bddfc000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-6" prio=10 tid=0x00007f327003d000 nid=0x72e1 waiting on
condition [0x00007f32bdefd000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-5" prio=10 tid=0x00007f327001b800 nid=0x72e0 runnable
[0x00007f32bdffd000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
- locked <0x00000000f5715910> (a java.net.SocksSocketImpl)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at org.apache.tomcat.util.net.JIoEndpoint.unlockAccept(JIoEndpoint.java:1094)
at org.apache.tomcat.util.net.JIoEndpoint.pause(JIoEndpoint.java:1032)
at org.apache.coyote.http11.Http11Protocol.pause(Http11Protocol.java:229)
at org.apache.catalina.connector.Connector.pause(Connector.java:998)
at org.jboss.as.web.WebConnectorService.stop(WebConnectorService.java:285)
- locked <0x00000000e0500760> (a org.jboss.as.web.WebConnectorService)
at
org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
at
org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-4" prio=10 tid=0x00007f32c4455000 nid=0x72df waiting on
condition [0x00007f32c81ff000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-3" prio=10 tid=0x00007f32c4451800 nid=0x72de waiting on
condition [0x00007f32c8300000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-2" prio=10 tid=0x00007f3274001000 nid=0x72dd waiting on
condition [0x00007f32c8401000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"MSC service thread 1-1" prio=10 tid=0x00007f32c4450000 nid=0x72dc waiting on
condition [0x00007f32c8502000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e028dae8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"Reference Reaper" daemon prio=10 tid=0x00007f32c418f800 nid=0x72db in
Object.wait() [0x00007f32c87da000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000f9844b40> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00000000f9844b40> (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=10 tid=0x00007f32c40bb000 nid=0x72d9 runnable
[0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread2" daemon prio=10 tid=0x00007f32c40b8800 nid=0x72d8 waiting
on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=10 tid=0x00007f32c40b6800 nid=0x72d7 waiting
on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=10 tid=0x00007f32c40b3800 nid=0x72d6 waiting
on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x00007f32c40b1800 nid=0x72d5 waiting on
condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x00007f32c4095000 nid=0x72d4 in Object.wait()
[0x00007f32c8ee1000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e00b24e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00000000e00b24e8> (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=0x00007f32c4093000 nid=0x72d3 in
Object.wait() [0x00007f32c8fe2000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e0098510> (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 <0x00000000e0098510> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=10 tid=0x00007f32c408c800 nid=0x72d2 runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f32c401a800 nid=0x72ce
runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f32c401c800 nid=0x72cf
runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f32c401e000 nid=0x72d0
runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f32c4020000 nid=0x72d1
runnable
"VM Periodic Task Thread" prio=10 tid=0x00007f32c40ce000 nid=0x72da waiting on
condition
JNI global references: 1478
Heap
PSYoungGen total 68480K, used 31452K [0x00000000f5560000, 0x00000000f9ae0000,
0x0000000100000000)
eden space 65792K, 43% used [0x00000000f5560000,0x00000000f717e540,0x00000000f95a0000)
from space 2688K, 98% used [0x00000000f9840000,0x00000000f9ad8c98,0x00000000f9ae0000)
to space 2688K, 0% used [0x00000000f95a0000,0x00000000f95a0000,0x00000000f9840000)
PSOldGen total 43712K, used 8146K [0x00000000e0000000, 0x00000000e2ab0000,
0x00000000f5560000)
object space 43712K, 18% used
[0x00000000e0000000,0x00000000e07f4a68,0x00000000e2ab0000)
PSPermGen total 42368K, used 42286K [0x00000000d0000000, 0x00000000d2960000,
0x00000000e0000000)
object space 42368K, 99% used
[0x00000000d0000000,0x00000000d294ba58,0x00000000d2960000)
{noformat}
When opening a link-local address as a client, the zoneid must be first removed. The
zoneid is only required when opening a server socket, IIUC.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: