Closed markcraig closed 11 years ago
Yeah, it seems I close the stream in the code, but I still try to write some log entry to it afterwards, will fix it up..
Should be fixed now, could you give it a go?
The fix works great when I either build the doc build plugin with Java 6, or get docbook-linktester and build it with Java 7, then build my plugin with Java 7.
I ran into a surprising crash when getting the version from the ForgeRock repo which I assume was built with Java 6, and then when I built my plugin and ran with Java 7.
[INFO] Running linktester...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff915ff24b, pid=4241, tid=7171
#
# JRE version: 7.0_17-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libsystem_c.dylib+0x2824b] memmove$VARIANT$sse3x+0x38e
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/mark/Documents/workspace/opendj/opendj3/hs_err_pid4241.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6
This is the JVM apparently crashing in native code. Excerpt...
Stack: [0x00000001017a8000,0x00000001018a8000], sp=0x00000001018a5360, free space=1012k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libsystem_c.dylib+0x2824b] memmove$VARIANT$sse3x+0x38e
C [libzip.dylib+0x3324] newEntry+0x31a
C [libzip.dylib+0x37d0] ZIP_GetEntry+0xa2
C [libzip.dylib+0x262a] Java_java_util_zip_ZipFile_getEntry+0xdd
J java.util.zip.ZipFile.getEntry(J[BZ)J
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J java.util.zip.ZipFile.getEntry(J[BZ)J
J java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;
j sun.net.www.protocol.jar.URLJarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;+2
j sun.net.www.protocol.jar.JarURLConnection.connect()V+62
j sun.net.www.protocol.jar.JarURLConnection.getInputStream()Ljava/io/InputStream;+1
j java.net.URL.openStream()Ljava/io/InputStream;+4
The fix also works fine when I take the Jenkins built doc plugin (built with the same version of Java), so I'd consider it done.
Thanks for confirming. I'm not quite sure about the JVM crash myself, but sounds like a Java 7 strangeness to me (and seems to be more related to Maven invoking my plugin than my plugin doing something nasty).
As described in https://bugster.forgerock.org/jira/browse/DOCS-69, in testing docbook-linktester (1.2.0-SNAPSHOT) encounters an error while writing the output file:
The output file exists but is of 0 length.