Make rabbit_misc:which_applications/0 more resilient

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.
This commit is contained in:
Michael Klishin 2024-05-24 19:53:33 -04:00
parent 867433e14c
commit ca094402a9
1 changed files with 2 additions and 2 deletions

View File

@ -1099,8 +1099,8 @@ rabbitmq_and_erlang_versions() ->
which_applications() ->
try
application:which_applications(10000)
catch
exit:{timeout, _} -> []
catch _:_:_Stacktrace ->
[]
end.
sequence_error([T]) -> T;