Bug 233470

Summary: java/openjdk8: Frequent JVM crashes with devel/sbt on 12-RC1
Product: Ports & Packages Reporter: Mark Dixon <ports>
Component: Individual Port(s)Assignee: freebsd-java (Nobody) <java>
Status: Open ---    
Severity: Affects Some People CC: bojan_petrovic, java
Priority: --- Flags: bugzilla: maintainer-feedback? (java)
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
JVM error log
sbt 1.1.4 JVM crash dump none

Description Mark Dixon 2018-11-24 14:17:40 UTC
Seeing frequent JVM crashes running sbt on 12-RC1.

# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x000000080177cf4f, pid=9220, tid=0x0000000000018e35
# JRE version: OpenJDK Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: OpenJDK 64-Bit Server VM (25.181-b13 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x97cf4f]  JVM_FindSignal+0x18534f
# Core dump written. Default location: /usr/home/mark/dev/markdixon/java.core
# An error report file with more information is saved as:
# /usr/home/mark/dev/markdixon/hs_err_pid9220.log
# Compiler replay data is saved as:
# /usr/home/mark/dev/markdixon/replay_pid9220.log
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
Comment 1 Alex Dupre freebsd_committer 2018-11-24 16:13:42 UTC
This seems actually an openjdk issue, not a sbt one.
Comment 2 Mark Dixon 2018-11-24 17:32:47 UTC
Okay so assign to that port then?
Comment 3 Mark Dixon 2018-11-25 13:59:18 UTC
Created attachment 199543 [details]
JVM error log
Comment 4 Mark Dixon 2019-01-03 21:40:55 UTC
Confirmed via reddit this impacts others too. This used to work on FreeBSD 11.
Comment 5 Bojan Petrovic 2019-01-11 00:40:08 UTC
Created attachment 201008 [details]
sbt 1.1.4 JVM crash dump

I'm running 12.0-RELEASE-p1 r342631.

I compiled the java/openjdk8 with DEBUG option turned on, and sbt 1.1.4 constantly crashes.

The last frame belonging to sbt in the attached stack trace is:


Afterwards, it goes to jna native stuff.

sbt.io seems to be working with manual offsets into stat struct:


The stat.h was modified in r318736 ("Commit the 64-bit inode project"), which, as the commit message says, might break existing software.

This issue could be related to the crash in this bug, but it manifests itself regularly in DEBUG version of openjdk8, not sporadically.
Comment 6 Bojan Petrovic 2019-01-11 08:33:34 UTC
sbt-io handled this ABI change:

"Remove custom native FreeBSD code that broke in FreeBSD 12 because of ABI change"

Comment 7 Bojan Petrovic 2019-01-12 10:58:41 UTC
I haven't been able to reproduce the issue I mentioned when using ports version of sbt, because a `-Dsbt.io.jdktimestamps=true` was added to sbt options in devel/sbt (r488526).