Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singleton method handle stack overflow #4003

Closed
enebo opened this issue Jul 8, 2016 · 2 comments
Closed

singleton method handle stack overflow #4003

enebo opened this issue Jul 8, 2016 · 2 comments

Comments

@enebo
Copy link
Member

enebo commented Jul 8, 2016

Boom singletons have some problem with indy:

jruby -I. -rbenchmark -e 'file = "./lib/ruby/stdlib/prime.rb"; 1000.times { puts Benchmark.measure { 20.times { load file } } }'
...
  0.170000   0.010000   0.180000 (  0.132127)
  0.190000   0.000000   0.190000 (  0.119628)
  0.130000   0.000000   0.130000 (  0.130361)
  0.230000   0.010000   0.240000 (  0.126183)
Error: Your application used more stack memory than the safety cap of 2048K.
Specify -J-Xss####k to increase it (#### = cap size in KB).
Specify -w for full java.lang.StackOverflowError stack trace
TRACE 305455:
    java.lang.invoke.LambdaForm$DMH.1072591677.invokeVirtual_L_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$BMH.303563356.reinvoke(LambdaForm$BMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.1123629720.exactInvoker(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.798154996.delegate(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$reinvoker.1032986144.dontInline(LambdaForm$reinvoker:Unknown line)
    java.lang.invoke.LambdaForm$MH.917819120.guard(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.592688102.linkToCallSite(LambdaForm$MH:Unknown line)
    Users.enebo.work.jruby.lib.ruby.stdlib.singleton.RUBY$method$included$0(/Users/enebo/work/jruby/lib/ruby/stdlib/singleton.rb:165)
    java.lang.invoke.LambdaForm$DMH.249155636.invokeStatic_L7_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.1392425346.invokeExact_MT(LambdaForm$MH:Unknown line)
    org.jruby.internal.runtime.methods.CompiledIRMethod.invokeExact(CompiledIRMethod.java:241)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:106)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:163)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
    org.jruby.RubyClass.finvoke(RubyClass.java:770)
    org.jruby.runtime.Helpers.invoke(Helpers.java:407)
    org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:347)
    org.jruby.RubyModule.include(RubyModule.java:2572)
    org.jruby.RubyModule$INVOKER$i$include.call(RubyModule$INVOKER$i$include.gen:Unknown line)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
    org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314)
    org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
    org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
    org.jruby.internal.runtime.methods.InterpretedIRBodyMethod.interpretWithBacktrace(InterpretedIRBodyMethod.java:72)
    org.jruby.internal.runtime.methods.InterpretedIRBodyMethod.INTERPRET_CLASS(InterpretedIRBodyMethod.java:66)
    org.jruby.internal.runtime.methods.InterpretedIRBodyMethod.callInternal(InterpretedIRBodyMethod.java:48)
    org.jruby.internal.runtime.methods.InterpretedIRBodyMethod.call(InterpretedIRBodyMethod.java:37)
    org.jruby.ir.instructions.ProcessModuleBodyInstr.interpret(ProcessModuleBodyInstr.java:56)
    org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:191)
    org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:115)
    org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:112)
    org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:99)
    org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:35)
    org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    org.jruby.Ruby.runInterpreter(Ruby.java:849)
    org.jruby.Ruby.loadFile(Ruby.java:2986)
    org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:239)
    org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    org.jruby.runtime.load.LoadService.load(LoadService.java:340)
    org.jruby.RubyKernel.loadCommon(RubyKernel.java:968)
    org.jruby.RubyKernel.load19(RubyKernel.java:960)
    org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen:Unknown line)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:201)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:161)
    DashE.invokeOther0:load(-e:1)
    DashE.RUBY$block$-e$2(-e:1)
    java.lang.invoke.LambdaForm$DMH.258952499.invokeStatic_L8_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.1263877414.invokeExact_MT(LambdaForm$MH:Unknown line)
    org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:156)
    org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
    org.jruby.runtime.Block.yieldSpecific(Block.java:136)
    org.jruby.RubyFixnum.times(RubyFixnum.java:291)
    org.jruby.RubyFixnum$INVOKER$i$0$0$times.call(RubyFixnum$INVOKER$i$0$0$times.gen:Unknown line)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:303)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:141)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)
    DashE.invokeOther3:times(-e:1)
    DashE.RUBY$block$-e$1(-e:1)
    java.lang.invoke.LambdaForm$DMH.258952499.invokeStatic_L8_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.1263877414.invokeExact_MT(LambdaForm$MH:Unknown line)
    org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:156)
    org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
    org.jruby.runtime.Block.yieldSpecific(Block.java:136)
    org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:485)
    org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
    org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:191)
    org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:115)
    org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
    org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:75)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:139)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)
    DashE.invokeOther5:measure(-e:1)
    DashE.RUBY$block$-e$0(-e:1)
    java.lang.invoke.LambdaForm$DMH.258952499.invokeStatic_L8_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.1263877414.invokeExact_MT(LambdaForm$MH:Unknown line)
    org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:156)
    org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
    org.jruby.runtime.Block.yieldSpecific(Block.java:136)
    org.jruby.RubyFixnum.times(RubyFixnum.java:291)
    org.jruby.RubyFixnum$INVOKER$i$0$0$times.call(RubyFixnum$INVOKER$i$0$0$times.gen:Unknown line)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:303)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:141)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)
    DashE.invokeOther10:times(-e:1)
    DashE.RUBY$script(-e:1)
    java.lang.invoke.LambdaForm$DMH.821270929.invokeStatic_L7_L(LambdaForm$DMH:Unknown line)
    java.lang.invoke.LambdaForm$BMH.868737467.reinvoke(LambdaForm$BMH:Unknown line)
    java.lang.invoke.LambdaForm$MH.410495873.invoker(LambdaForm$MH:Unknown line)
    java.lang.invoke.LambdaForm$MH.55331187.invokeExact_MT(LambdaForm$MH:Unknown line)
    java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    org.jruby.ir.Compiler$1.load(Compiler.java:111)
    org.jruby.Ruby.runScript(Ruby.java:833)
    org.jruby.Ruby.runNormally(Ruby.java:748)
    org.jruby.Ruby.runNormally(Ruby.java:766)
    org.jruby.Ruby.runFromMain(Ruby.java:579)
    org.jruby.Main.doRunFromMain(Main.java:425)
    org.jruby.Main.internalRun(Main.java:313)
    org.jruby.Main.run(Main.java:242)
    org.jruby.Main.main(Main.java:204)
