OpenJDK 8 Segfault on Startup
attie.grande at argentum-systems.co.uk
Tue Nov 27 21:46:17 UTC 2018
On Mon, 26 Nov 2018 at 21:41, David Holmes <david.holmes at oracle.com> wrote:
> On 27/11/2018 12:22 am, Attie Grande wrote:
> > Hi All,
> > I apologise if this is the wrong list, if it is, please let me know.
> > After getting a "waiting approval" / "members-only list" response, I
> > had another look at the available lists, but still feel this is the
> > most suitable.
> hotspot-dev may be better.
> > I've been trying to get OpenJDK 8 running on Linux on an ARM platform,
> > using the Yocto Sumo recipes from meta-java .
> > Unfortunately, the result is a java executable that cannot startup
> > without hitting a SIGSEGV. Even running "simple" things like `java` or
> > `java -help` result in a segmentation fault.
> FYI the JVM will trigger SEGV as part of normal startup. The signal
> handler will deal with it. If you run under a debugger you need to step
> over these initial SEGVs.
> If you are crashing then it may be the signal handler has not been
> properly setup.
That's good information, thanks... I might try stepping over the first
(few) SEGVs and see what happens.
Unfortunately, running without GDB still results in a fatal error.
I've reposted my original attachment here, in case it's helpful.
> Of course it may be you are hitting the SEGV for a dozen other reasons
> related to the patches applied.
Understood - I'll be trying to produce a fastdebug build / remove some
> > Investigating with GDB shows that the segfault is in libjvm.so, but
> > there are no symbols in this region of memory, and the stack has been
> > destroyed (I suspect as part of the VM's operation?)
> > I've spent some time following the execution through this "fog of
> > war", and library functions like malloc(), strlen(), etc... are called
> > fairly regularly.
> > I'm confident that I've cleared the call to Arguments::parse() in
> > Threads::create_vm() , but this is getting messy, and surely cannot
> > be the correct way to debug JVM.
> > One of the last strings I see through strlen() before the segfault is
> > "I2C/C2I adapters", which points directly at
> > AdapterBlob::AdapterBlob() ... I don't know if that will give a
> > hint of state / progress to anyone in the know.
> > I've attached an error report: hs_err_pid5803.log.
> > - How would I go about debugging OpenJDK to figure out what's going on here?
> > - I have a series of patches applies (see below), are there any
> > obvious missing or harmful patches?
> > - Has anyone been down this road before?
> > Thanks in advance,
> > Attie
> > $ quilt series
> > patches/remove-shell-variables-from-autoheader.patch
> > patches/filter-aclocal-copy-too.patch
> > patches/dont-expect-fqpn-for-make.patch
> > patches/openjdk8-no-genx11-in-headless.patch
> > patches/openjdk8-no-unused-deps.patch
> > patches/openjdk8-find-compiler-fix-env-respect.patch
> > patches/openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch
> > patches/0001-jdk-comparison-between-pointer-and-integer.patch
> > patches/0002-hotspot-fix-compilation-with-security-flags-enabled.patch
> > patches/0003-jdk-Allow-using-a-system-installed-libjpeg.patch
> > patches/0004-jdk-Allow-using-a-system-installed-libpng.patch
> > patches/0005-hotspot-use-correct-include-for-poll.patch
> > patches/0006-hotspot-don-t-rely-on-old-SysV-SIGCLD.patch
> > patches/0007-jdk-use-correct-include-for-poll.patch
> > patches/0008-jdk-use-correct-include-for-signal.patch
> > patches/0009-jdk-disable-backtrace-musl-build-fix.patch
> > patches/0010-build-fix-build-on-as-needed-toolchains-generic.patch
> > patches/openjdk8-restrict-to-staging-dir.patch
> > patches/openjdk8-fix-shark-build.patch
> > patches/openjdk8-fix-shark-stdc++11.patch
> > patches/openjdk8-fix-assembler-flag-handling-in-makefile.patch
> > patches/openjdk8-fix-adlc-flags.patch
> > patches/openjdk8-add-missing-linker-flags.patch
> > patches/openjdk8-fix-libpng-neon-build.patch
> > : http://git.yoctoproject.org/cgit/cgit.cgi/meta-java/tree/recipes-core/openjdk?h=sumo
> > : https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/d2e3920d2fd0/src/share/vm/runtime/thread.cpp#l3335
> > : https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/d2e3920d2fd0/src/share/vm/code/codeBlob.cpp#l270
More information about the jdk-dev