Jenkins JVM Crash in libzip.so

Article ID:204374874
2 minute readKnowledge base

Issue

  • I see an issue similar to the following in jenkins.log or hs_err_pid:

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007f323fce91f0, pid=20630, tid=139853702534912
#
# JRE version: 7.0_25-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libzip.so+0xb1f0] __int128+0x60

Resolution

This is a well-known limitation of the JRE 8. Basically if a JVM opens a file using java.util.zip.ZipFile, and that file changes on disk while it is open, the JVM may crash. The application developer is simply responsible for ensuring this never happens.

Workaround

The workaround is to add the system property -Dsun.zip.disableMemoryMapping=true on startup to avoid the crash; note that it does not address the underlying application bug, but only prevents it from happening. In fact the crash per se only affects Unix machines: on Windows, the process would be physically blocked from changing the ZIP file while it was open, or conversely from starting to read a ZIP file while something else was writing.

Note: this issue has been fixed in JRE 9, not supported to run CloudBees Core at the moment (see CloudBees supported platforms for more details about supported Java versions)