Skip to content

Commit

Permalink
Make rabbit_misc:which_applications/0 more resilient
Browse files Browse the repository at this point in the history
In certain shutdown scenarios this function on
Erlang 26 runs into exceptions that stem from
application_controller.

The objective of this function is to be
an exception-safe version of
application:which_applications/1, so let's
handle more cases.

This helps certain test suites avoid exceptions
(process crash reports) logged during shutdown,
which makes CT helpers fail test run even
though there were no exceptions in RabbitMQ
itself, and all the exception indicates is a
certain edge case (during system shutdown)
that application_controller does not care to handle.

(cherry picked from commit ca09440)
(cherry picked from commit addc990)
  • Loading branch information
Michael Klishin authored and mergify[bot] committed May 25, 2024
1 parent 5b97756 commit 70cce45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/rabbit_common/src/rabbit_misc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,8 @@ rabbitmq_and_erlang_versions() ->
which_applications() ->
try
application:which_applications(10000)
catch
exit:{timeout, _} -> []
catch _:_:_Stacktrace ->
[]
end.

sequence_error([T]) -> T;
Expand Down

0 comments on commit 70cce45

Please sign in to comment.