Bug 11927

Summary: SI_KERNEL SIGSEGV occurred on JVM initialization
Product: [Runtime] General Runtime Reporter: skumarbdc11 <s.kumar.bdc11>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium CC: brian.avery
Version: 2.3.1   
Target Milestone: 2.4   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
gdb_log
none
strace_log
none
strace_detail_log none

Description skumarbdc11 2017-08-14 08:02:04 UTC
Created attachment 3940 [details]
gdb_log

Hi,

I am not sure this is platform or application issue, need your help on analysing this issue.

The issue is about JVM (openjdk-8) crashes on genericx86 image due to SI_KERNEL SIGSEGV during its initialisation. Below are the details of the source.

Meta layer versions
-------------------
meta-poky: Pyro or Master
meta-java: Pyro

Local.conf changes
------------------
MACHINE ?= "genericx86"
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
PREFERRED_PROVIDER_virtual/java-initial = "cacao-initial-native"
PREFERRED_PROVIDER_virtual/java-native = "cacao-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
PREFERRED_RPROVIDER_java2-runtime = "openjdk-8"
CORE_IMAGE_EXTRA_INSTALL += "openjdk-8"

Image configuration (no customization)
--------------------------------------
$ bitbake core-image-x11

Similar defect has been raised (against different linux distro), link provided below, in openjdk bug system has been closed as not an issue in openjdk.
https://bugs.openjdk.java.net/browse/JDK-8181068

I have attached the strace and gdb traces for the same.

Also, I tried with kernel 4.4 but no change in result.

Due to this issue I had to switch back to openjdk-7. May be there is some configuration which has been missed in this build setup which is causing this issue. Need help in finding this out.

--
skumar
Comment 1 skumarbdc11 2017-08-14 08:02:51 UTC
Created attachment 3941 [details]
strace_log
Comment 2 skumarbdc11 2017-08-14 08:03:22 UTC
Created attachment 3942 [details]
strace_detail_log
Comment 3 skumarbdc11 2017-08-16 06:14:33 UTC
(In reply to comment #0)
> Created attachment 3940 [details]
> gdb_log
> 
> Hi,
> 
> I am not sure this is platform or application issue, need your help on
> analysing this issue.
> 
> The issue is about JVM (openjdk-8) crashes on genericx86 image due to
> SI_KERNEL SIGSEGV during its initialisation. Below are the details of the
> source.
> 
> Meta layer versions
> -------------------
> meta-poky: Pyro or Master
> meta-java: Pyro
> 
> Local.conf changes
> ------------------
> MACHINE ?= "genericx86"
> PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
> PREFERRED_PROVIDER_virtual/java-initial = "cacao-initial-native"
> PREFERRED_PROVIDER_virtual/java-native = "cacao-native"
> PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
> PREFERRED_RPROVIDER_java2-runtime = "openjdk-8"
> CORE_IMAGE_EXTRA_INSTALL += "openjdk-8"
> 
> Image configuration (no customization)
> --------------------------------------
> $ bitbake core-image-x11
> 
> Similar defect has been raised (against different linux distro), link
> provided below, in openjdk bug system has been closed as not an issue in
> openjdk.
> https://bugs.openjdk.java.net/browse/JDK-8181068
> 
> I have attached the strace and gdb traces for the same.
> 
> Also, I tried with kernel 4.4 but no change in result.
> 
> Due to this issue I had to switch back to openjdk-7. May be there is some
> configuration which has been missed in this build setup which is causing
> this issue. Need help in finding this out.
> 
> --
> skumar

Forgot to mention that I am also using the below layer in addition to poky and java as mentioned above

meta-openembedded/meta-oe - Pyro
Comment 4 Saul Wold 2017-08-18 23:46:28 UTC
So, I was able to reproduce this with a 32bit OS running on a 64bit processor using a MinnowBoard Turbot with 32bit firmware, it worked correctly on the same board with 64bit firmware and OS.  It also fails on a pure 32bit system.

One idea is to build a build-appliance-image and try building a java image on target.

I know you have a fall back to JDK7, I hope you can use that while we continue to invetiage this.
Comment 5 brian avery 2017-08-22 18:14:18 UTC
You could also build a core-image-sato-dev  which probably has enough on target development tools to build the openjdk-8.  
From reading the https://bugs.openjdk.java.net/browse/JDK-8181068 bug, it seems to be a problem with 32 bit configuration with the kernel which is in line with what we've seen on the vairous platforms we tried.

Interestingly qemux86 does not show this error...
Comment 6 brian avery 2017-09-14 20:43:06 UTC
This has been verified to be a repeatable bug on 32 bit x86 systems.  Unfortunately, fixing it is out of scope for core YP, so I am closing it.  The standing suggestion, if someone wanted to tackle it, would be to build a full dev image and do on target debugging (run jvm under gdb) and try to debug it that way. The jdk bug listed above in the comments points to it being a kernel issue and they closed it as well...
Comment 7 skumarbdc11 2017-09-18 11:28:02 UTC
I will try the provided suggestion of having dev on the target and build the JDK 8.

Also, I would like get clarification on the support for 32-bit x86 platform for Yocto as it is mentioned as out of scope. Please clarify as my main target is based on 32-bit x86 core.
Comment 8 brian avery 2017-10-14 17:40:39 UTC
I need to be more careful with my qualifiers, sorry. meta-java, as it is not part of oe-core is out of scope for YP to be able to spend a lot of resources on. 32-bit x86 platforms are in scope for the YP.