-
Bug
-
Resolution: Fixed
-
P2
-
11, 12
-
b16
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8212100 | 11.0.2 | Jiangli Zhou | P2 | Closed | Fixed | b02 |
Generating and using an AppCDS shared archive causes the JDK to SIGSEGV under certain scenarios.
I am working on a utility to assist users generating and using an AppCDS archive for JRuby. The command allows the user to pass a "typical" command line to use when generating the class list for AppCDS.
When passing the simplest command line, "-e 1" which does nothing but evaluate a literal "1", the generated AppCDS archive appears to work properly with any subsequent commands.
However when passing a more intensive command line, "-S gem list" which lists all installed "Ruby gems", the resulting archive fails with the SIGSEGV seen below.
Reproducing:
1. Unpack a JRuby dist from jruby.org and put its `bin` dir in PATH.
2. Clone the appcds utility I wrote from https://github.com/jruby/jruby-startup.git
3. From the jruby-startup dir, run `jruby -Ilib bin/generate-appcds "-S gem list"`
4. The script will create a "jruby.jsa" and provide environment variables to set to use it with JRuby.
5. Set those environment variables and run any command with JRuby (like "jruby -e 1") and the crash output below results.
Crash output at command line:
$ VERIFY_JRUBY=1 JAVA_OPTS='-XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/Users/headius/projects/jruby/lib/jruby.jsa' jruby -e 1
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff70857a6f, pid=89717, tid=7939
#
# JRE version: (11.0+28) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11+28, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C [libz.1.dylib+0xca6f] gzclose_w+0xd7
#
# No core dump will be written. 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/headius/projects/jruby-startup/hs_err_pid89717.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
/Users/headius/projects/jruby/bin/jruby: line 425: 89717 Abort trap: 6 "$JAVACMD" $PROFILE_ARGS $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" --module-path "$JRUBY_CP$CP_DELIMITER$CP$CP_DELIMITER$CLASSPATH" "-Djruby.home=$JRUBY_HOME" "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby "-Djruby.shell=$JRUBY_SHELL" $java_class $mode "$@"
real 0m0.165s
user 0m0.071s
sys 0m0.083s
I will attach the full error dump file.
I am working on a utility to assist users generating and using an AppCDS archive for JRuby. The command allows the user to pass a "typical" command line to use when generating the class list for AppCDS.
When passing the simplest command line, "-e 1" which does nothing but evaluate a literal "1", the generated AppCDS archive appears to work properly with any subsequent commands.
However when passing a more intensive command line, "-S gem list" which lists all installed "Ruby gems", the resulting archive fails with the SIGSEGV seen below.
Reproducing:
1. Unpack a JRuby dist from jruby.org and put its `bin` dir in PATH.
2. Clone the appcds utility I wrote from https://github.com/jruby/jruby-startup.git
3. From the jruby-startup dir, run `jruby -Ilib bin/generate-appcds "-S gem list"`
4. The script will create a "jruby.jsa" and provide environment variables to set to use it with JRuby.
5. Set those environment variables and run any command with JRuby (like "jruby -e 1") and the crash output below results.
Crash output at command line:
$ VERIFY_JRUBY=1 JAVA_OPTS='-XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=/Users/headius/projects/jruby/lib/jruby.jsa' jruby -e 1
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff70857a6f, pid=89717, tid=7939
#
# JRE version: (11.0+28) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11+28, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C [libz.1.dylib+0xca6f] gzclose_w+0xd7
#
# No core dump will be written. 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/headius/projects/jruby-startup/hs_err_pid89717.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
/Users/headius/projects/jruby/bin/jruby: line 425: 89717 Abort trap: 6 "$JAVACMD" $PROFILE_ARGS $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" --module-path "$JRUBY_CP$CP_DELIMITER$CP$CP_DELIMITER$CLASSPATH" "-Djruby.home=$JRUBY_HOME" "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby "-Djruby.shell=$JRUBY_SHELL" $java_class $mode "$@"
real 0m0.165s
user 0m0.071s
sys 0m0.083s
I will attach the full error dump file.
- backported by
-
JDK-8212100 AppCDS crashes for some uses with JRuby
-
- Closed
-
- relates to
-
JDK-8213250 CDS archive creation aborts due to metaspace object allocation failure
-
- Resolved
-
-
JDK-8212149 [TESTBUG] Create stress test for archive heap regions
-
- Closed
-