Skip to content

Safely handle channel creation errors on initiating connections and top-level supervisors#16598

Closed
Ayanda-D wants to merge 4 commits into
rabbitmq:mainfrom
Ayanda-D:safe-handle-conflicting-interceptors
Closed

Safely handle channel creation errors on initiating connections and top-level supervisors#16598
Ayanda-D wants to merge 4 commits into
rabbitmq:mainfrom
Ayanda-D:safe-handle-conflicting-interceptors

Conversation

@Ayanda-D

@Ayanda-D Ayanda-D commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Hello!

We've been noticing that channel creation can fail with {error, Reason} - for example when channel-interceptors clash on the AMQP operation they intend to intercept (i.e. expected behaviour to fail). The calling processes and supervision tree currently don't seem to handle these errors/failures gracefully, and fail with loud badmatch exceptions (which are not the most useful for operators). As a result, calling components (connections + supervisors) crash ungracefully. These changes seek to add safe handling of {error, Reason} channel creation errors, to a channel's top/adjacent supervisor, as well as the initiating connection types - both network connections and direct connections. There's also shutdown_supervisor/1 which ensures clean termination of the related supervisor before an error is returned.

CURRENT CRASHES/UNHANDLED CONNECTION TERMINATIONS

Example crash logs (from conflicting channel-interceptor modules/plugins) are as follows:

