retry out of the method leads to endless loop consuming a lot of CPU resources
------------------------------------------------------------------------------

                 Key: JRUBY-1629
                 URL: http://jira.codehaus.org/browse/JRUBY-1629
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.x
         Environment: Ubuntu Linux 7.10
JRuby 1.1b1, from latest trunk
            Reporter: Vladimir Sizikov
            Assignee: Thomas E Enebo
            Priority: Critical


The following (intentionally broken) example:

def bad_meth_retry
  retry
end

bad_meth_retry()

Leads to LocalJumpError under MRI, but under JRuby the execution is stuck in 
endless loop, executing the method over and over again.

Here's the stacktrace:

"main" prio=10 tid=0x08058800 nid=0x2bd3 runnable [0xb7e18000..0xb7e19218]
   java.lang.Thread.State: RUNNABLE
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:144)
        at 
org.jruby.runtime.CallSite$ArgumentBoxingCallSite.call(CallSite.java:103)
        at retry.__file__(retry.rb:4)
        at retry.load(retry.rb)
        at org.jruby.Ruby.runScript(Ruby.java:578)
        at org.jruby.Ruby.runNormally(Ruby.java:508)
        at org.jruby.Ruby.runFromMain(Ruby.java:431)
        at org.jruby.Main.runInterpreter(Main.java:229)
        at org.jruby.Main.runInterpreter(Main.java:185)
        at org.jruby.Main.run(Main.java:116)
        at org.jruby.Main.run(Main.java:93)
        at org.jruby.Main.main(Main.java:84)

This problem leads to Rubinius spec test execution to hang:
spec/language//retry_spec.rb
The retry statement
- should raise LocalJumpError if used outside of a block

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to