JDK-8337680 : failure_handler does not handle repeated commands well
  • Type: Bug
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-08-01
  • Updated: 2024-12-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
In common_properties we have:

onTimeout=\
  jinfo \
  jcmd.compiler.codecache jcmd.compiler.codelist \
        jcmd.compiler.queue \
  jcmd.vm.classloader_stats jcmd.vm.stringtable \
        jcmd.vm.symboltable jcmd.vm.uptime jcmd.vm.dynlibs \
        jcmd.vm.system_properties jcmd.vm.info \
  jcmd.gc.heap_info jcmd.gc.class_histogram jcmd.gc.finalizer_info jcmd.thread.dump_to_file \
  jstack jhsdb.jstack.live.default jhsdb.jstack.live.mixed

I tried repeating the jhsdb.jstack.live.mixed command, moving the new entry near the top. I was debugging some issues where the state of the JVM actually changed while executing these commands, and I wanted to see the stack differences. The resulting processes.html did not work properly. Although you will see two different jhsdb.jstack.live.mixed entries, clicks on the links for the 2nd one act as if the click was on the first one, so there is no way to actually review the results of the 2nd one.

I also noticed that the tool name hierarchies are rigid. Something like the following won't work:

onTimeout=\
    jcmd.compiler.codecache \
    jinfo \
    jcmd.compiler.codelist

Similar to the first problem, if you click on the second "jcmd" in an attempt to expand to jcmd.compiler.codelist, it acts as if you clicked on the first "jcmd" belonging to jcmd.compiler.codecache. There is no way to get to the jcmd.compiler.codelist results.
Comments
The workaround for both issues is to use different names for the command. For example: onTimeout=\ jcmd.compiler.codecache \ jinfo \ jcmd2.compiler.codelist Note the name change needs to be at the toplevel because you need to click on "jcmd" first. If you want to execute a command twice, you can give the 2nd version a different name: onTimeout=\ jhsdb.jstack.live.mixed \ jinfo \ jhsdb2.jstack.live.mixed Of course you also need to define these extra or renamed commands.
01-08-2024