From 1a80b71767ea2a6796b91999f59097e4f7740117 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 21 Feb 2025 09:00:44 -0800 Subject: [PATCH] Capture core dump files from tests When running Elasticsearch in tests we occassionally have JDK crashes. It's important to capture the state of the JVM at the time of the crash. We currently capture the hs_err_pid file for the crash, but the resulting core file exists in a directory that is no captured. This commit adjusts the capture patterns to also get core files. --- .../gradle/internal/ElasticsearchBuildCompletePlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchBuildCompletePlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchBuildCompletePlugin.java index b1207a2f5161d..065a57f801c9e 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchBuildCompletePlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchBuildCompletePlugin.java @@ -110,6 +110,8 @@ private List resolveProjectLogs(File projectDir) { projectDirFiles.include("**/build/testrun/*/temp/**"); projectDirFiles.include("**/build/**/hs_err_pid*.log"); projectDirFiles.include("**/build/**/replay_pid*.log"); + // core dump files are in the working directory of the installation, which is not project specific + projectDirFiles.include("distribution/**/build/install/*/core.*"); projectDirFiles.exclude("**/build/testclusters/**/data/**"); projectDirFiles.exclude("**/build/testclusters/**/distro/**"); projectDirFiles.exclude("**/build/testclusters/**/repo/**");