dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.21k stars 497 forks source link

com/alibaba/wisp2/yield/YieldTimerTest.java随机超时 #478

Open sendaoYan opened 1 year ago

sendaoYan commented 1 year ago
"Attach Listener" #37 daemon prio=9 os_prio=0 tid=0x00007ff850002700 nid=0x2bcaf2 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Wisp-Prevent-Shutdown-0" #34 prio=5 os_prio=0 tid=0x00007ffa6c65cdc0 nid=0x1134d3 runnable [0x00007ff87cce3000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000008045f970> (a com.alibaba.wisp.engine.ThreadAsWisp$PreventShutdownThread)
    at java.lang.Object.wait(Object.java:502)
    at com.alibaba.wisp.engine.ThreadAsWisp$PreventShutdownThread.run(ThreadAsWisp.java:151)
    - waiting to lock <0x000000008045f970> (a com.alibaba.wisp.engine.ThreadAsWisp$PreventShutdownThread)
"Surrogate Locker Thread (Concurrent GC)" #8 daemon prio=9 os_prio=0 tid=0x00007ffa6c579760 nid=0x113049 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Wisp-Root-Worker-0" #4 daemon prio=5 os_prio=0 tid=0x00007ffa6c577f00 nid=0x113020 runnable [0x00007ffa736fe000]
   java.lang.Thread.State: RUNNABLE
    at YieldTimerTest.lambda$main$1(YieldTimerTest.java:48)
    at YieldTimerTest$$Lambda$8/1490596543.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:855)
    at com.alibaba.wisp.engine.WispTask.runOutsideWisp(WispTask.java:299)
    at com.alibaba.wisp.engine.WispTask.runCommand(WispTask.java:274)
    at com.alibaba.wisp.engine.WispTask.access$100(WispTask.java:53)
    at com.alibaba.wisp.engine.WispTask$CacheableCoroutine.run(WispTask.java:241)
    at java.dyn.CoroutineBase.startInternal(CoroutineBase.java:62)

 - Coroutine [0x7ff85800a680] "Thread-2" #6 active=1 steal=0 steal_fail=0 preempt=4800 park=0/0 containerId=0 cg=0/0 ttr=0

 - Coroutine [0x7ff858000c80] "Wisp-Root-Worker-0" #3 active=2 steal=0 steal_fail=0 preempt=0 park=0/0 containerId=0 cg=0/0 ttr=0
    at java.dyn.CoroutineSupport.unsafeSymmetricYieldTo(CoroutineSupport.java:140)
    at com.alibaba.wisp.engine.WispTask.switchTo(WispTask.java:329)
    at com.alibaba.wisp.engine.WispCarrier.yieldTo(WispCarrier.java:436)
    at com.alibaba.wisp.engine.WispCarrier.runTaskInternal(WispCarrier.java:150)
    at com.alibaba.wisp.engine.TaskDispatcher.run(TaskDispatcher.java:45)
    at com.alibaba.wisp.engine.WispScheduler.doExec(WispScheduler.java:536)
    at com.alibaba.wisp.engine.WispScheduler.access$600(WispScheduler.java:43)
    at com.alibaba.wisp.engine.WispScheduler$Worker.runCarrier(WispScheduler.java:161)
    at com.alibaba.wisp.engine.WispScheduler$Worker.run(WispScheduler.java:141)
    at java.lang.Thread.run(Thread.java:855)

 - Coroutine [0x7ff858009020] "pool-1-thread-1" #5 active=1 steal=0 steal_fail=0 preempt=0 park=0/-1 containerId=0 cg=0/0 ttr=0
    at java.dyn.CoroutineSupport.unsafeSymmetricYieldTo(CoroutineSupport.java:140)
    at com.alibaba.wisp.engine.WispTask.switchTo(WispTask.java:329)
    at com.alibaba.wisp.engine.WispCarrier.yieldTo(WispCarrier.java:436)
    at com.alibaba.wisp.engine.WispCarrier.schedule(WispCarrier.java:274)
    at com.alibaba.wisp.engine.WispTask.parkInternal(WispTask.java:421)
    at com.alibaba.wisp.engine.WispTask.jdkPark(WispTask.java:473)
    at com.alibaba.wisp.engine.WispTask.sleep(WispTask.java:357)
    at com.alibaba.wisp.engine.WispEngine$5.sleep(WispEngine.java:247)
    at java.lang.Thread.sleep(Thread.java:386)
    at YieldTimerTest.lambda$main$0(YieldTimerTest.java:40)
    at YieldTimerTest$$Lambda$7/955731440.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:855)
    at com.alibaba.wisp.engine.WispTask.runOutsideWisp(WispTask.java:299)
    at com.alibaba.wisp.engine.WispTask.runCommand(WispTask.java:274)
    at com.alibaba.wisp.engine.WispTask.access$100(WispTask.java:53)
    at com.alibaba.wisp.engine.WispTask$CacheableCoroutine.run(WispTask.java:241)
    at java.dyn.CoroutineBase.startInternal(CoroutineBase.java:62)

 - Coroutine [0x7ff858003220] "MainThread" #4 active=1 steal=0 steal_fail=0 preempt=0 park=0/-1 containerId=0 cg=0/0 ttr=0
    at java.dyn.CoroutineSupport.unsafeSymmetricYieldTo(CoroutineSupport.java:140)
    - parking to wait for  <0x00000000838ab100> (a java.util.concurrent.FutureTask)
    at com.alibaba.wisp.engine.WispTask.switchTo(WispTask.java:329)
    at com.alibaba.wisp.engine.WispCarrier.yieldTo(WispCarrier.java:436)
    at com.alibaba.wisp.engine.WispCarrier.schedule(WispCarrier.java:274)
    at com.alibaba.wisp.engine.WispTask.parkInternal(WispTask.java:421)
    at com.alibaba.wisp.engine.WispTask.jdkPark(WispTask.java:473)
    at com.alibaba.wisp.engine.WispEngine$5.park(WispEngine.java:268)
    at sun.misc.Unsafe.park(Unsafe.java:1034)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:216)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:426)
    at java.util.concurrent.FutureTask.get(FutureTask.java:204)
    at YieldTimerTest.main(YieldTimerTest.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
    at java.lang.Thread.run(Thread.java:855)
    at com.alibaba.wisp.engine.WispTask.runOutsideWisp(WispTask.java:299)
    at com.alibaba.wisp.engine.WispTask.runCommand(WispTask.java:274)
    at com.alibaba.wisp.engine.WispTask.access$100(WispTask.java:53)
    at com.alibaba.wisp.engine.WispTask$CacheableCoroutine.run(WispTask.java:241)
    at java.dyn.CoroutineBase.startInternal(CoroutineBase.java:62)

"Wisp-Sysmon" #7 daemon prio=5 os_prio=0 tid=0x00007ffa6c5766c0 nid=0x112ff2 waiting on condition [0x00007ff87e7fe000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park0(Native Method)
    at sun.misc.Unsafe.access$200(Unsafe.java:45)
    at sun.misc.Unsafe$1.park0(Unsafe.java:65)
    at com.alibaba.wisp.engine.WispSysmon.sysmonLoop(WispSysmon.java:72)
    at com.alibaba.wisp.engine.WispSysmon$$Lambda$4/1828972342.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:855)

"Wisp-Unpark-Dispatcher" #6 daemon prio=5 os_prio=0 tid=0x00007ffa6c574cf0 nid=0x112fc3 runnable [0x00007ff87ebfe000]
   java.lang.Thread.State: RUNNABLE
    at com.alibaba.wisp.engine.WispEngine.getProxyUnpark(Native Method)
    at com.alibaba.wisp.engine.WispEngine.access$000(WispEngine.java:60)
    at com.alibaba.wisp.engine.WispEngine$4.run(WispEngine.java:185)
    at java.lang.Thread.run(Thread.java:855)

"Wisp-Timer" #5 daemon prio=5 os_prio=0 tid=0x00007ffa6c4fbed0 nid=0x112a08 waiting on condition [0x00007ff87efbe000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park0(Native Method)
    - parking to wait for  <0x0000000080238388> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at sun.misc.Unsafe.access$200(Unsafe.java:45)
    at sun.misc.Unsafe$1.park0(Unsafe.java:65)
    at com.alibaba.wisp.engine.WispTask.parkInternal(WispTask.java:423)
    at com.alibaba.wisp.engine.WispTask.jdkPark(WispTask.java:473)
    at com.alibaba.wisp.engine.WispEngine$5.park(WispEngine.java:268)
    at sun.misc.Unsafe.park(Unsafe.java:1029)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:176)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2047)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:855)

"main" #1 prio=5 os_prio=0 tid=0x00007ffa6c00afd0 nid=0x111fa5 waiting on condition [0x00007ffa766a1000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park0(Native Method)
    at sun.misc.Unsafe.access$200(Unsafe.java:45)
    at sun.misc.Unsafe$1.park0(Unsafe.java:65)
    at com.alibaba.wisp.engine.WispTask.parkInternal(WispTask.java:423)
    at com.alibaba.wisp.engine.WispTask.park(WispTask.java:484)
    at java.lang.Object.wait(Native Method)
    at java.lang.Thread.join(Thread.java:1399)
    - waiting to lock <0x0000000080443aa8> (a java.lang.Thread)
    at java.lang.Thread.join(Thread.java:1473)
    at com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:74)

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/145628?tab=1

replay command:

test=jdk/test/com/alibaba/wisp2/yield/YieldTimerTest.java
nproc=`nproc` ; dir="tmp-jtreg-"`basename $test .java` ; rm -rf $dir ; mkdir -p $dir ; time seq 500 | xargs -i -n 1 -P $nproc bash -c "jtreg -timeoutFactor:8 -v:fail,error,time,nopass -nr -w $dir/index-{} $test &> $dir/{}.log ; grep 'Test results: passed: 1' -L $dir/{}.log"

978.log 96.log 939.log 932.log 927.log 917.log 914.log 894.log 866.log