You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ga...@apache.org on 2020/05/18 14:10:36 UTC
[flink] branch release-1.11 updated: [FLINK-17792][tests] Catch and
log exception if jstack fails
This is an automated email from the ASF dual-hosted git repository.
gary pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.11 by this push:
new d8a77cb [FLINK-17792][tests] Catch and log exception if jstack fails
d8a77cb is described below
commit d8a77cbf93007bf970963a4499aa06501c0d9808
Author: Gary Yao <ga...@apache.org>
AuthorDate: Mon May 18 09:17:58 2020 +0200
[FLINK-17792][tests] Catch and log exception if jstack fails
jstack can fail if the JVM process that we want to sample exits while or
before we invoke jstack. Since a JVM process is free to exit at any
time, we should not propagate the exception so that we do not fail the
test prematurely.
---
flink-jepsen/src/jepsen/flink/utils.clj | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/flink-jepsen/src/jepsen/flink/utils.clj b/flink-jepsen/src/jepsen/flink/utils.clj
index 8f6f654..5d8e712 100644
--- a/flink-jepsen/src/jepsen/flink/utils.clj
+++ b/flink-jepsen/src/jepsen/flink/utils.clj
@@ -133,7 +133,10 @@
(defn- write-jstack!
[pid out-path]
- (c/exec :jstack :-l pid :> out-path))
+ (try
+ (c/exec :jstack :-l pid :> out-path)
+ (catch Exception e
+ (warn e "Failed to invoke jstack on pid" pid))))
(defn dump-jstack-by-pattern!
"Dumps the output of jstack for all JVMs that match one of the specified patterns."