[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
Platform: 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:

https://jenkins.opendaylight.org/releng/view/autorelease/job/autorelease-daily-lithium-jdk8/16/org.opendaylight.snmp$yang-oid-plugin/console



 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:

https://jenkins.opendaylight.org/releng/job/autorelease-daily-lithium-jdk8/23/org.opendaylight.snmp$yang-oid-plugin/console

Comment by Thanh Ha (zxiiro) [ 22/Jul/15 ]

This is still an issue, is anyone looking into this?

https://jenkins.opendaylight.org/releng/job/autorelease-daily-lithium-jdk8/31/org.opendaylight.snmp$yang-oid-plugin/console

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
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T13:10:27-07:00)
Maven home: /Users/jorosenb/opt/apache-maven-3.3.1
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

$ uname -a
Darwin JOROSENB-M-70SZ 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64

working linux mint environment:

$ mvn -v
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00)
Maven home: /home/jon/opt/maven
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-53-generic", arch: "amd64", family: "unix"

$ uname -a
Linux r 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

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)
Maven home: /home/jon/opt/maven
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-53-generic", arch: "amd64", family: "unix"

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
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00)
Maven home: /home/jon/opt/maven
Java version: 1.8.0_45-internal, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-53-generic", arch: "amd64", family: "unix"

(master) ~/projects/odl/snmp$ uname -a
Linux r 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

(master) ~/projects/odl/snmp$ java -version
openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

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 (ODLPARENT-19) which would also need to be merged.)

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)
> 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?

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:
https://jenkins.opendaylight.org/releng/job/autorelease-daily-lithium-jdk8/47/org.opendaylight.snmp$yang-oid-plugin/console

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
https://git.opendaylight.org/gerrit/25249

Comment by Thanh Ha (zxiiro) [ 09/Sep/15 ]

This was resolved.

Generated at Wed Feb 07 20:39:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.