This happens generally if something during the build changes a JAR file that is
currently open by the VM (e.g. a Maven plugin). If you compile a maven plugin
and then use it afterwards, you should split your maven build to do this in 2
separate maven invocations. This is a known bug to all JVMs: The native zlib
code reading the JAR files segfaults if a JAR file changes while opened by a
classloader.
Otherwise: Fix Maven or the plugin that opens the JAR file to call
URLClassLoader.close() if it detects Java 7. This can be done by doing
instanceof Closeable on your classloader and then close it using a cast:
If (classloader instanceof Closeable) {
((Closeable) classloader).close();
}
E.g. see this example: http://goo.gl/e5XHe
Of couse this would only work if you are using Java 7 to run Maven, the above
code will do nothing on Java 6 and the bugs stays.
Uwe
-----
Uwe Schindler
[email protected]
Apache Lucene PMC Member / Committer
Bremen, Germany
http://lucene.apache.org/
> -----Original Message-----
> From: Andy Seaborne [mailto:[email protected]]
> Sent: Sunday, June 02, 2013 11:01 AM
> To: [email protected]
> Subject: Re: exit code 143 from maven - cause?
>
> On 23/05/13 19:09, Andy Seaborne wrote:
> > Jena builds are getting exit code 143 from maven; the build seems to
> > going just fine up to that point.
> >
> > Does any one have any clues/pointers as to how to fix this?
> >
> > The only consistent point seems to be ubuntu4 but that was working OK
> > 2 days ago at build #653.
> >
> > The build is given 30 mins - it normally takes less than 5 mins.
> >
> > What the console shows is: extract from [1]
> >
> > ... ubuntu4 ...
> > ... several modules ...
> > ... end of surefire ...
> > ----------------
> >
> > Results :
> >
> > Tests run: 811, Failures: 0, Errors: 0, Skipped: 4
> >
> > ERROR: Maven JVM terminated unexpectedly with exit code 143 Sending
> > e-mails to: [email protected]
> > Finished: FAILURE
> > ---------------
> >
> > and it stops there. When it's working, the next line after tests is
> >
> > ---------------
> > [JENKINS] Recording test results
> > ---------------
> >
> > Andy
> >
> > [1]
> > https://builds.apache.org/view/H-
> L/view/Jena/job/Jena__Development_Tes
> > t/657/console
> >
> >
>
> We've had another couple of build failures in modules that haven't changed,
> this time the job ends at: again, both on ubuntu4, everythign else OK.
>
> Any suggestions on how to investigate?
>
> Andy
>
> --------------------
>
> Results :
>
> Tests run: 523, Failures: 0, Errors: 0, Skipped: 0
>
> ERROR: Maven JVM terminated unexpectedly with exit code 143
> --------------------
>
> or
>
> -------------------
> Results :
>
> Tests run: 28, Failures: 0, Errors: 0, Skipped: 0
>
> [JENKINS] Recording test results
> [INFO]
> [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jena-text --- [INFO]
> Building jar:
> <https://builds.apache.org/job/Jena_Text_Search/ws/jena-
> text/target/jena-text-0.0.0-SNAPSHOT.jar>
> [INFO]
> [INFO] --- maven-site-plugin:3.0:attach-descriptor (attach-descriptor) @
> jena-text ---
> ERROR: Maven JVM terminated unexpectedly with exit code 143
> -------------------