CRASH-1: rabbit_reader
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>   crasher:
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     initial call: rabbit_reader:init/3
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     pid: <0.786.0>
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     registered_name: []
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     exception error: no match of right hand side value
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                      {error,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                       {'EXIT',
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {{badmatch,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {error,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           {{amqp_error,internal_error,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                             "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                             none},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                            {child,undefined,channel,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                             {rabbit_channel,start_link,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                              [1,<0.786.0>,<0.803.0>,<0.786.0>,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                               <<"127.0.0.1:62553 -> 127.0.0.1:21000">>,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                               {user,<<"guest">>,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                [administrator],
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                [{rabbit_auth_backend_internal,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                  #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                               <<"/">>,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                               [{<<"publisher_confirms">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                {<<"exchange_exchange_bindings">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                {<<"basic.nack">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                {<<"consumer_cancel_notify">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                {<<"connection.blocked">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                                {<<"authentication_failure_close">>,bool,true}],
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                               <0.793.0>,<0.804.0>]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                             transient,true,70000,worker,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                             [rabbit_channel]}}}},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                         [{rabbit_channel_sup,start_link,1,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"rabbit_channel_sup.erl"},{line,65}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {supervisor,do_start_child_i,3,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"supervisor.erl"},{line,996}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {supervisor,handle_call,3,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"supervisor.erl"},{line,1022}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {gen_server,try_handle_call,4,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"gen_server.erl"},{line,2470}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {gen_server,handle_msg,3,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"gen_server.erl"},{line,2499}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {proc_lib,init_p_do_apply,3,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           [{file,"proc_lib.erl"},{line,333}]}]}}}
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in function  rabbit_reader:create_channel/2 (rabbit_reader.erl:978)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in call from rabbit_reader:process_frame/3 (rabbit_reader.erl:1081)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in call from rabbit_reader:handle_input/3 (rabbit_reader.erl:1144)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in call from rabbit_reader:recvloop/4 (rabbit_reader.erl:490)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in call from rabbit_reader:run/1 (rabbit_reader.erl:472)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>       in call from rabbit_reader:start_connection/5 (rabbit_reader.erl:343)
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     ancestors: [<0.783.0>,<0.723.0>,<0.722.0>,<0.721.0>,<0.719.0>,<0.718.0>,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                   rabbit_sup,<0.202.0>]
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     message_queue_len: 1
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     messages: [{'EXIT',#Port<0.32>,normal}]
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     links: [<0.783.0>]
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     dictionary: [{client_properties,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                       [{<<"product">>,longstr,<<"RabbitMQ">>},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {<<"version">>,longstr,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                         <<"4.2.0+beta.4.797.ge17b976.dirty">>},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {<<"platform">>,longstr,<<"Erlang">>},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {<<"copyright">>,longstr,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                         <<67,111,112,121,114,105,103,104,116,32,40,99,41,32,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           50,48,48,55,45,50,48,50,54,32,66,114,111,97,100,99,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           111,109,46,32,65,108,108,32,82,105,103,104,116,115,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           32,82,101,115,101,114,118,101,100,46,32,84,104,101,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           32,116,101,114,109,32,28,66,114,111,97,100,99,111,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           109,29,32,114,101,102,101,114,115,32,116,111,32,66,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           114,111,97,100,99,111,109,32,73,110,99,46,32,97,110,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           100,47,111,114,32,105,116,115,32,115,117,98,115,105,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           100,105,97,114,105,101,115,46>>},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {<<"information">>,longstr,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                         <<"Licensed under the MPL.  See https://www.rabbitmq.com/">>},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                        {<<"capabilities">>,table,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                         [{<<"publisher_confirms">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {<<"exchange_exchange_bindings">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {<<"basic.nack">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {<<"consumer_cancel_notify">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {<<"connection.blocked">>,bool,true},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                          {<<"authentication_failure_close">>,bool,true}]}]},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                   {'$logger_metadata$',#{domain => [rabbitmq,connection]}},
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                   {process_name,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                       {rabbit_reader,
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>                           <<"127.0.0.1:62553 -> 127.0.0.1:21000">>}}]
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     trap_exit: true
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     status: running
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     heap_size: 1598
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     stack_size: 29
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>     reductions: 12090
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0>   neighbours:
2026-06-02 15:40:09.715490+01:00 [error] <0.786.0> 
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>     supervisor: {<0.783.0>,rabbit_connection_sup}
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>     errorContext: child_terminated
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>     reason: {{badmatch,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {error,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {'EXIT',
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                 {{badmatch,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {error,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    {{amqp_error,internal_error,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                      "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                      none},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                     {child,undefined,channel,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                      {rabbit_channel,start_link,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                       [1,<0.786.0>,<0.803.0>,<0.786.0>,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                        <<"127.0.0.1:62553 -> 127.0.0.1:21000">>,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                        {user,<<"guest">>,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         [administrator],
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         [{rabbit_auth_backend_internal,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                           #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                        <<"/">>,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                        [{<<"publisher_confirms">>,bool,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         {<<"exchange_exchange_bindings">>,bool,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         {<<"basic.nack">>,bool,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         {<<"consumer_cancel_notify">>,bool,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         {<<"connection.blocked">>,bool,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                         {<<"authentication_failure_close">>,bool,true}],
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                        <0.793.0>,<0.804.0>]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                      transient,true,70000,worker,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                      [rabbit_channel]}}}},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                  [{rabbit_channel_sup,start_link,1,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"rabbit_channel_sup.erl"},{line,65}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {supervisor,do_start_child_i,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"supervisor.erl"},{line,996}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {supervisor,handle_call,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"supervisor.erl"},{line,1022}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {gen_server,try_handle_call,4,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"gen_server.erl"},{line,2470}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {gen_server,handle_msg,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"gen_server.erl"},{line,2499}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                   {proc_lib,init_p_do_apply,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                    [{file,"proc_lib.erl"},{line,333}]}]}}}},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>              [{rabbit_reader,create_channel,2,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"rabbit_reader.erl"},{line,978}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {rabbit_reader,process_frame,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"rabbit_reader.erl"},{line,1081}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {rabbit_reader,handle_input,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"rabbit_reader.erl"},{line,1144}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {rabbit_reader,recvloop,4,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"rabbit_reader.erl"},{line,490}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {rabbit_reader,run,1,[{file,"rabbit_reader.erl"},{line,472}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {rabbit_reader,start_connection,5,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"rabbit_reader.erl"},{line,343}]},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>               {proc_lib,init_p_do_apply,3,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                [{file,"proc_lib.erl"},{line,333}]}]}
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>     offender: [{pid,<0.786.0>},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {id,reader},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {mfargs,{rabbit_reader,start_link,
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                                       [{<0.784.0>,<0.785.0>},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                                        {acceptor,{0,0,0,0,0,0,0,0},21000}]}},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {restart_type,transient},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {significant,true},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {shutdown,300000},
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0>                {child_type,worker}]
2026-06-02 15:40:09.718566+01:00 [error] <0.783.0> 
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>     supervisor: {<0.783.0>,rabbit_connection_sup}
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>     errorContext: shutdown
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>     reason: reached_max_restart_intensity
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>     offender: [{pid,<0.786.0>},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {id,reader},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {mfargs,{rabbit_reader,start_link,
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                                       [{<0.784.0>,<0.785.0>},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                                        {acceptor,{0,0,0,0,0,0,0,0},21000}]}},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {restart_type,transient},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {significant,true},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {shutdown,300000},
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0>                {child_type,worker}]
2026-06-02 15:40:09.718955+01:00 [error] <0.783.0> 
CRASH-2: rabbit_channel_sup
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0> Connection 127.0.0.1:63553 -> 127.0.0.1:21000 failed to open channel 1: {'EXIT',
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                          {{badmatch,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {error,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             {{amqp_error,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               internal_error,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               none},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {child,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               undefined,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               channel,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               {rabbit_channel,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                start_link,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                [1,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <0.786.0>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <0.803.0>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <0.786.0>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <<"127.0.0.1:63553 -> 127.0.0.1:21000">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 {user,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  <<"guest">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  [administrator],
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  [{rabbit_auth_backend_internal,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                    #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <<"/">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 [{<<"publisher_confirms">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  {<<"exchange_exchange_bindings">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  {<<"basic.nack">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  {<<"consumer_cancel_notify">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  {<<"connection.blocked">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                  {<<"authentication_failure_close">>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   bool,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                   true}],
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <0.793.0>,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                                 <0.804.0>]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               transient,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               true,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               70000,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               worker,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               [rabbit_channel]}}}},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                           [{rabbit_channel_sup,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             start_link,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             1,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "rabbit_channel_sup.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               65}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {supervisor,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             do_start_child_i,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             3,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "supervisor.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               996}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {supervisor,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             handle_call,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             3,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "supervisor.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               1022}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {gen_server,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             try_handle_call,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             4,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "gen_server.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               2470}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {gen_server,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             handle_msg,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             3,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "gen_server.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               2499}]},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                            {proc_lib,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             init_p_do_apply,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             3,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                             [{file,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               "proc_lib.erl"},
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                              {line,
2026-06-02 15:55:43.172825+01:00 [error] <0.786.0>                                                                               333}]}]}}
CRASH-3: rabbit_direct
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** Generic server <0.787.0> terminating
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** Last message in was {open_channel,none,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                            {amqp_selective_consumer,[]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                            [<0.782.0>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                             'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                             {user,<<"guest">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 [administrator],
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 [{rabbit_auth_backend_internal,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                      #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                             <<"/">>,<0.788.0>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                             {amqp_params_direct,<<"guest">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 {encrypted,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                     <<"zHXOjtq5UxogGtxfUPjv+T21EiCiQc0nHGfGy8npGTgv+GqATwHuvS1xOim6SzX5RvLCIp756JY4URPcXXiDVJ3fSh9EkFDEhLsmzYPoOU8=">>},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 <<"/">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                                 none,[]}]}
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** When Server state == {state,<0.782.0>,<0.786.0>,{0,nil},#{},65535,false}
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** Reason for termination ==
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** {{badmatch,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>      {error,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>       {{'EXIT',
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>         {{badmatch,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>           {error,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>            {{amqp_error,internal_error,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>              "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>              none},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>             {child,undefined,channel,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>              {rabbit_channel,start_link,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>               [1,<0.791.0>,<0.791.0>,<0.782.0>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                <<"<rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost.1780413850.782.0>">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                {user,<<"guest">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 [administrator],
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 [{rabbit_auth_backend_internal,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                   #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                <<"/">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                [{<<"publisher_confirms">>,bool,true},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {<<"exchange_exchange_bindings">>,bool,true},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {<<"basic.nack">>,bool,true},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {<<"consumer_cancel_notify">>,bool,true},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {<<"connection.blocked">>,bool,true},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {<<"authentication_failure_close">>,bool,true}],
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                <0.788.0>,<0.794.0>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                {amqp_params_direct,<<"guest">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 {encrypted,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                  <<"zHXOjtq5UxogGtxfUPjv+T21EiCiQc0nHGfGy8npGTgv+GqATwHuvS1xOim6SzX5RvLCIp756JY4URPcXXiDVJ3fSh9EkFDEhLsmzYPoOU8=">>},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 <<"/">>,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                 none,[]}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>              transient,true,70000,worker,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>              [rabbit_channel]}}}},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>          [{rabbit_direct,start_channel,9,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>            [{file,"rabbit_direct.erl"},{line,231}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>           {rabbit_direct,start_channel,10,[]}]}},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>        'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost'}}},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     [{amqp_channels_manager,handle_open_channel,4,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>       [{file,"amqp_channels_manager.erl"},{line,108}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>      {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,2470}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>      {gen_server,handle_msg,3,[{file,"gen_server.erl"},{line,2499}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>      {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]}
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** Client <0.782.0> stacktrace
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0> ** [{gen,do_call,4,[{file,"gen.erl"},{line,262}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     {gen_server,call,3,[{file,"gen_server.erl"},{line,1297}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     {amqp_gen_connection,handle_command,3,
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>                          [{file,"amqp_gen_connection.erl"},{line,285}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,2470}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     {gen_server,handle_msg,3,[{file,"gen_server.erl"},{line,2499}]},
2026-06-02 17:03:40.055298+01:00 [error] <0.787.0>     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]

CRASH-4: amqp_channels_manager
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** Generic server <0.782.0> terminating
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** Last message in was {command,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            {open_channel,none,{amqp_selective_consumer,[]}}}
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** When Server state == {state,amqp_direct_connection,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          {state,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {user,<<"guest">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            [administrator],
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            [{rabbit_auth_backend_internal,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                              #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           <<"/">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {amqp_params_direct,<<"guest">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            {encrypted,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             <<"FVSMvogNmU1iTkdSu1a7tj3SJiirsdq9Y5a2XcHFcyciHBuwBCYceEcefKc8wZosqsLJxFOuUCGSXmUannLtpEmtvEjnyR21mEiQ0YmMvkw=">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"/">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            none,[]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {amqp_adapter_info,unknown,unknown,unknown,unknown,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"<rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost.1780413845.782.0>">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            {'Direct',{0,9,1}},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            []},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           <0.788.0>,undefined,1780413846556},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          <0.787.0>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          {amqp_params_direct,<<"guest">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {encrypted,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"FVSMvogNmU1iTkdSu1a7tj3SJiirsdq9Y5a2XcHFcyciHBuwBCYceEcefKc8wZosqsLJxFOuUCGSXmUannLtpEmtvEjnyR21mEiQ0YmMvkw=">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           <<"/">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           none,[]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          0,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          [{<<"capabilities">>,table,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            [{<<"publisher_confirms">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"exchange_exchange_bindings">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"basic.nack">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"consumer_cancel_notify">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"connection.blocked">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"consumer_priorities">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"authentication_failure_close">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"per_consumer_qos">>,bool,true},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                             {<<"direct_reply_to">>,bool,true}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"cluster_name">>,longstr,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"rmq-ct-conflicting_interceptors_direct_connection-1-21000@K3K70TDT7R">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"copyright">>,longstr,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"Copyright (c) 2007-2026 Broadcom Inc and/or its subsidiaries">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"information">>,longstr,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"Licensed under the MPL 2.0. Website: https://rabbitmq.com">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"platform">>,longstr,<<"Erlang/OTP 28.4.1">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"product">>,longstr,<<"RabbitMQ">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                           {<<"version">>,longstr,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                            <<"4.2.0+beta.4.797.ge17b976.dirty">>}],
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          none,#{},false}
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** Reason for termination ==
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** {{{{badmatch,{error,channel_open_failed}},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>       [{amqp_channels_manager,handle_open_channel,4,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>            [{file,"amqp_channels_manager.erl"},{line,108}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>        {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,2470}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>        {gen_server,handle_msg,3,[{file,"gen_server.erl"},{line,2499}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>      {gen_server,call,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>          [<0.787.0>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>           {open_channel,none,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>               {amqp_selective_consumer,[]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>               [<0.782.0>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                {user,<<"guest">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    [administrator],
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    [{rabbit_auth_backend_internal,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                         #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                <<"/">>,<0.788.0>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                {amqp_params_direct,<<"guest">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    {encrypted,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                        <<"FVSMvogNmU1iTkdSu1a7tj3SJiirsdq9Y5a2XcHFcyciHBuwBCYceEcefKc8wZosqsLJxFOuUCGSXmUannLtpEmtvEjnyR21mEiQ0YmMvkw=">>},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    <<"/">>,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    'rmq-ct-conflicting_interceptors_direct_connection-1-21000@localhost',
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                    none,[]}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>           130000]}},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>     [{gen_server,call,3,[{file,"gen_server.erl"},{line,1301}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>      {amqp_gen_connection,handle_command,3,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>          [{file,"amqp_gen_connection.erl"},{line,285}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>      {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,2470}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>      {gen_server,handle_msg,3,[{file,"gen_server.erl"},{line,2499}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>      {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]}
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** Client <0.776.0> stacktrace
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0> ** [{gen,do_call,4,[{file,"gen.erl"},{line,262}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>     {gen_server,call,3,[{file,"gen_server.erl"},{line,1297}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>     {amqp_gen_connection,open_channel,3,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                          [{file,"amqp_gen_connection.erl"},{line,83}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>     {channel_interceptor_SUITE,conflicting_interceptors_direct_connection1,1,
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                                [{file,"channel_interceptor_SUITE.erl"},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>                                 {line,280}]},
2026-06-02 16:24:06.588891+01:00 [error] <0.782.0>     {erpc,execute_call,4,[{file,"erpc.erl"},{line,1262}]}]

EXPECTED GRACEFUL CONNECTION TERMINATIONS

With these changes, we would only get the relevant failure context and clean termination of the connections:

CLEANER NETWORK CONNECTION TERMINATION
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0> Connection 127.0.0.1:53506 -> 127.0.0.1:21000 failed to open channel 1: {{amqp_error,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           internal_error,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           none},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                          {child,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           undefined,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           channel,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           {rabbit_channel,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                            start_link,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                            [1,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <0.786.0>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <0.803.0>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <0.786.0>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <<"127.0.0.1:53506 -> 127.0.0.1:21000">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             {user,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              <<"guest">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              [administrator],
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              [{rabbit_auth_backend_internal,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                                #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <<"/">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             [{<<"publisher_confirms">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              {<<"exchange_exchange_bindings">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              {<<"basic.nack">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              {<<"consumer_cancel_notify">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              {<<"connection.blocked">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                              {<<"authentication_failure_close">>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               bool,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                               true}],
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <0.793.0>,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                             <0.804.0>]},
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           transient,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           true,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           70000,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           worker,
2026-06-03 15:15:16.809887+01:00 [error] <0.786.0>                                                                           [rabbit_channel]}}
CLEANER DIRECT CONNECTION TERMINATION
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0> Error on direct connection <0.782.0>
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0> failed to open channel: {{amqp_error,internal_error,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                           "Interceptor: more than one module handles #{'queue.declare' => []}",
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                           none},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                          {child,undefined,channel,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                           {rabbit_channel,start_link,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                            [1,<0.791.0>,<0.791.0>,<0.782.0>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             <<"<rmq-ct-conflicting_interceptors_close_direct_connections_gracefully-1-21000@localhost.1780417028.782.0>">>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             {user,<<"guest">>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              [administrator],
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              [{rabbit_auth_backend_internal,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                                #Fun<rabbit_auth_backend_internal.3.75101592>}]},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             <<"/">>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             [{<<"publisher_confirms">>,bool,true},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {<<"exchange_exchange_bindings">>,bool,true},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {<<"basic.nack">>,bool,true},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {<<"consumer_cancel_notify">>,bool,true},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {<<"connection.blocked">>,bool,true},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {<<"authentication_failure_close">>,bool,true}],
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             <0.788.0>,<0.794.0>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                             {amqp_params_direct,<<"guest">>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              {encrypted,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                               <<"qD20bH12GgtaNeIwaZ9XnbpG/TETNwmtEREkDHbD5t/4o95nf2guM5KuemNqYJ17p3saUMJ1myYyHjouNLFLVUuUWBNu2zIQhL/VvZDmoLA=">>},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              <<"/">>,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              'rmq-ct-conflicting_interceptors_close_direct_connections_gracefully-1-21000@localhost',
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                              none,[]}]},
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                           transient,true,70000,worker,
2026-06-03 15:15:20.272153+01:00 [error] <0.792.0>                           [rabbit_channel]}}

( NOTE: These changes should also assist in clean/graceful connection terminations from conflicting channel interceptor failures on same priorities in #16046 )

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
This is simply a reminder of what we are going to look for before merging your code.

Ayanda-D added 3 commits June 3, 2026 14:25
in both network and direct connection types, to allow graceful
termination of connections when such errors occur
creation from conflicting amqp interceptors
@lukebakken lukebakken self-assigned this Jun 3, 2026
@lukebakken
lukebakken self-requested a review June 3, 2026 19:31

@lukebakken lukebakken left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was AI-assisted (Claude Code, guided by a human reviewer).

Overall

Clean, well-structured fix. The error propagation chains are correct - we traced each path from rabbit_channel_interceptor:init/1 raising an exit through supervisor:start_child returning {error, _}, through the new case expressions, to either handle_exception (network) or {error, channel_open_failed} (direct). Tests cover both paths with good assertions. A few notes below.

?DEFAULT_TIMEOUT naming

The new macro in rabbit_misc.hrl is very generically named for a public header included across the entire codebase. It's only used by shutdown_supervisor/1. Something like ?SUPERVISOR_SHUTDOWN_TIMEOUT would be clearer and less likely to collide with future uses. Alternatively, define it locally in rabbit_misc.erl rather than the shared header.

5-second timeout vs child shutdown budgets

shutdown_supervisor/1 gives the supervisor 5 seconds to terminate all its children. The children in rabbit_channel_sup have shutdown => ?FAIR_WAIT (70s) and the amqp_channel child in amqp_channel_sup has shutdown => ?WORKER_WAIT (300s). In the specific scenarios this PR addresses, the children being terminated are freshly started healthy processes (limiter, writer) that will exit nearly instantly on a shutdown signal, so 5 seconds is fine in practice. But since shutdown_supervisor/1 is exported and could be called from other contexts, it might be worth either:

  • Accepting a timeout argument, or
  • Using a value that accommodates the worst-case child shutdown (matching ?FAIR_WAIT would be safe for the server-side supervisors)

Not a blocker - just something to consider for robustness.

@michaelklishin

Copy link
Copy Markdown
Collaborator

@Ayanda-D thank you, we will get to polishing this PR a bit in the next week or so.

@Ayanda-D

Ayanda-D commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@lukebakken using ?FAIR_WAIT sounds good, thanks 👍

@michaelklishin

Copy link
Copy Markdown
Collaborator

@Ayanda-D the CI failures are legit and reproducible. They affect #16610, too.

@michaelklishin

Copy link
Copy Markdown
Collaborator

With these changes, certain tests that depended on connection termination due to an exception now fail. The solution is to explicitly handle returned errors in their callers, and in the direct client also explicitly close the connection (on the RabbitMQ end).

I am working on the necessary updates.

michaelklishin added a commit that referenced this pull request Jun 5, 2026
`amqp_channels_manager:handle_open_channel/4` now can
get an error tuple back where previously connections
would fail due to a badmatch, producing crash logs.

Note that the broker only actively closes TCP-based connections
on these errors (via `rabbit_reader:handle_exception/3`).

The direct AMQP 0-9-1 client previously got an identical outcome
via the badmatch crash; updating it to properly close
is out of scope for this commit and will be investigated next.
@michaelklishin

michaelklishin commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Merged with additions #16610 for 4.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants