RFR(XS) 8242789: sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with 'JShellToolProvider' missing from stdout/stderr
    Chris Plummer 
    chris.plummer at oracle.com
       
    Fri Apr 17 17:30:06 UTC 2020
    
    
  
Hello,
Please review the following:
https://bugs.openjdk.java.net/browse/JDK-8242789
http://cr.openjdk.java.net/~cjplummer/8242789/webrev.00
JShellHeapDumpTest.java has two variants, one that does a short 2 second 
sleep after launching the jshell process (the main 
JShellHeapDumpTest.java test does this) and the other that does no sleep 
(HeapDumpTestWithActiveProcess.java does this by invoking 
JShellHeapDumpTest.java with the "nosleep" argument).
The reason for the 2 second sleep is to get the jshell process into a 
steady state so JDK-8231634 [1] doesn't turn up when using SA on the 
jshell process. I added the sleep instead of problem listing 
JShellHeapDumpTest.java since it is a useful  test even with the sleep 
in place. HeapDumpTestWithActiveProcess.java was added so we still had a 
test to reproduce JDK-8231634 [1], and was problem listed immediately. 
However, another side affect of not sleeping is sometimes SA requests 
the thread dump of the jshell process before jshell enters its main 
thread. Thus the test can't find the "JShellToolProvider" symbol in the 
thread dump. The fix is to simply not require the symbol to be present 
when in "nosleep" mode.
thanks,
Chris
[1] https://bugs.openjdk.java.net/browse/JDK-8231634
    
    
More information about the serviceability-dev
mailing list