Skip to content

IBM J9 VM should also have INVOKEDYNAMIC_DEFAULT = false #477

bruceadams opened this Issue Jan 4, 2013 · 7 comments

3 participants


Running JRuby 1.7.1 on

$ java -fullversion
java full version JRE 1.7.0 IBM Linux build pxi3270sr3-20121025_01(SR3)

will occasionally crash. They key error message associated with the crash appears to be:

sunvmi.211    *   ** ASSERTION FAILED ** at sunvmi.c:498: ((accessClass) != NULL)

Ideally the code in would recognize the IBM VM and disable invokedynamic by default.

Some of the relevant Java System Properties for the IBM VM:

irb(main):004:0> java_import java.lang.System
=> [Java::JavaLang::System]
irb(main):005:0> System.getProperty('')
=> "IBM J9 VM"
irb(main):006:0> System.getProperty('java.vm.version')
=> "2.6"
irb(main):007:0> System.getProperty('java.specification.version')
=> "1.7"

The Java stack trace of the active thread at the time of the crash

JRuby Team member

I don't have access to J9. Could you test the commit above?


Below is some parts of freenode #jruby earlier today. A key point is " I'd like to leave indy enabled on IBM ..." Also note that Daniel Heidinga from J9 team is looking at the issue and has developed a simplified test case that reproduces it.

I don't think we want a universal "no invokedynamic" for J9. We probably want to be have a version threshold, analogous to what is being done for HotSpot. Of course, we do not yet know what version of J9 we expect to work.

<bruceadams> [20:19:59]
<bruceadams> [20:20:05] i opened an issue...
<headius> [20:20:16] ok
<headius> [20:20:24] link a gist of full textual crash info
<headius> [20:20:29] I don't know what IBM provides
<headius> [20:20:37] I will tell J9 guys
<headius> [20:21:00] invokedynamic should be working for them, so they'll want to know about this
<bruceadams> [20:21:16] headius: cool. you can mention my name. i have an internal bug opened for the crash. (i work for IBM)
<headius> [20:23:52] bruceadams: oh I just emailed Daniel Heidinga from J9 team and linked your issue
<bruceadams> [20:24:12] headius: i'm not sure what context you'd like to see around the IBM Java crash. there are limits to what I can send. the application is not-yet-released IBM product (using JRuby 1.7.1 :-) )
<headius> [20:24:53] you should be able to work with Daniel directly then…I told him to pull me in if needed
<bruceadams> [20:25:08] headius: cool. thanks!
<headius> [20:25:10] I'd like to leave indy enabled on IBM, so hopefully this is something they can fix quickly
<bruceadams> [20:25:31] i'd be thrilled if it's fixed quickly.
<headius> [20:25:38] FWIW, you can always pass --properties to JRuby and see actual current settings for current environment
<bruceadams> [21:23:29] headius: i did chat with Daniel Heidinga and handed him multi-megabytes of post-crash JVM entrails. thanks for helping me make the connection!
<headius> [21:33:37] bruceadams: awesome, let us know how it goes
<headius> [21:34:15] erg…I am not feeling well, need to go dark for a while folks
<headius> [21:34:21] have a nice day
<bruceadams> [21:35:16] headius: just a few minutes ago Dan told me: "Just as an FYI, I've reproduced the issue with a simplified test case"
<bruceadams> [21:35:48] which is really great. my repro was fairly heavy (full app server startup for a 50/50 chance of a crash).
<headius> [21:36:58] Daniel's a champ…should go pretty quick
JRuby Team member

Well, if it turns out to be a J9 bug, then there is nothing for us to do here. The above commit hasn't made it to the master branch, so we'll just wait until IBM gets back to us.

@headius headius was assigned Jan 5, 2013

The J9 bug fix is APAR IV34500 (an IBM scheme for tracking bug fixes). The fix should be in IBM Java 7 SR4 that should be released in the next couple of months.

@bruceadams bruceadams added a commit that referenced this issue Jan 13, 2013
@bruceadams bruceadams Disable indy (by default) on early IBM Java 7 releases #477
Use the date stamp embedded in IBM Java's java.runtime.version
for deciding if the crash issue is present.

I have a better commit for defaulting to invokedynamic off for the first several releases of IBM Java 1.7. My aim here is to avoid hitting the JVM crash issue fixed by APAR IV34500. The fix should be released in the next month or two.

What I don't know is how common it is to hit the crash issue. The application I'm working hits the crash about every other time the application is started under WebSphere AppServer. I've only ever seen the crash on the first page hit. If the first page loads successfully, the application will continue to run fine.

It may be that my proposed change does not belong in JRuby, because the failure my change is trying to avoid may be uncommon enough and the failure mode (a JVM crash) is obvious enough.

@bruceadams bruceadams added a commit that referenced this issue Feb 13, 2013
@bruceadams bruceadams Default indy off for early IBM Java 7 releases #477
Use the date stamp embedded in IBM Java's java.runtime.version
for deciding if a known crash issue is present.
JRuby Team member

Closing this.

@BanzaiMan BanzaiMan closed this Feb 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.