Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TestG1OldAllocationPendingStackTrace.java在linux-x64平台上随机失败 #367

Open
sendaoYan opened this issue Jul 28, 2022 · 3 comments
Assignees

Comments

@sendaoYan
Copy link
Collaborator

sendaoYan commented Jul 28, 2022

Description
TestG1OldAllocationPendingStackTrace.java在linux-x64平台上随机失败(超时)

50次失败8次:

image

ACTION: main -- Error. Program `/home/yansendao/software/jdk/2022-05/dragonwell-8.11.12/bin/java' timed out (timeout set to 120000ms, elapsed time including timeout handling was 120429ms).
REASON: User specified action: run main/othervm -XX:MaxNewSize=10M -Xmx128M -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGC jdk.jfr.event.gc.stacktrace.TestG1OldAllocationPendingStackTrace 
TIME:   120.436 seconds
messages:
command: main -XX:MaxNewSize=10M -Xmx128M -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGC jdk.jfr.event.gc.stacktrace.TestG1OldAllocationPendingStackTrace
reason: User specified action: run main/othervm -XX:MaxNewSize=10M -Xmx128M -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGC jdk.jfr.event.gc.stacktrace.TestG1OldAllocationPendingStackTrace 
Mode: othervm [/othervm specified]
Timeout information:
Running jstack on process 660982
2022-07-28 15:51:50
Full thread dump OpenJDK 64-Bit Server VM (25.332-b01 mixed mode):

"Attach Listener" #30 daemon prio=9 os_prio=0 tid=0x00007f2f7c001000 nid=0xa33ab waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JFR Recording Scheduler" #29 daemon prio=5 os_prio=0 tid=0x00007f2f24003800 nid=0xa193f in Object.wait() [0x00007f2f61e23000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000f8413d30> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	- locked <0x00000000f8413d30> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

"JFR Periodic Tasks" #26 daemon prio=5 os_prio=0 tid=0x00007f2f38150800 nid=0xa1938 runnable [0x00007f2f62025000]
   java.lang.Thread.State: RUNNABLE
	at java.util.concurrent.CopyOnWriteArrayList.iterator(CopyOnWriteArrayList.java:1082)
	at jdk.jfr.internal.RequestEngine.run_requests(RequestEngine.java:216)
	at jdk.jfr.internal.RequestEngine.doPeriodic(RequestEngine.java:187)
	at jdk.jfr.internal.PlatformRecorder.periodicTask(PlatformRecorder.java:441)
	at jdk.jfr.internal.PlatformRecorder.lambda$startDiskMonitor$1(PlatformRecorder.java:388)
	at jdk.jfr.internal.PlatformRecorder$$Lambda$41/879278020.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:855)

"JFR Recorder Thread" #25 daemon prio=5 os_prio=0 tid=0x00007f2f38111800 nid=0xa1877 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"MainThread" #23 prio=5 os_prio=0 tid=0x00007f30e03be000 nid=0xa17ca runnable [0x00007f2f633ca000]
   java.lang.Thread.State: RUNNABLE
	at jdk.jfr.event.gc.stacktrace.OldGenMemoryAllocator.allocate(AllocationStackTrace.java:89)
	at jdk.jfr.event.gc.stacktrace.AllocationStackTrace.allocAndCheck(AllocationStackTrace.java:425)
	at jdk.jfr.event.gc.stacktrace.AllocationStackTrace.testAllocEvent(AllocationStackTrace.java:391)
	at jdk.jfr.event.gc.stacktrace.AllocationStackTrace.testG1OldAllocEvent(AllocationStackTrace.java:331)
	at jdk.jfr.event.gc.stacktrace.TestG1OldAllocationPendingStackTrace.main(TestG1OldAllocationPendingStackTrace.java:39)
	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)

"Service Thread" #21 daemon prio=9 os_prio=0 tid=0x00007f30e0314000 nid=0xa17c0 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread14" #20 daemon prio=9 os_prio=0 tid=0x00007f30e0311000 nid=0xa17bf waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread13" #19 daemon prio=9 os_prio=0 tid=0x00007f30e030f000 nid=0xa17b9 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread12" #18 daemon prio=9 os_prio=0 tid=0x00007f30e030d000 nid=0xa17b7 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread11" #17 daemon prio=9 os_prio=0 tid=0x00007f30e030b000 nid=0xa17b6 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread10" #16 daemon prio=9 os_prio=0 tid=0x00007f30e0309000 nid=0xa17b5 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread9" #15 daemon prio=9 os_prio=0 tid=0x00007f30e0306800 nid=0xa17b4 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread8" #14 daemon prio=9 os_prio=0 tid=0x00007f30e0304800 nid=0xa17b3 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread7" #13 daemon prio=9 os_prio=0 tid=0x00007f30e0302800 nid=0xa17ae waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread6" #12 daemon prio=9 os_prio=0 tid=0x00007f30e0300800 nid=0xa17ad waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread5" #11 daemon prio=9 os_prio=0 tid=0x00007f30e02fe800 nid=0xa17ac waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread4" #10 daemon prio=9 os_prio=0 tid=0x00007f30e02fc800 nid=0xa17a5 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread3" #9 daemon prio=9 os_prio=0 tid=0x00007f30e02fa800 nid=0xa1799 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #8 daemon prio=9 os_prio=0 tid=0x00007f30e02f8800 nid=0xa1798 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=0 tid=0x00007f30e02f6800 nid=0xa1789 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f30e02f4000 nid=0xa1785 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #5 daemon prio=9 os_prio=0 tid=0x00007f30e02f2000 nid=0xa177d runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=0 tid=0x00007f30e02f0800 nid=0xa1777 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f30e02b3800 nid=0xa175c in Object.wait() [0x00007f2f9d224000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000f8080e80> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
	- locked <0x00000000f8080e80> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:287)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f30e02b1800 nid=0xa1755 in Object.wait() [0x00007f2f9d325000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
	- locked <0x00000000f8081050> (a java.lang.ref.Reference$Lock)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"main" #1 prio=5 os_prio=0 tid=0x00007f30e000d000 nid=0xa1602 in Object.wait() [0x00007f30e4f28000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000f807e8e8> (a java.lang.Thread)
	at java.lang.Thread.join(Thread.java:1399)
	- locked <0x00000000f807e8e8> (a java.lang.Thread)
	at java.lang.Thread.join(Thread.java:1473)
	at com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:74)

15.log
28.log
33.log

Steps to Reproduce
Steps to reproduce the behavior:

test=jdk/test/jdk/jfr/event/gc/stacktrace/TestG1OldAllocationPendingStackTrace.java
nproc=`nproc` ; dir="tmp-jtreg-"`basename $test .java` ; rm -rf $dir ; mkdir -p $dir ; time seq 50 | xargs -i -n 1 -P `expr $nproc / 2` bash -c "jtreg -timeoutFactor:1 -v:fail,error,time,nopass -nr -w $dir/index-{} $test &> $dir/{}.log ; grep 'Test results: passed: 1' -L $dir/{}.log"

Expected behavior
run pass everytime

JDK version

openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Alibaba Dragonwell 8.11.12) (build 1.8.0_332-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell 8.11.12) (build 25.332-b01, mixed mode)

Execution environment
image

@sendaoYan
Copy link
Collaborator Author

sendaoYan commented Jul 28, 2022

减小最大堆之后,运行200次均pass:

image

@sendaoYan
Copy link
Collaborator Author

最大堆的修改,在aarch64平台上验证通过

image

sendaoYan added a commit that referenced this issue Jul 28, 2022
Summary: fix testcase bug TestG1OldAllocationPendingStackTrace.java, which intermittently fail on linux-x64

Test Plan: CI pipeline

Reviewed-by: lei.yul, lvfei.lv

Issue: #367
sendaoYan added a commit that referenced this issue Aug 23, 2022
Summary: fix testcase bug TestG1OldAllocationPendingStackTrace.java, which intermittently fail on linux-x64

Test Plan: CI pipeline

Reviewed-by: lei.yul, lvfei.lv

Issue: #367
@sendaoYan sendaoYan self-assigned this Jan 22, 2024
@sendaoYan
Copy link
Collaborator Author

可以考虑合并到上游

@sendaoYan sendaoYan reopened this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant