nsk/stress/stack/b4525850 hangs when tried to load classes on Solaris SPARC machines in JDK 7u4 b19
Problem wasn't found on linux machines.
According to jstack all threads except daemons are in a waiting state. The problem is in thread "AWT-EventQueue-0"
that can't lock and waits for it. See jstack_log file:
"AWT-EventQueue-0" prio=3 tid=0x00b2f400 nid=0xf waiting on condition [0xd8b8c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xdee4c3d0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
at java.util.concurrent.ConcurrentHashMap$Segment.scanAndLockForPut(ConcurrentHashMap.java:504)
at java.util.concurrent.ConcurrentHashMap$Segment.put(ConcurrentHashMap.java:366)
at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1084)
at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:462)
at java.lang.ClassLoader.loadClass(ClassLoader.java:403)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at nsk.stress.stack.b4525850.b4525850$MyJTextArea.paint(b4525850.java:71)
...
See also jmap_log and pstack_log files.
Also problem appears in "VM JFR Buffer Thread", see jstack_log_JFR_thread file:
"VM JFR Buffer Thread" daemon prio=3 tid=0x00ab1c00 nid=0x7 waiting on condition [0xd967a000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xd9cd72e8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
at java.util.concurrent.ConcurrentHashMap$Segment.scanAndLockForPut(ConcurrentHashMap.java:504)
at java.util.concurrent.ConcurrentHashMap$Segment.put(ConcurrentHashMap.java:366)
at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1084)
at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:462)
at java.lang.ClassLoader.loadClass(ClassLoader.java:403)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredConstructors0(Native Method)
...
VM options set during promotion testing:
-client -Xcomp -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true -XX:ReservedCodeCacheSize=256M
Tried to run with and without JFR but got the same results, see jstack_log_without_JFR.
Running with vm options "-client -Xmixed" results the same.
Reproduces on vm-t6320-01b, bur398-217.
Reproduceses on builds: 19, 17, 14. Builds with other numbers have not been tested.
Steps to reproduce:
1. ssh to vm-t6320-01b
2. cd to /import/gtee/pavel/reproduce_b4525850/
3. In folder you can find shell scripts run* to reproduce with appropriate options and builds. You can run them. Test may not hang during the first run.
File rerun.sh is generated from Aurora. It hangs every run on this machine.
4. Also in subfolder "results" there are folders with jstack and pstack log files for each run I made.