diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-11-07 12:20:42 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-11-07 12:20:42 +0000 |
commit | dbff02f0708e26c8b77ec7a8fe36090a2f214c80 (patch) | |
tree | 26d5d14c142e21834594cb9409a5a7977c624bf0 | |
parent | e956918b568d80080db6a2fe4e018da32c9e5704 (diff) | |
download | rabbitmq-server-dbff02f0708e26c8b77ec7a8fe36090a2f214c80.tar.gz |
Don't badarg if a process goes away while running this.bug26460
-rw-r--r-- | src/rabbit_diagnostics.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_diagnostics.erl b/src/rabbit_diagnostics.erl index 4eafada3..bf45b757 100644 --- a/src/rabbit_diagnostics.erl +++ b/src/rabbit_diagnostics.erl @@ -41,13 +41,13 @@ maybe_stuck(Pids, Timeout) -> maybe_stuck(Pids2, Timeout - 500). looks_stuck(Pid) -> - case process_info(Pid, status) of + case catch process_info(Pid, status) of {status, waiting} -> %% It's tempting to just check for message_queue_len > 0 %% here rather than mess around with stack traces and %% heuristics. But really, sometimes freshly stuck %% processes can have 0 messages... - case erlang:process_info(Pid, current_stacktrace) of + case catch erlang:process_info(Pid, current_stacktrace) of {current_stacktrace, [H|_]} -> maybe_stuck_stacktrace(H); _ -> |