-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[Truffle] jruby-truffle-tool produces optfail where jt.rb run succeeds #4400
Comments
This looks like a Graal bug, related to escape analysis, or maybe a bug in JRuby+Truffle. |
Hey, most definitely! Yep this is rubykon master, should all be easily reproducible I hope :) |
This seems a spurious bug. I could reproduce it a couple times in many tries. Note that you are using the
I would think this bug is fairly independent of which launcher is used, but one thing that the tool changes is it enables assertions. |
|
@eregon thanks, didn't update the README yet for the newest addition as I was sitll figuring stuff out but thought it had all changed, glad it hasn't :D I'll try again and if it clear will close out here. Thanks for the support! :) |
So, the benchmark runs now with No sure how confident I'm with publishing those benchmarks results then. they're also worse than what they should be/what they were when running with for reference, I ran
so I guess what I'm also saying is, I can reproduce this VERY reliably. Not sure if it does you any good, but I created a gist with all the errors - it's over 12 000 lines. |
Thanks for all the details! Running benchmarks with I'll try to reproduce tomorrow. |
@eregon ah I setup my machine anew again and haven't setup IRC yet, I'll try to restore my settings and roll. Has been too long since I hang out in Regarding jt.rb, yes it'll do but then only for my home rolled benchmarking library (that I wrote specifically to play nice with truffle/graal btw.) as it's in the repo and hence I don't need the rubygems/bundler functionality the tool gives me. It didn't show up so far, but I'll keep my eyes open when I rerun them :) Thanks for all the nice help! |
When assertions are enabled, it seems an The current benchmark takes a while to run, is there a smaller benchmark I could execute? Or some parameters I could tune? I can reproduce fairly frequently with GraalVM 0.18, but not with latest Graal. |
I'll take a look as well today or tomorrow. |
I'll see what I can do, was surprisingly out of home almost the whole day today :) There's a lot of micro benchmarks in You can of course try to tune warmup/time parameters (warmup is very generous precisely for truffle/graal) of benchmark.ips and benchmark.avg as well as the number of iterations in mcts_avg.rb ( All that said, I just ran |
I'll have to set this up as a benchmark in our CI system. Then we can run it reliably on all configurations and versions of Graal. Is |
Yes I see it in |
I have identified an issue triggered by this benchmark. GRAAL_BIN=... jt ruby -J-Xmx2G --graal --fg --trace -J-Dgraal.TraceTruffleAssumptions=true
-r.../rubykon/.jruby-truffle-tool_bundle/bundler/setup.rb
-I.../jruby/lib/ruby/truffle/jruby-truffle-tool/lib
benchmark/mcts_avg.rb That is, what It turns out there was a repeated deoptimization, caused by a bad transition when storing fields in a KeyValue pair object (used in @PragTob Could you try running with the latest commit on |
Hey I tried the IRC thing but no response so far, so posting here as I'll turn off IRC soon :) sadly the fix does not seem to work for me (I did git pull, then jt.rb build and then tried to execute the benchmark again) - still errors out for me |
@PragTob No indeed, you need latest Graal to avoid the |
Hey there! I got back on this and noticed that 0.19 was out and tried it out... sad to say it's still broken for me :( Well, some times. It takes a lot longer (before it'd trigger after seconds for me, this time more ~ 2minutes) to get the FrameWithoutBoxingError but I do get it after quite some time. jruby/truffle-head is b9fe9f0 and the graalvm is the 0.19-dk now. It also doesn't happen consistently anymore. I ran it 5 times (with the settings on master). It failed 3 times. The 2 times that it didn't fail I used Error is:
here is another one on another:
|
@PragTob Hello! If it does not spew messages it should work correctly. How was the performance in that case? |
Performance was good but also the standard deviation was a bit high even after the generous warmup time... so not too sure. I guess I'll try to compile graalvm, but only when I got a bit more time :) |
Sounds good :) |
I'm not afraid of the actual compile times, but more of dependency shenanigans :D I've been in this a good amount of time, still manually compiling still gives me a shiver and flashbacks from hour long dependency sessions like when I tried to compile gedit :D |
Compiling graal-core only requires the right JDK and the |
I guess I'm not clever enough for this, so I got an Oracle JDK 9, mx and stuff... now when I run mx build I can't seem to find where it puts the output aka the VM or whatever :D There is Also the README says to just run
But it's probably just something stupid that I forget :) |
@PragTob Just try Note that it's a bit simpler to build with a JVMCI-enabled JDK if that doesn't work.
|
Yes If you've managed to build then you should brea really to just do I usually have most trouble telling |
Closing to be replaced by oracle/truffleruby#1 |
FYI/to close this out with a new graal-core and head of truffleruby as of a couple of hours ago performance is amazing: old truffle from ~ a year ago:
New truffle:
Thanks for all the help along the way! |
Bingo! |
Awesome! |
Environment
my current state of truffle is: f1a26d6
Expected Behavior
I expect jruby-truffle-tool to work with ruby code that works when I do jt.rb run. Background: I have some gems so did the
jruby-truffle-tool setup
so that the benchmark-ips benchmarks can be run as well. Now that didn't work but it also breaks with my custom benchmarks :(Actual Behavior
I'd expect the following two to work/be roughly equivalent. It seems the
jruby-truffle-tool
adds quite a lot of CLI options but I'm far too far away from it to discern which one might cause the optfail.Thanks :)
The text was updated successfully, but these errors were encountered: