Bug 233470 - java/openjdk8: Frequent JVM crashes with devel/sbt on 12-RC1
Summary: java/openjdk8: Frequent JVM crashes with devel/sbt on 12-RC1
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-24 14:17 UTC by Mark Dixon
Modified: 2019-01-12 10:58 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
JVM error log (35.66 KB, text/plain)
2018-11-25 13:59 UTC, Mark Dixon
no flags Details
sbt 1.1.4 JVM crash dump (30.77 KB, text/plain)
2019-01-11 00:40 UTC, Bojan Petrovic
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_triage 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:

sbt.internal.io.FreeBSD64Milli$.$anonfun$getModifiedTimeNative$3(Ljava/lang/String;Lsbt/internal/io/FreeBSD64FileStat;)I+11

Afterwards, it goes to jna native stuff.

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

https://github.com/sbt/io/blob/87e9e49bb8faf829c5f3a0f9c69e5cb865309a6c/io/src/main/scala/sbt/internal/io/Milli.scala#L227


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"

https://github.com/sbt/io/commit/7a03684003ee19e7db995bade5e1b207c10b51ba
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).