Charles Oliver Nutter wrote:
Peter K Chan wrote:
I am receiving some occasional ClassCastException in my JRuby 1.1.1 app.
...
Since the exception directly kills the thread, I don't have a Ruby
stack trace to guess what piece of Ruby code caused the exception.
Full Java
stack trace is attached. Any idea what the problem may be?
It looks like the method handle for Symbol#to_s is getting used to call
against a String somewhere...but I'm not sure how that would happen.
Toss the traces into a bug and I'll have a look.
You know, it occurs to me now, you might be the first to have found a
potential thread unsafety in CallSite. I'd theorized it was there but
was never able to reproduce it.
The theory is this: If there are multiple calls coming into a call site
on different threads at different times, one thread may retrieve and
cache a method after the other thread has done the same but not yet made
its call yet. This would cause the method for one type of object to get
called against another, ending up in a class cast. Since it sounds like
your app is heavily threaded, I bet this is the case.
Get that bug file with whatever full traces you can provide and I'll
test the theory. It would fast-track us getting CallSite fixed.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email