pgsql-listen-exchange icon indicating copy to clipboard operation
pgsql-listen-exchange copied to clipboard

Add an exchange with Invalid host name will crash the process

Open vip30 opened this issue 4 years ago • 1 comments
trafficstars

Rabbitmq version: 3.8.12 Plugin version: 1.0.0a1

Here is the log when add a new exchange

Request to node rabbit@rabbitmq-node-1 failed with {'EXIT',
{noproc,
{gen_server,call,
[pgsql_listen_worker,
{validate,
{exchange,
{resource,<<"/">>,
exchange,<<"x">>},
'x-pgsql-listen',
true,false,false,[],
undefined,undefined,
undefined,
{[],[]},
#{user =>
<<"guest">>}}}]}}}

the log from the node container

rabbitmq-node-2_1  | 2021-03-23 03:53:28.540 [info] <0.1431.0> supervisor: {local,pgsql_listen_sup}, errorContext: child_terminated, reason: shutdown, offender: [{pid,<0.1433.0>},{id,mirroring},{mfargs,{mirrored_supervisor,start_internal,[pgsql_listen_sup,fun rabbit_misc:execute_mnesia_transaction/1,[{pgsql_listen_worker,{pgsql_listen_worker,start_link,[]},permanent,5000,worker,[pgsql_listen_worker]}]]}},{restart_type,permanent},{shutdown,4294967295},{child_type,worker}]
rabbitmq-node-2_1  | 2021-03-23 03:53:28.542 [error] <0.1431.0> Supervisor pgsql_listen_sup had child mirroring started with mirrored_supervisor:start_internal(pgsql_listen_sup, fun rabbit_misc:execute_mnesia_transaction/1, [{pgsql_listen_worker,{pgsql_listen_worker,start_link,[]},permanent,5000,worker,[pgsql_listen_worker]}]) at <0.1433.0> exit with reason shutdown in context child_terminated
rabbitmq-node-2_1  | 2021-03-23 03:53:28.542 [info] <0.1431.0> supervisor: {local,pgsql_listen_sup}, errorContext: shutdown, reason: reached_max_restart_intensity, offender: [{pid,<0.1433.0>},{id,mirroring},{mfargs,{mirrored_supervisor,start_internal,[pgsql_listen_sup,fun rabbit_misc:execute_mnesia_transaction/1,[{pgsql_listen_worker,{pgsql_listen_worker,start_link,[]},permanent,5000,worker,[pgsql_listen_worker]}]]}},{restart_type,permanent},{shutdown,4294967295},{child_type,worker}]
rabbitmq-node-2_1  | 2021-03-23 03:53:28.543 [error] <0.1431.0> Supervisor pgsql_listen_sup had child mirroring started with mirrored_supervisor:start_internal(pgsql_listen_sup, fun rabbit_misc:execute_mnesia_transaction/1, [{pgsql_listen_worker,{pgsql_listen_worker,start_link,[]},permanent,5000,worker,[pgsql_listen_worker]}]) at <0.1433.0> exit with reason reached_max_restart_intensity in context shutdown

Seems I added the exchange with an invalid hostname with more than 5 times will crash the process and will not back to normal except restart the server

seems related to https://github.com/epgsql/epgsql/issues/232

Thanks

vip30 avatar Mar 23 '21 03:03 vip30

Thanks for the link to the related issue. I'll take a look soon.

gmr avatar Mar 25 '21 20:03 gmr