Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

IBM J9 VM should also have INVOKEDYNAMIC_DEFAULT = false #477

Closed
bruceadams opened this Issue · 7 comments

3 participants

@bruceadams

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 https://github.com/jruby/jruby/blob/master/src/org/jruby/util/cli/Options.java 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('java.vm.name')
=> "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"
@bruceadams

The Java stack trace of the active thread at the time of the crash https://gist.github.com/4455839

@BanzaiMan
Owner

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

@bruceadams

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] https://github.com/jruby/jruby/issues/477
<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
@BanzaiMan
Owner

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

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 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@bruceadams bruceadams referenced this issue from a commit
@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.
4235816
@bruceadams

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 referenced this issue from a commit
@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.
3d87fc1
@BanzaiMan
Owner

Closing this.

@BanzaiMan BanzaiMan closed this
@martinott martinott referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
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.