Skip to content

Commit 70cce45

Browse files
Michael Klishinmergify[bot]
authored andcommitted
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. (cherry picked from commit ca09440) (cherry picked from commit addc990)
1 parent 5b97756 commit 70cce45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbit_common/src/rabbit_misc.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,8 +1141,8 @@ rabbitmq_and_erlang_versions() ->
11411141
which_applications() ->
11421142
try
11431143
application:which_applications(10000)
1144-
catch
1145-
exit:{timeout, _} -> []
1144+
catch _:_:_Stacktrace ->
1145+
[]
11461146
end.
11471147

11481148
sequence_error([T]) -> T;

0 commit comments

Comments
 (0)