[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: ThreadError w/WEBrick

Nathaniel Talbott

11/26/2003 12:28:00 PM

Nathaniel Talbott [mailto:nathaniel@NOSPAMtalbott.ws] wrote:

> I have a WEBrick server that runs fine for over three days,
> and then starts dumping the following error to stderr at a
> rate of about a gigabyte per half hour:
>
> [2003-11-25 11:15:02] ERROR ThreadError: stopping only thread
> note: use sleep to stop forever
> /usr/lib/ruby/1.8/thread.rb:276:in `stop'
>
> It has only happened twice so far, so I haven't been able to
> get a lot more information. I'll continue trying to debug
> the problem, but if someone has any ideas as to what could
> cause this, I'd be grateful. It's hard to debug something
> that waits three days to happen.
>
> I'm running Ruby 1.8.1preview2 on Debian Linux.

A few more things:

- As far as I can tell, the only place thread.rb line 276 gets called is
from webrick/server.rb line 90. I do not use a Queue anywhere in my code.

- Can someone give me an explanation of what "ThreadError: stopping only
thread" means? What is the general case that causes this error to be raised?

- Why don't I get a better backtrace for this error? The code (that I'm
assuming is calling it) in webrick/server.rb is protected by a rescue block
which should print out the full backtrace. Yet all I get is the one line.

- Any ideas on how to get more information? I'm having trouble thinking of
things to try with the process taking so long before it dies.

My plan at this point is to set up something to put the server under an
artificially heavy load, and see if the problem will show up faster. Any
ideas, thoughts, suggestions or fixes would be appreciated, though.

Thanks,


Nathaniel

<:((><


1 Answer

ts

11/26/2003 12:32:00 PM

0

>>>>> "N" == Nathaniel Talbott <nathaniel@NOSPAMtalbott.ws> writes:

N> - Can someone give me an explanation of what "ThreadError: stopping only
N> thread" means? What is the general case that causes this error to be
N> raised?

svg% ruby -e 'Thread.new { Thread.stop }'
svg%

svg% ruby -e 'Thread.stop'
-e:1:in `stop': stopping only thread (ThreadError)
note: use sleep to stop forever from -e:1
svg%


Guy Decoux