Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8367026

Reorder the timeout failure handler commands to have jstack run before the rest

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • infrastructure
    • None

      jtreg allows for running failure handlers when a test fails or times out. For the JDK, we have configured the "onTimeout" failure handler to run several commands. Right now those are:

      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 jcmd.thread.vthread_scheduler \
        jstack jhsdb.jstack.live.default jhsdb.jstack.live.mixed

      When a test fails due to timeout, it's much more useful to "immediately" generate thread dumps so that we can capture whatever was going on when that test timed out (but was still running). Delaying these thread dumps (even for a few seconds) can sometimes cause the test to complete during that period and some crucial details of the test execution may not be available in the thread dumps.

      Reordering those onTimeout commands to have jstack (and other related stack generating commands) to the beginning of that list would be useful.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: