Debugging segmentation faults in the JVM on linux-powerpc

John Paul Adrian Glaubitz glaubitz at
Fri Jun 9 13:15:21 UTC 2017


I'm currently trying to fix the build of openjdk-9 (b170) on linux-powerpc
(PPC32) on Debian which fails with the following segmentation fault
(full build log available in [1]):

Creating images/jmods/java.desktop.jmod
/bin/rm -f /<<PKGBUILDDIR>>/build/images/jmods/java.desktop.jmod /<<PKGBUILDDIR>>/build/support/jmods/java.desktop.jmod
/<<PKGBUILDDIR>>/build/jdk/bin/jmod -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 create \
            --module-version 9-Debian \
            --target-platform 'linux-ppc' \
            --module-path /<<PKGBUILDDIR>>/build/images/jmods \
    --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \
    --libs /<<PKGBUILDDIR>>/build/support/modules_libs/java.desktop --cmds /<<PKGBUILDDIR>>/build/support/modules_cmds/java.desktop --config /<<PKGBUILDDIR>>/build/support/modules_conf/java.desktop --class-path /<<PKGBUILDDIR>>/build/jdk/modules/java.desktop --header-fil
es /<<PKGBUILDDIR>>/build/support/modules_include/java.desktop --legal-notices "/<<PKGBUILDDIR>>/build/support/modules_legal/java.base:/<<PKGBUILDDIR>>/src/jdk/src/java.desktop/unix/legal:/<<PKGBUILDDIR>>/src/jdk/src/java.desktop/share/legal" /<<PKGBUILDDIR>>/build/suppo
make[4]: *** [/<<PKGBUILDDIR>>/build/images/jmods/java.desktop.jmod] Segmentation fault
CreateJmods.gmk:133: recipe for target '/<<PKGBUILDDIR>>/build/images/jmods/java.desktop.jmod' failed
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/make'
make/Main.gmk:305: recipe for target 'java.desktop-jmod' failed
make[3]: *** [java.desktop-jmod] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'

To reproduce the segfault, I tried running the command above but whichever
way I try to run the jmod command, it just bails out with an error message
about insufficient memory:

(sid-powerpc-sbuild)root at kapitsa:/build/openjdk-9-2gWg6b/openjdk-9-9~b170/build/jdk/bin# ./jmod
Error occurred during initialization of boot layer
java.lang.OutOfMemoryError: Direct buffer memory
(sid-powerpc-sbuild)root at kapitsa:/build/openjdk-9-2gWg6b/openjdk-9-9~b170/build/jdk/bin#

This applies to all the various Java commands I tried (javac, java etc) as
well. Does anyone have an idea what I am overlooking here?

Also, does anyone have any pointers to debugging such issues in JVM? It's probably
not just a matter of loading the offending command into gdb with the proper
version of preloaded, is it?


> [1]

 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at
`. `'   Freie Universitaet Berlin - glaubitz at
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

More information about the hotspot-dev mailing list