Issue
-
I see an issue similar to the following in
jenkins.log
orhs_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
Environment
-
Operating System: Linux
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
-
CloudBees Jenkins Enterprise - Managed controller
-
CloudBees Jenkins Enterprise - Operations center
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)