@enebo enebo added this to the JRuby 9.1.3.0 milestone Jul 8, 2016
@headius
Copy link
Member

headius commented Jul 8, 2016

I can't reproduce this without singleton.rb. It seems to be an oddity tied to the fact that this benchmark repeatedly reopens and singletonizes the same class. It may not be a common pattern.

@headius
Copy link
Member

headius commented Jul 9, 2016

Ok, I found the issue. I knew it was there but did not realize it could cause this problem.

Constant caching for indy invalidates based on two things: global invalidation of that constant name, whenever a new value is set somewhere; and if the target module is different than the last time (for inheritance searches a la Foo::Bar). If we invalidate because we encountered a new time, we turn the constant site into a PIC and cache the new value along with previous ones. If we invalidate because of something global, we want to clear the site, since all cached values are now invalid.

The broken logic unfortunately just build a chained PIC endlessly for both invalidation cases. The one here is for normal constant lookup, which does both a lexical search and a hierarchy search (searchConst) and only invalidates globally. Every time the global invalidation fired, it caused the constant lookups in Singleton#included to add another link to the chain. The logic in singleton.rb triggered a global invalidation every time, so these cached links were all dead. Every lookup then had to traverse a longer and longer chain of invalidated SwitchPoint guards before caching again.

I have changes I'll push shortly that bring constant caching in line with method caching, which has invalidation and polymorphic limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants