Wind River Support Network

HomeDefectsLIN8-9282
Fixed

LIN8-9282 : random rare crash when JVM process is created using the JVM invocation API

Created: Jun 7, 2018    Updated: Mar 27, 2019
Resolved Date: Mar 3, 2019
Found In Version: 8.0.0.25
Fix Version: 8.0.0.30
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Analysis

Description

The random crash that occurs when the process is creating the JVM using the JVM invocation API - JNI_CreateJavaVM.
The actual issue is that a testcase crashes once every 300 tries and the crash signal is several levels from the main app. 

And when the app does that we don't see any debug symbols. possibly because of stack corruption. So the issue is not the first time when you run gdb, it is when debug symbols stack is written over and over it gets corrupted. The output which we see in that case is something like this even with the debug patch you shared.

warning: core file may not match specified executable file.
[New LWP 9800]
Cannot access memory at address 0x77c2a8f4
Cannot access memory at address 0x77c2a8f0

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0fdf44ec in ?? ()
(gdb) bt
#0 0x0fdf44ec in ?? ()
#1 0x0fdf44e8 in ?? ()
#2 <signal handler called>
#3 0x77c00650 in ?? ()
#4 0x0fdfb630 in ?? ()
#5 0x0fec59bc in ?? ()
#6 0x0fc9cf2c in ?? ()
#7 0x10000754 in main (argc=-892679478, argv=0xcacacaca) at jvmLoaderTest.cpp:37
(gdb)



Expected output:
Try number 366
debug 1 
debug 3 
debug 4 
debug 5 

Try number 367
debug 1 
debug 3 
Segmentation fault

Try number 368
debug 1 
debug 3 
debug 4 
debug 5 

Try number 369
debug 1 
debug 3 

Steps to Reproduce

1 ) Create a project with this configuration:
/wr/installs/lx8/wrlinux-8/wrlinux/configure --with-layer=meta-java,common,common-downloads --enable-board=qemuppc --enable-kernel=standard --enable-rootfs=glibc-small --enable-reconfig=yes --enable-bootimage=cp│
io.gz.u-boot --enable-rm-oldimgs=yes --enable-internet-download=yes --with-template=feature/ntp428p10,feature/lttng,feature/jre8,feature/jdk8 --enable-unsupported-config --enable-ldconfig=yes --enable-package-ma│
nager=rpm --with-rcpl-version=0025       

2)  cd layers/meta-java/
git reset --hard aac1da4400f515a2fd711fa8e55aa6d6974e3d13
git apply --whitespace=fix  openjdk.patch

3) make fs

4) cp jvmLoaderTestPPC export/dist/

5) cp runJvmTest.sh  export/dist/

6) make start-target

7) cd /
 ./runJvmTest.sh


If the issue doesn't hit with the 500 tries, please run the script again.
Live chat
Online