JDK-8286333 : "queue must be flushed before delete" after JDK-8284632
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2022-05-06
  • Updated: 2022-06-06
  • Resolved: 2022-06-06
Related Reports
Relates :  
Relates :  
Description
runtime/Thread/StopAtExit.java intermittently fails like this:

$ CONF=linux-x86_64-server-fastdebug make run-test TEST=runtime/Thread/StopAtExit.java TEST_VM_OPTS=-XX:+UseShenandoahGC JTREG="REPEAT_COUNT=10"

#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/gc/shared/ptrQueue.cpp:38), pid=2534211, tid=2606915
#  assert(_buf == __null) failed: queue must be flushed before delete

Current thread (0x00007ffb4c057890):  Thread "Unknown thread" [stack: 0x00007ffb91989000,0x00007ffb91a8a000] [id=2606915]

Stack: [0x00007ffb91989000,0x00007ffb91a8a000],  sp=0x00007ffb91a88da0,  free space=1023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1724fb3]  PtrQueue::~PtrQueue()+0x33
V  [libjvm.so+0x1a57315]  Thread::~Thread()+0x335
V  [libjvm.so+0x1a57499]  JavaThread::~JavaThread()+0x139
V  [libjvm.so+0x1a57536]  JavaThread::~JavaThread()+0x16
V  [libjvm.so+0x1a70b73]  ThreadsSMRSupport::smr_delete(JavaThread*)+0x43
V  [libjvm.so+0x1a63151]  Thread::call_run()+0x171
V  [libjvm.so+0x163856c]  thread_native_entry(Thread*)+0x10c

Bisect points to JDK-8284632 as the first bad commit.
Comments
I suspect this is a duplicate of JDK-8286830, I'll retest after that one is fixed.
20-05-2022

How do we get from the Thread destructor to a PtrQueue destructor? Where is that PtrQueue?
09-05-2022

Hmmmm... we're not seeing this test fail in Mach5 and I'm not seeing this test fail in stress testing in my lab. However, I don't believe that we run with Shenandoah in Mach5 and I definitely don't test with Shenandoah in my lab.
06-05-2022