Profiling should not bomb out trying to find method name
--------------------------------------------------------

                 Key: JRUBY-5583
                 URL: http://jira.codehaus.org/browse/JRUBY-5583
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC3
         Environment: jruby 1.6.0.RC3 (ruby 1.8.7 patchlevel 330) (2011-03-13 
a8e5382) (Java HotSpot(TM) Client VM 1.6.0_22) [darwin-i386-java]

Mac OS; JRuby built and run from "rvm" <http://rvm.beginrescueend.com/>

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

Rails 2.3
            Reporter: Rob Hunter
            Assignee: Thomas E Enebo
            Priority: Minor


When I running the specs for a (large) Rails app with the profiler and sample 
enabled I'm getting a Java stack trace thrown at exit. The spec runs normally, 
although it does take a very long time to start; much longer than JRuby 1.4 or 
1.5.


$ JRUBY_OPTS='--profile.flat --sample' spec spec/an_ordinary_spec.rb

.................................
Finished in 0.661 seconds

33 examples, 0 failures

main thread profile results:
Total time: 66.40

     total        self    children       calls  method
----------------------------------------------------------------
     65.55        0.02       65.53       11726  Kernel#require
     65.54        0.00       65.54          59  Kernel#load
[snip]
      8.38        0.00        8.38           1  Bundler.require
      8.38        0.00        8.38           1  Bundler::Runtime#require
      6.59        0.00        6.59           1  
Rails::Initializer#load_application_initializers
AbstractProfilePrinter.java:96:in `getMethodName': 
java.lang.ArrayIndexOutOfBoundsException: 105076
        from AbstractProfilePrinter.java:86:in `methodName'
        from FlatProfilePrinter.java:78:in `printProfile'
        from Ruby.java:2770:in `tearDown'
        from Ruby.java:2693:in `tearDown'
        from Main.java:201:in `internalRun'
        from Main.java:164:in `run'
        from Main.java:148:in `run'
        from Main.java:128:in `main'



I guess that it must be confused by an anonymous Ruby class, or one that has 
been garbage-collected. I can reproduce this locally, but it does seem to be 
triggered by this application's code (or its sheer size). I haven't been able 
to reproduce it outside of the app environment.


-- 
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