Skip Menu |

This queue is for tickets about the Net-Jabber CPAN distribution.

Report information
The Basics
Id: 7564
Status: open
Priority: 0/
Queue: Net-Jabber

People
Owner: reatmon [...] mail.com
Requestors: aleksander.adamowski [...] altkom.pl
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.30
Fixed in: (no value)



Subject: Net-Jabber consumes all CPU when EPIPE (Broken pipe) occurs during write
I'm using a simple script that uses Net::Jabber to connect to a Jabber server using a dedicated account and send a notification message to another user. Occasionally, the script hangs and starts consuming all CPU. When I do a "strace -p PID" on the running script's process, I can see that it tries to write (apparently to a PIPE) all the time, and receives a "Broken pipe" error, but ignores it and tries writing in an infinite loop: getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- getpid() = 4596 write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., 53) = -1 EPIPE (Broken pipe)
I'm doing a check on syswrite and if it returns undef I'm shutting down the connection (I think). Can you send me the script that you are running? [guest - Mon Sep 6 07:07:21 2004]: Show quoted text
> I'm using a simple script that uses Net::Jabber to connect to a Jabber > server using a dedicated account and send a notification message to > another user. Occasionally, the script hangs and starts consuming > all CPU. > > When I do a "strace -p PID" on the running script's process, I can see > that it tries to write (apparently to a PIPE) all the time, and > receives a "Broken pipe" error, but ignores it and tries writing in > an infinite loop: > > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe) > --- SIGPIPE (Broken pipe) @ 0 (0) --- > getpid() = 4596 > write(6, "\27\3\1\0000T\321f\231\240\304\317/b\205r\217^km\26\246"..., > 53) = -1 EPIPE (Broken pipe)
From: Jeremy Lunn
I don't know if it's related (I couldn't get strace output like that), though I have a similar problem where the script starts chewing 99% of CPU and just locks up. Again it's a simple script though it does service discovery. It seems that it gets the <iq> response but doesn't execute the callback. See post at: http://mail.jabber.org/pipermail/jdev/2005-May/021078.html