martin-g commented on pull request #382:
URL: https://github.com/apache/tomcat/pull/382#issuecomment-743155616
There is some issue with stopping an embedded Tomcat:
```
=== Started
^CDec 11, 2020 11:59:45 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["https-openssl-apr-/tmp/tomcat-uds.sock"]
Dec 11, 2020 11:59:45 AM org.apache.catalina.core.StandardService
stopInternal
INFO: Stopping service [Tomcat]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by
org.apache.catalina.loader.WebappClassLoaderBase
(file:/home/ubuntu/git/mg.solutions/http2-server-perf-tests/java/tomcat/target/tomcat-embedded-1.0-SNAPSHOT.jar)
to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of
org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
Dec 11, 2020 11:59:45 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["https-openssl-apr-/tmp/tomcat-uds.sock"]
Dec 11, 2020 11:59:55 AM org.apache.tomcat.util.net.Acceptor stop
WARNING: The acceptor thread
[https-openssl-apr-/tmp/tomcat-uds.sock-Acceptor] did not stop cleanly
=== Stopped
```
and the application hangs.
Thread dump:
```
2020-12-11 12:02:45
Full thread dump OpenJDK 64-Bit Server VM (16-ea+26-1764 mixed mode):
Threads class SMR info:
_java_thread_list=0x0000ffff806d7a50, length=14, elements={
0x0000ffff801d1390, 0x0000ffff801d2b30, 0x0000ffff801ffda0,
0x0000ffff802012e0,
0x0000ffff80202810, 0x0000ffff802042e0, 0x0000ffff802058e0,
0x0000ffff80206e70,
0x0000ffff80297670, 0x0000ffff802a23f0, 0x0000ffff80697560,
0x0000fffef8001100,
0x0000ffff806e3050, 0x0000ffff800248b0
}
"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=0.42ms elapsed=413.75s
tid=0x0000ffff801d1390 nid=0x2c113f waiting on condition [0x0000ffff609fc000]
java.lang.Thread.State: RUNNABLE
at
java.lang.ref.Reference.waitForReferencePendingList(java.base@16-ea/Native
Method)
at
java.lang.ref.Reference.processPendingReferences(java.base@16-ea/Reference.java:243)
at
java.lang.ref.Reference$ReferenceHandler.run(java.base@16-ea/Reference.java:215)
"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0.46ms elapsed=413.75s
tid=0x0000ffff801d2b30 nid=0x2c1140 in Object.wait() [0x0000ffff607fc000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@16-ea/Native Method)
- waiting on <0x00000007148016c8> (a
java.lang.ref.ReferenceQueue$Lock)
at
java.lang.ref.ReferenceQueue.remove(java.base@16-ea/ReferenceQueue.java:155)
- locked <0x00000007148016c8> (a java.lang.ref.ReferenceQueue$Lock)
at
java.lang.ref.ReferenceQueue.remove(java.base@16-ea/ReferenceQueue.java:176)
at
java.lang.ref.Finalizer$FinalizerThread.run(java.base@16-ea/Finalizer.java:171)
"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0.53ms elapsed=413.75s
tid=0x0000ffff801ffda0 nid=0x2c1141 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Service Thread" #5 daemon prio=9 os_prio=0 cpu=0.38ms elapsed=413.75s
tid=0x0000ffff802012e0 nid=0x2c1142 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Monitor Deflation Thread" #6 daemon prio=9 os_prio=0 cpu=2.44ms
elapsed=413.75s tid=0x0000ffff80202810 nid=0x2c1143 runnable
[0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #7 daemon prio=9 os_prio=0 cpu=439.33ms elapsed=413.75s
tid=0x0000ffff802042e0 nid=0x2c1144 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task
"C1 CompilerThread0" #10 daemon prio=9 os_prio=0 cpu=605.34ms
elapsed=413.75s tid=0x0000ffff802058e0 nid=0x2c1145 waiting on condition
[0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task
"Sweeper thread" #11 daemon prio=9 os_prio=0 cpu=0.09ms elapsed=413.75s
tid=0x0000ffff80206e70 nid=0x2c1146 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Notification Thread" #12 daemon prio=9 os_prio=0 cpu=0.10ms elapsed=413.72s
tid=0x0000ffff80297670 nid=0x2c1147 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Common-Cleaner" #13 daemon prio=8 os_prio=0 cpu=0.69ms elapsed=413.71s
tid=0x0000ffff802a23f0 nid=0x2c1149 in Object.wait() [0x0000ffff50ffc000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(java.base@16-ea/Native Method)
- waiting on <0x0000000714802c70> (a
java.lang.ref.ReferenceQueue$Lock)
at
java.lang.ref.ReferenceQueue.remove(java.base@16-ea/ReferenceQueue.java:155)
- locked <0x0000000714802c70> (a java.lang.ref.ReferenceQueue$Lock)
at
jdk.internal.ref.CleanerImpl.run(java.base@16-ea/CleanerImpl.java:140)
at java.lang.Thread.run(java.base@16-ea/Thread.java:831)
at
jdk.internal.misc.InnocuousThread.run(java.base@16-ea/InnocuousThread.java:134)
"Catalina-utility-1" #15 prio=1 os_prio=0 cpu=22.45ms elapsed=412.77s
tid=0x0000ffff80697560 nid=0x2c1151 waiting on condition [0x0000ffff127fd000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@16-ea/Native Method)
- parking to wait for <0x00000007149aaa60> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.park(java.base@16-ea/LockSupport.java:341)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(java.base@16-ea/AbstractQueuedSynchronizer.java:505)
at
java.util.concurrent.ForkJoinPool.managedBlock(java.base@16-ea/ForkJoinPool.java:3137)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@16-ea/AbstractQueuedSynchronizer.java:1614)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@16-ea/ScheduledThreadPoolExecutor.java:1177)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@16-ea/ScheduledThreadPoolExecutor.java:899)
at
java.util.concurrent.ThreadPoolExecutor.getTask(java.base@16-ea/ThreadPoolExecutor.java:1056)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@16-ea/ThreadPoolExecutor.java:1116)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@16-ea/ThreadPoolExecutor.java:630)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(java.base@16-ea/Thread.java:831)
"Catalina-utility-2" #16 prio=1 os_prio=0 cpu=22.19ms elapsed=412.77s
tid=0x0000fffef8001100 nid=0x2c1152 waiting on condition [0x0000ffff125fd000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@16-ea/Native Method)
- parking to wait for <0x00000007149aaa60> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.park(java.base@16-ea/LockSupport.java:341)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(java.base@16-ea/AbstractQueuedSynchronizer.java:505)
at
java.util.concurrent.ForkJoinPool.managedBlock(java.base@16-ea/ForkJoinPool.java:3137)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@16-ea/AbstractQueuedSynchronizer.java:1614)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@16-ea/ScheduledThreadPoolExecutor.java:1170)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@16-ea/ScheduledThreadPoolExecutor.java:899)
at
java.util.concurrent.ThreadPoolExecutor.getTask(java.base@16-ea/ThreadPoolExecutor.java:1056)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@16-ea/ThreadPoolExecutor.java:1116)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@16-ea/ThreadPoolExecutor.java:630)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(java.base@16-ea/Thread.java:831)
"https-openssl-apr-/tmp/tomcat-uds.sock-Acceptor" #28 daemon prio=5
os_prio=0 cpu=0.24ms elapsed=412.76s tid=0x0000ffff806e3050 nid=0x2c115e
runnable [0x0000ffff10dfe000]
java.lang.Thread.State: RUNNABLE
at org.apache.tomcat.jni.Socket.accept(Native Method)
at
org.apache.tomcat.util.net.AprEndpoint.serverSocketAccept(AprEndpoint.java:729)
at
org.apache.tomcat.util.net.AprEndpoint.serverSocketAccept(AprEndpoint.java:82)
at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:106)
at java.lang.Thread.run(java.base@16-ea/Thread.java:831)
"DestroyJavaVM" #30 prio=5 os_prio=0 cpu=1003.31ms elapsed=169.91s
tid=0x0000ffff800248b0 nid=0x2c1138 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"VM Thread" os_prio=0 cpu=8.42ms elapsed=413.76s tid=0x0000ffff801c2f70
nid=0x2c113e runnable
"GC Thread#0" os_prio=0 cpu=5.94ms elapsed=413.78s tid=0x0000ffff80073930
nid=0x2c1139 runnable
"GC Thread#1" os_prio=0 cpu=4.91ms elapsed=412.94s tid=0x0000ffff48004f60
nid=0x2c114c runnable
"GC Thread#2" os_prio=0 cpu=4.92ms elapsed=412.94s tid=0x0000ffff48005af0
nid=0x2c114d runnable
"GC Thread#3" os_prio=0 cpu=4.90ms elapsed=412.94s tid=0x0000ffff48006680
nid=0x2c114e runnable
"GC Thread#4" os_prio=0 cpu=4.87ms elapsed=412.94s tid=0x0000ffff48007210
nid=0x2c114f runnable
"GC Thread#5" os_prio=0 cpu=4.88ms elapsed=412.94s tid=0x0000ffff48007da0
nid=0x2c1150 runnable
"G1 Main Marker" os_prio=0 cpu=0.11ms elapsed=413.78s tid=0x0000ffff800848c0
nid=0x2c113a runnable
"G1 Conc#0" os_prio=0 cpu=0.06ms elapsed=413.78s tid=0x0000ffff80085950
nid=0x2c113b runnable
"G1 Refine#0" os_prio=0 cpu=0.08ms elapsed=413.78s tid=0x0000ffff8013ac50
nid=0x2c113c runnable
"G1 Service" os_prio=0 cpu=15.07ms elapsed=413.78s tid=0x0000ffff8013bc70
nid=0x2c113d runnable
"VM Periodic Task Thread" os_prio=0 cpu=45.58ms elapsed=413.72s
tid=0x0000ffff80299160 nid=0x2c1148 waiting on condition
JNI global refs: 27, weak refs: 0
Heap
garbage-first heap total 256000K, used 17190K [0x0000000706600000,
0x0000000800000000)
region size 2048K, 9 young (18432K), 2 survivors (4096K)
Metaspace used 19940K, committed 20160K, reserved 1073152K
class space used 1918K, committed 2048K, reserved 1048576K
```
The application I use to test it could be found at
https://github.com/martin-g/http2-server-perf-tests/blob/feature/jakartaee-9/java/tomcat/src/main/java/info/mgsolutions/tomcat/TomcatEmbedded.java
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]