Skip to content

Commit c7ba65b

Browse files
author
Hendrik Muhs
committed
add version information in case of crash of native ML process
1 parent 712473b commit c7ba65b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,15 @@ private void parseMessage(XContent xContent, BytesReference bytesRef) {
283283
if (upstreamMessage.contains("bad_alloc")) {
284284
upstreamMessage += ", process ran out of memory.";
285285
}
286+
287+
// add version information, so it's conveniently next to the crash log
288+
upstreamMessage += ", version: ";
289+
try {
290+
upstreamMessage += getCppCopyright(Duration.ofMillis(10));
291+
} catch (TimeoutException timeoutException) {
292+
upstreamMessage += "failed to retrieve";
293+
}
294+
286295
storeError(upstreamMessage);
287296
seenFatalError = true;
288297
} catch (IOException e) {

0 commit comments

Comments
 (0)