[SNMP-4] yang-oid-plugin fails with jdk8 Created: 07/Jul/15 Updated: 09/Sep/15 Resolved: 09/Sep/15 |
|
| Status: | Resolved |
| Project: | snmp |
| Component/s: | General |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Thanh Ha (zxiiro) | Assignee: | Jon Rosenberger |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 3953 |
| Description |
|
We are seeing failure when building with jdk8 "FATAL ERROR in native method: processing of -javaagent failed". Full logs: |
| Comments |
| Comment by Jon Rosenberger [ 11/Jul/15 ] |
|
old version of jacoco is being used by this project |
| Comment by Jon Rosenberger [ 11/Jul/15 ] |
|
fixed in https://git.opendaylight.org/gerrit/24022 to test, "cd snmp ; mvn clean install" using jdk 1.8 |
| Comment by Thanh Ha (zxiiro) [ 17/Jul/15 ] |
|
I see a new build failure with: FATAL ERROR in native method: processing of -javaagent failed At the end of the Maven build it says: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project yang-oid-plugin: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? See yang-oid-plugin logs here: |
| Comment by Thanh Ha (zxiiro) [ 22/Jul/15 ] |
|
This is still an issue, is anyone looking into this? |
| Comment by Jon Rosenberger [ 22/Jul/15 ] |
|
I'm seeing a clean build of /snmp on both my environments which are running oracle JDK. I see your failure is java-1.8.0-openjdk-1.8.0.25-3.b17.el6_6.x86_64. I will try to reproduce using openjdk. working mac environment: $ mvn -v $ uname -a working linux mint environment: $ mvn -v $ uname -a |
| Comment by Jon Rosenberger [ 22/Jul/15 ] |
|
Sorry, that linux env is Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00) |
| Comment by Thanh Ha (zxiiro) [ 22/Jul/15 ] |
|
One key difference you may notice is that in the autorelease build we are building all of OpenDaylight in one Maven call. Memory usage jumps up quite a bit so we are building in a 16 GB VM with -Xmx=8g. I'm not sure if it's a memory issue but since javaagent is failing I'm wondering if it might be a possibility. However considering JDK7 version of the autorelease build seems to build just fine so I feel the memory should be sufficient. |
| Comment by Jon Rosenberger [ 22/Jul/15 ] |
|
unable to reproduce with openjdk 8 (building the /snmp tree alone, as before) (master) ~/projects/odl/snmp$ mvn -v (master) ~/projects/odl/snmp$ uname -a (master) ~/projects/odl/snmp$ java -version |
| Comment by Jon Rosenberger [ 29/Jul/15 ] |
|
The fix for this was to upgrade from jacoco 0.6.2.201302030002 which does not support JDK 8. This was done by removing the version number from the pom, so that the version from the parent (0.7.2.201409121644) is inherited. The parent being org.opendaylight.odlparent:odlparent:1.6.0-SNAPSHOT. Looking at odlparent I see that the version was upgraded some time ago 62aa3674 (Robert Varga 2014-11-26 18:34:38 +0100 80) <jacoco.version>0.7.2.201409121644</jacoco.version> However looking at the logs you have linked to, I see the old version of jacoco being used, and of course that version will fail: /bin/sh: line 1: 12676 Aborted (core dumped) /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-3.b17.el6_6.x86_64/jre/bin/java '-javaagent:/tmp/r/org/jacoco/org.jacoco.agent/0.6.2.201302030002/org.jacoco.agent-0.6.2.201302030002-runtime.jar It would appear that autorelease-daily-lithium is not building against the latest master version of the odlparent pom. Do some changes from /odlparent need to be merged into a branch? (If that's the case, I recently fixed another JDK8 bug in odlparent ( |
| Comment by Jon Rosenberger [ 30/Jul/15 ] |
|
odlparent 1.5.1 does have the change. seems you want this snmp code, which was merged to master, merged to lithium? what is the process for that? |
| Comment by Thanh Ha (zxiiro) [ 03/Aug/15 ] |
|
(In reply to Jon Rosenberger from comment #10) I found your patch here for master: https://git.opendaylight.org/gerrit/24413/ It is not yet merged into odlparent so we will need to wait until it is accepted to confirm. They will also need to cherry-pick it to the lithium branch of odlparent as well. autorelease always picks up the HEAD of each branch when it kicks off a build so if a patch is merged in it will automatically pick it up on the next build. |
| Comment by Jon Rosenberger [ 03/Aug/15 ] |
|
Yes we need https://git.opendaylight.org/gerrit/24413/ cherry-picked to lithium in odlparent. We also need https://git.opendaylight.org/gerrit/24022 cherry-picked to lithium in snmp. |
| Comment by Thanh Ha (zxiiro) [ 05/Aug/15 ] |
|
Seems to be resolved now in build: |
| Comment by Thanh Ha (zxiiro) [ 13/Aug/15 ] |
|
Based on integration-dev discussions we're gonna try to downgrade to Maven plugin plugin version 3.3 which seems to allow devs to continue to use Maven 3.1.1 to build while at the same time satisfying our JDK8 requirement. I submitted these 2 patches which also have corresponding lithium patches: https://git.opendaylight.org/gerrit/25247 |
| Comment by Thanh Ha (zxiiro) [ 09/Sep/15 ] |
|
This was resolved. |