From 17d8fa8e421db67027c9e7d2ddd634ff0b897cb6 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Wed, 1 Oct 2025 01:40:06 +0000 Subject: [PATCH] 8367026: Reorder the timeout failure handler commands to have jstack run before the rest Reviewed-by: erikj, lmesnik --- .../src/share/conf/common.properties | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/failure_handler/src/share/conf/common.properties b/test/failure_handler/src/share/conf/common.properties index 5cd2c1c13ca..295a7458d4b 100644 --- a/test/failure_handler/src/share/conf/common.properties +++ b/test/failure_handler/src/share/conf/common.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,13 @@ args=%p ################################################################################ # process info to gather ################################################################################ +# It's important to retain the order of these actions and run the thread dump +# generating commands before the rest, to allow for capturing the test +# process' call stack as soon as the timeout has occurred. That reduces the chances +# of the test completing and thus missing crucial details from the thread dump +# while these timeout actions were being run. onTimeout=\ + thread_dump \ jinfo \ jcmd.compiler.codecache jcmd.compiler.codelist \ jcmd.compiler.queue \ @@ -63,9 +69,13 @@ jcmd.thread.dump_to_file.params.successArtifacts=JavaThread.dump.%p.%iterCount jcmd.thread.vthread_scheduler.args=%p Thread.vthread_scheduler +# use jstack to generate one thread dump +thread_dump.app=jstack +thread_dump.args=-e -l %p + jstack.app=jstack jstack.args=-e -l %p -jstack.params.repeat=6 +jstack.params.repeat=5 jhsdb.app=jhsdb jhsdb.jstack.live.default.args=jstack --pid %p