JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6343

Running Webrick in 1.9 mode is causing IllegalMonitorStateException

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major 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 :
      0

      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)

        Activity

        Hide
        Andrew Foster added a comment -

        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.

        Show
        Andrew Foster added a comment - 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.
        Hide
        Hiro Asari added a comment -

        A few comments:

        1. Your 1.7.0.dev build is almost 2 months old. Please try a newer build.
        2. I can't reproduce this problem with the current master build on Mac OS X, a skeleton 3.1.3 application.
        Show
        Hiro Asari added a comment - A few comments: Your 1.7.0.dev build is almost 2 months old. Please try a newer build. I can't reproduce this problem with the current master build on Mac OS X, a skeleton 3.1.3 application.
        Hide
        Andrew Foster added a comment -

        Hi Hiro, upgrading to jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-12 c036fd5) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [Windows 7-amd64-java]
        has fixed the problem. Thanks.

        Show
        Andrew Foster added a comment - Hi Hiro, upgrading to jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-12 c036fd5) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [Windows 7-amd64-java] has fixed the problem. Thanks.
        Hide
        Hiro Asari added a comment -

        Thanks for the confirmation.

        Show
        Hiro Asari added a comment - Thanks for the confirmation.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Andrew Foster
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: