Hi
Thank you for the research. I agree with you that the title is not
appropriate, however I wouldn't know how to change it.
Kind regards,
Theo
On Mon, Feb 25, 2013 at 12:23 AM, Peter Valdemar Mørch via RT <
bug-Net--RabbitMQ@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=79411 >
>
> The problem wasn't really about invalid passwords.
>
> The problem was that Net--RabbitMQ writes to a socket and the other end
> has closed that socket, which causes a SIGPIPE signal.
>
> I noticed it because my process exited when rabbitmq got restarted
> (which of course closes the socket).
>
> Setting up a dummy $SIG{'PIPE'} = 'IGNORE' as a workaround also worked
> for my use-case.
>
> The problem occurs in the destructor (see attached gdb backtrace), and
> so the process exists, when the $mq handle goes out of scope.
>
>
>
https://github.com/pmorch/Net--RabbitMQ/commit/44ad5380c7cea6da7796972ff8679bb636fc631a
> contains a fix (where the SIGPIPE is ignored tightly around write()).
> There is also more documentation in amqp_socket.c's
> write_ignore_pipe_signal() about the fix applied.
>
> I'll file a separate pull request for that on github.
>
> But basically my analysis leads me to believe that the perl process will
> exit because of an unhandled SIG{PIPE} whenever a handle goes out of
> scope (including because of an error) if the other end has disappeared
> for whatever reason.
>
> I suggest changing the title of the bug to "unhandled SIG{PIPE} causes
> process exit if rabbitmq server isn't there" ( I don't think I can do that
> )
>
>
> Program received signal SIGPIPE, Broken pipe.
> 0x00007ffff73de0d0 in __write_nocancel () from /lib/libpthread.so.0
> (gdb) bt
> #0 0x00007ffff73de0d0 in __write_nocancel () from /lib/libpthread.so.0
> #1 0x00007ffff5bcb014 in amqp_send_frame (state=0x62f5f0,
> frame=0x7fffffffd890) at amqp_connection.c:384
> #2 0x00007ffff5bde895 in amqp_send_method (state=0x62f5f0, channel=0,
> id=655420, decoded=0x7fffffffd9a0) at amqp_socket.c:249
> #3 0x00007ffff5bde926 in amqp_simple_rpc (state=0x62f5f0, channel=0,
> request_id=655420, expected_reply_ids=0x7fffffffd9d0,
> decoded_request_method=0x7fffffffd9a0) at amqp_socket.c:272
> #4 0x00007ffff5bc8f66 in amqp_connection_close (state=0x62f5f0, code=200)
> at amqp_api.c:118
> #5 0x00007ffff5bc6631 in XS_Net__RabbitMQ_DESTROY (my_perl=0x6,
> cv=0xab9e08)
> at RabbitMQ.xs:705
> #6 0x00007ffff7b1d675 in Perl_pp_entersub () from /usr/lib/libperl.so.5.10
> #7 0x00007ffff7abfe56 in Perl_call_sv () from /usr/lib/libperl.so.5.10
> #8 0x00007ffff7b2ffc6 in Perl_sv_clear () from /usr/lib/libperl.so.5.10
> #9 0x00007ffff7b307c2 in Perl_sv_free2 () from /usr/lib/libperl.so.5.10
> #10 0x00007ffff7b4c660 in Perl_free_tmps () from /usr/lib/libperl.so.5.10
> #11 0x00007ffff7b1ef30 in Perl_pp_nextstate () from
> /usr/lib/libperl.so.5.10
> #12 0x00007ffff7b1bbb6 in Perl_runops_standard () from
> /usr/lib/libperl.so.5.10
> #13 0x00007ffff7ac078c in perl_run () from /usr/lib/libperl.so.5.10
> #14 0x0000000000400f24 in main ()
>
>
>
--
Met vriendelijke groet,
Theo Bot
Network Management Engineer
Website:
http://www.proxy.nl
LinkedIn:
http://www.linkedin.com/in/theobot