Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"handle_method(#'queue.delete'{},_)" can not process the case "{error,{exit, _, _}}" #3086

Merged
merged 1 commit into from
Jun 8, 2021
Merged

"handle_method(#'queue.delete'{},_)" can not process the case "{error,{exit, _, _}}" #3086

merged 1 commit into from
Jun 8, 2021

Conversation

tomyouyou
Copy link
Contributor

@tomyouyou tomyouyou commented Jun 7, 2021

In my test of "queue.delete", this has happened:

2021-06-05 16:31:26.281 [error] <0.9903.21> ** Generic server <0.9903.21> terminating
** Last message in was {'$gen_cast',{method,{'queue.delete',0,<<"nbm_alive_c0fb2eb6-c822-4641-adda-0ea9c2c02fef">>,false,false,false},none,noflow,false}}
** When Server state == {ch,{conf,running,rabbit_framing_amqp_0_9_1,1,<0.9893.21>,<0.9902.21>,<0.9893.21>,<<"174.11.10.28:48839 -> 174.11.10.23:5674">>,undefined,{user,<<"guest">>,[administrator],[{rabbit_auth_backend_internal,none}]},<<"/">>,<<"nbm_alive_c0fb2eb6-c822-4641-adda-0ea9c2c02fef">>,<0.9897.21>,[{<<"authentication_failure_close">>,bool,true},{<<"basic.nack">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"consumer_cancel_notify">>,bool,true},{<<"publisher_confirms">>,bool,true}],none,0,134217728,undefined,#{},1000000000},{lstate,undefined,false,#Fun<rabbit_channel.8.31076537>},none,1,{0,{[],[]}},#{},{state,#{},erlang},#{},#{},{set,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},{state,none,30000,undefined},false,1,{unconfirmed,{0,nil},#{},#{}},[],[],none,flow,[],#{},#Ref<0.2883551392.790364161.215222>,false,false,undefined,undefined,{erlang,#Ref<0.2883551392.790364161.214783>},{{174,11,10,28},48839,"174.11.10.28:48839 -> 174.11.10.23:5674","none"},#{},#{}}


** Reason for termination ==
** {{case_clause,{error,{exit,{normal,{gen_server2,call,[<0.10232.21>,{delete,false,false,<<"guest">>},infinity]}},[{gen_server2,call,3,[{file,"src/gen_server2.erl"},{line,346}]},{delegate,safe_invoke,2,[{file,"src/delegate.erl"},{line,274}]},{delegate,invoke,2,[{file,"src/delegate.erl"},{line,92}]},{rabbit_misc,with_exit_handler,2,[{file,"src/rabbit_misc.erl"},{line,602}]},{rabbit_channel,handle_method,6,[{file,"src/rabbit_channel.erl"},{line,3082}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,2021}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]}]}}},[{rabbit_channel,handle_method,6,[{file,"src/rabbit_channel.erl"},{line,3082}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,2021}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}
2021-06-05 16:31:26.281 [error] <0.9893.21> Error on AMQP connection <0.9893.21> (174.11.10.28:48839 -> 174.11.10.23:5674, vhost: '/', user: 'guest', state: running), channel 1:
 {{case_clause,
     {error,
         {exit,
             {normal,
                 {gen_server2,call,
                     [<0.10232.21>,
                      {delete,false,false,<<"guest">>},
                      infinity]}},
             [{gen_server2,call,3,[{file,"src/gen_server2.erl"},{line,346}]},
              {delegate,safe_invoke,2,[{file,"src/delegate.erl"},{line,274}]},
              {delegate,invoke,2,[{file,"src/delegate.erl"},{line,92}]},
              {rabbit_misc,with_exit_handler,2,
                  [{file,"src/rabbit_misc.erl"},{line,602}]},
              {rabbit_channel,handle_method,6,
[{rabbit_channel,handle_method,6,
      [{file,"src/rabbit_channel.erl"},{line,3082}]},
  {rabbit_channel,handle_method,3,
      [{file,"src/rabbit_channel.erl"},{line,2021}]},
  {rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},
  {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]},
  {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}

…,{exit, _, _}}"

In my test of "queue.delete", this has happened:

2021-06-05 16:31:26.281 [error] <0.9903.21> ** Generic server <0.9903.21> terminating
** Last message in was {'$gen_cast',{method,{'queue.delete',0,<<"nbm_alive_c0fb2eb6-c822-4641-adda-0ea9c2c02fef">>,false,false,false},none,noflow,false}}
** When Server state == {ch,{conf,running,rabbit_framing_amqp_0_9_1,1,<0.9893.21>,<0.9902.21>,<0.9893.21>,<<"174.11.10.28:48839 -> 174.11.10.23:5674">>,undefined,{user,<<"guest">>,[administrator],[{rabbit_auth_backend_internal,none}]},<<"/">>,<<"nbm_alive_c0fb2eb6-c822-4641-adda-0ea9c2c02fef">>,<0.9897.21>,[{<<"authentication_failure_close">>,bool,true},{<<"basic.nack">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"consumer_cancel_notify">>,bool,true},{<<"publisher_confirms">>,bool,true}],none,0,134217728,undefined,#{},1000000000},{lstate,undefined,false,#Fun<rabbit_channel.8.31076537>},none,1,{0,{[],[]}},#{},{state,#{},erlang},#{},#{},{set,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},{state,none,30000,undefined},false,1,{unconfirmed,{0,nil},#{},#{}},[],[],none,flow,[],#{},#Ref<0.2883551392.790364161.215222>,false,false,undefined,undefined,{erlang,#Ref<0.2883551392.790364161.214783>},{{174,11,10,28},48839,"174.11.10.28:48839 -> 174.11.10.23:5674","none"},#{},#{}}


** Reason for termination ==
** {{case_clause,{error,{exit,{normal,{gen_server2,call,[<0.10232.21>,{delete,false,false,<<"guest">>},infinity]}},[{gen_server2,call,3,[{file,"src/gen_server2.erl"},{line,346}]},{delegate,safe_invoke,2,[{file,"src/delegate.erl"},{line,274}]},{delegate,invoke,2,[{file,"src/delegate.erl"},{line,92}]},{rabbit_misc,with_exit_handler,2,[{file,"src/rabbit_misc.erl"},{line,602}]},{rabbit_channel,handle_method,6,[{file,"src/rabbit_channel.erl"},{line,3082}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,2021}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]}]}}},[{rabbit_channel,handle_method,6,[{file,"src/rabbit_channel.erl"},{line,3082}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,2021}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}
2021-06-05 16:31:26.281 [error] <0.9893.21> Error on AMQP connection <0.9893.21> (174.11.10.28:48839 -> 174.11.10.23:5674, vhost: '/', user: 'guest', state: running), channel 1:
 {{case_clause,
     {error,
         {exit,
             {normal,
                 {gen_server2,call,
                     [<0.10232.21>,
                      {delete,false,false,<<"guest">>},
                      infinity]}},
             [{gen_server2,call,3,[{file,"src/gen_server2.erl"},{line,346}]},
              {delegate,safe_invoke,2,[{file,"src/delegate.erl"},{line,274}]},
              {delegate,invoke,2,[{file,"src/delegate.erl"},{line,92}]},
              {rabbit_misc,with_exit_handler,2,
                  [{file,"src/rabbit_misc.erl"},{line,602}]},
              {rabbit_channel,handle_method,6,
[{rabbit_channel,handle_method,6,
      [{file,"src/rabbit_channel.erl"},{line,3082}]},
  {rabbit_channel,handle_method,3,
      [{file,"src/rabbit_channel.erl"},{line,2021}]},
  {rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]},
  {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1067}]},
  {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}
@michaelklishin
Copy link
Member

How can we reproduce?

Are you certain that it's OK to return a success, that is, was the queue deleted even though a delegate process has failed?

@tomyouyou
Copy link
Contributor Author

tomyouyou commented Jun 8, 2021

@michaelklishin

The test environment is as follows:

[root@ctrl-1:/home/vtu/amqptmp/ssl]$ cat /proc/version
Linux version 4.18.0-193.14.2.el8_2.x86_64 (mockbuild@64f03c1f4ed54c2385280ff57a24e2b0) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Sat Apr 17 19:03:33 CST 2021
[root@ctrl-1:/home/vtu/amqptmp/ssl]$ rpm -qi erlang
Name : erlang
Version : 23.2.7
Release : 1.el8
Architecture: x86_64
Install Date: Fri 28 May 2021 02:52:40 PM CST
Group : Development/Languages
Size : 65759938
License : ASL 2.0
Signature : RSA/SHA256, Thu 04 Mar 2021 09:26:09 AM CST, Key ID 6b73a36e6026dfca
Source RPM : erlang-23.2.7-1.el8.src.rpm
Build Date : Thu 04 Mar 2021 09:25:51 AM CST
Build Host : f2b75e4d-a422-413e-76a6-83753098db1c
Relocations : (not relocatable)
Vendor : VMware, Inc.
URL : https://www.erlang.org
Summary : Minimalistic Erlang/OTP distribution that provides just enough for running RabbitMQ
Description :
This is a minimal packaging of Erlang produced by VMware, Inc. to support
running RabbitMQ. Compared to the community Erlang packaging it is
monolithic, has fewer dependencies, and has lower disk and memory
overhead. Many applications from Erlang Open Telecom Platform (OTP)
have been removed. The following applications remain: asn1, compiler,
crypto, erl_interface, erts, inets, kernel, mnesia, os_mon,
public_key, reltool, runtime_tools, sasl, snmp, ssl, stdlib,
syntax_tools and xmerl.
[root@ctrl-1:/home/vtu/amqptmp/ssl]$ rpm -qi rabbitmq-server
Name : rabbitmq-server
Version : 3.8.14
Release : 1.11.6.el8
Architecture: noarch
Install Date: Mon 07 Jun 2021 05:25:38 PM CST
Group : %{group_tag}
Size : 17469191
License : MPLv2.0 and MIT and ASL 2.0 and BSD
Signature : (none)
Source RPM : rabbitmq-server-3.8.14-1.11.6.el8.src.rpm
Build Date : Mon 07 Jun 2021 05:32:01 PM CST
Build Host : lzz.localdomain
Relocations : (not relocatable)
URL : https://www.rabbitmq.com/
Summary : The RabbitMQ server
Description :
RabbitMQ is an open source multi-protocol messaging broker.

To reproduce the issue:
create a queue and delete it in 10ms

I added printing to show that the QPID has received the message of 'delete' and the queue has been deleted normally.
And The log is as follows:

2021-06-07 18:07:43.759 [warning] <0.18039.4> DBG ["src/rabbit_amqqueue_process.erl":1524 handle_call]recv delete <<"nbm_alive_50e456d9-d118-41d1-a72b-58b36cc648ee">>
2021-06-07 18:07:43.771 [warning] <0.14558.3> DBG ["src/rabbit_amqqueue.erl":1576 delete]delete/invoke <<"nbm_alive_50e456d9-d118-41d1-a72b-58b36cc648ee">> return {error,{exit,{normal,{gen_server2,call,[<0.18039.4>,{delete,false,false,<<"guest">>},infinity]}},[{gen_server2,call,3,[{file,"src/gen_server2.erl"},{line,346}]},{delegate,safe_invoke,2,[{file,"src/delegate.erl"},{line,274}]},{delegate,invoke,2,[{file,"src/delegate.erl"},{line,92}]},{rabbit_amqqueue,delete,4,[{file,"src/rabbit_amqqueue.erl"},{line,1569}]},{rabbit_misc,with_exit_handler,2,[{file,"src/rabbit_misc.erl"},{line,606}]},{rabbit_channel,handle_method,6,[{file,"src/rabbit_channel.erl"},{line,3082}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,2021}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,823}]}]}}

@michaelklishin michaelklishin merged commit 15a26d2 into rabbitmq:master Jun 8, 2021
@michaelklishin michaelklishin added this to the 3.8.18 milestone Jun 8, 2021
michaelklishin added a commit that referenced this pull request Jun 8, 2021
"handle_method(#'queue.delete'{},_)" can not process the case "{error,{exit, _, _}}"

(cherry picked from commit 15a26d2)
@michaelklishin
Copy link
Member

Backported to v3.8.x, will ship in 3.8.18.

This pull request was closed.
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.

2 participants