Backtrace hopping between threads ?

M

Matthew Bloch

Hello, I just got this backtrace and don't understand something about
it:

F, [2010-04-14T14:19:11.039347 #28597] FATAL -- : can't clone NilClass
(SystemExit)
/usr/lib/ruby/1.8/rexml/text.rb:311:in `recvfrom'
/usr/lib/mauvealert/lib/mauve/server.rb:158:in `receive_waiting_packets'
/usr/lib/mauvealert/lib/mauve/server.rb:104:in `run'
/usr/lib/mauvealert/lib/mauve/server.rb:91:in `loop'
/usr/lib/mauvealert/lib/mauve/server.rb:91:in `run'
/usr/lib/mauvealert/bin/mauveserver:32
/usr/lib/mauvealert/bin/mauveserver:30:in `loop'
/usr/lib/mauvealert/bin/mauveserver:30
/usr/lib/mauvealert/mauve_starter.rb:22:in `load'
/usr/lib/mauvealert/mauve_starter.rb:22

Rather, I understand the exception, the line in server.rb:158 is this:

packets = [@socket.recvfrom(65535)]

@socket is just a UDPServer socket, and I'm wanting to read raw data.
So I don't understand how the backtrace includes a call to REXML.

Another Thread in the program is processing XMPP messages, that's the
only code path that would use REXML, so I assume there is a bug in that
part of the code, somehow the backtrace pops out in another Thread, and
I've lost the original context.

I don't have Thread.abort_on_exception set.

Is this a backtrace that appears to "cross threads" or is there some
legitimate reason a socket I/O call could call REXML? This is on
Debian/lenny's ruby, 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux].
 
R

Roger Pack

F, [2010-04-14T14:19:11.039347 #28597] FATAL -- : can't clone NilClass
(SystemExit)
/usr/lib/ruby/1.8/rexml/text.rb:311:in `recvfrom' ...
Another Thread in the program is processing XMPP messages, that's the
only code path that would use REXML, so I assume there is a bug in that
part of the code, somehow the backtrace pops out in another Thread, and
I've lost the original context.

I don't have Thread.abort_on_exception set.

Is this a backtrace that appears to "cross threads" or is there some
legitimate reason a socket I/O call could call REXML? This is on
Debian/lenny's ruby, 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux].

In Ruby, if the main thread exits "the whole program exits"
before "the whole program exits", though, it raises this exception on
each still running thread. Kind of like "get ready to die."
I think that's the way it is, anyway, and I'm pretty sure the program
still terminates if the threads rescue that exception, which makes me
wonder how that all works exactly, but HTH.
-rp
 
M

Matthew Bloch

[snip]

In Ruby, if the main thread exits "the whole program exits"
before "the whole program exits", though, it raises this exception on
each still running thread. Kind of like "get ready to die."
I think that's the way it is, anyway, and I'm pretty sure the program
still terminates if the threads rescue that exception, which makes me
wonder how that all works exactly, but HTH.

Thanks, I will try some experiments to see if I can get it to behave
that way again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top