Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.5
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:jruby 1.7.0.dev (ruby-1.9.3-p0) (2011-11-17 f64c682) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [Windows 7-amd64-java]
-
Number of attachments :
Description
Start any Rails application in 1.9 mode on Webrick and then access the site.
You will get the following exceptions:
Exception in thread "RubyThread-14: c:/jruby-1.7.0/lib/ruby/1.9/webrick/server.rb:172" java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
at org.jruby.RubyThread.unlockAll(RubyThread.java:1199)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:114)
at java.lang.Thread.run(Thread.java:662)
Just as an addendum, the application still functions correctly and even Webrick still runs after the exception so its not critical.
Using Thread.Start anywhere in your own application though will cause the same problem so you cannot make any multithreaded apps.