There is a crash caused by deleting upstream and upstream-set after deleting policy #4148
Unanswered
SunHaoran-1st
asked this question in
Questions
Replies: 2 comments 6 replies
-
Thank you for the detailed report. Since you can reproduce this issue, please try to do so using the latest version of RabbitMQ (3.9.13). |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hello lukebakken! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is some basic information:
RabbitMq version: 3.7.9
Erlang version: 21
OS: Centos7.8
I use federation with guides from rabbitmq.com, set upstream, upstream-set and policy apply-to exchange.
Most of the time, everything is ok, but sometimes, after deleting the policy, I try to delete upstream-set with those API(expected 204 No Content):
1.DELETE /api/policies/%s/%s HTTP/1.1
2.DELETE /api/parameters/federation-upstream-set/%s/%s HTTP/1.1
3.DELETE /api/parameters/federation-upstream/%s/%s HTTP/1.1
here is a crash:
2022-01-25 16:13:25.903 [error] <0.10756.0> CRASH REPORT Process <0.10756.0> with 0 neighbours exited with reason: no such process or port in call to gen_server:call(undefined, which_children, infinity) in gen_server:call/3 line 223 in gen_server:call/3 line 223
2022-01-25 16:13:25.904 [error] <0.10755.0> Ranch listener rabbit_web_dispatch_sup_15672, connection process <0.10755.0>, stream 1 had its request process <0.10756.0> exit with reason {noproc,{gen_server,call,[undefined,which_children,infinity]}} and stacktrace [{gen_server,call,3,[{file,"gen_server.erl"},{line,223}]},{rabbit_federation_link_sup,adjust,3,[{file,"src/rabbit_federation_link_sup.erl"},{line,34}]},{rabbit_federation_exchange_link_sup_sup,'-adjust/1-lc$^0/1-0-',2,[{file,"src/rabbit_federation_exchange_link_sup_sup.erl"},{line,51}]},{rabbit_federation_exchange_link_sup_sup,adjust,1,[{file,"src/rabbit_federation_exchange_link_sup_sup.erl"},{line,52}]},{rabbit_federation_parameters,adjust,1,[{file,"src/rabbit_federation_parameters.erl"},{line,80}]},{rabbit_mgmt_wm_parameter,delete_resource,2,[{file,"src/rabbit_mgmt_wm_parameter.erl"},{line,83}]},{cowboy_rest,call,3,[{file,"src/cowboy_rest.erl"},{line,1182}]},{cowboy_rest,expect,6,[{file,"src/cowboy_rest.erl"},{line,1164}]}]
I write some logs to get the information:

This crash caused by an undefined PID was sent as a parameter to

rabbit_federation_exchange_link_sup_sup.erl line:51
But, most of the time, deleting policy first and then deleting upstream-set will not cause the crash , because the return of mirrored_supervisor:which_children(?SUPERVISOR) is an empty list, like "[]".
This problem has troubled me for a long time. I don't know the intention of the process represented by that PID, and how to avoid this crash, please give me some advices, thanks!!!
ps:

I try to change the sequence of API, delete upstream-set first, delete the policy at the end, and I find that crash never occurs. But sometime the API has no return (Expected "204 No Content").
1.DELETE /api/parameters/federation-upstream/%s/%s HTTP/1.1
2.DELETE /api/parameters/federation-upstream-set/%s/%s HTTP/1.1
3.DELETE /api/policies/%s/%s HTTP/1.1
Beta Was this translation helpful? Give feedback.
All reactions