Skip to main content

Segmentation Fault running on Linux x86-x64

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
swiss_steve
Offline
Joined: 2010-04-13
Points: 0

Hi Guys,

I'm having issues running the Helloworld tests on RHEL 6. Everything compiles OK but squawk segfaults when I run a simple app. I'm using revision 745 from SVN https://svn.java.net/svn/squawk~svn
I noticed ./d gives '[preprocessing with forced JAVA5SYNTAX for vm2c]'. Should JAVA5SYNTAX be being forced?

Am I missing or doing something stupid?
See below for environment output:

OS:

<span class="Apple-tab-span" style="white-space:pre"> </span>Red Hat Enterprise Linux Server release 6.0 (Santiago)
<span class="Apple-tab-span" style="white-space:pre"> </span>Linux vm-rhel6.myplace.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
<span class="Apple-tab-span" style="white-space:pre"> </span>GLIBC-2.12


I'm not sure if the following is applicable:-

Java version:

<span class="Apple-tab-span" style="white-space:pre"> </span>bash-4.1$ java -version
<span class="Apple-tab-span" style="white-space:pre"> </span>java version &quot;1.6.0_17&quot;
<span class="Apple-tab-span" style="white-space:pre"> </span>OpenJDK Runtime Environment (IcedTea6 1.7.4) (rhel-1.21.b17.el6-x86_64)
<span class="Apple-tab-span" style="white-space:pre"> </span>OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


GCC version:

<span class="Apple-tab-span" style="white-space:pre"> </span>bash-4.1$ gcc -v
<span class="Apple-tab-span" style="white-space:pre"> </span>Using built-in specs.
<span class="Apple-tab-span" style="white-space:pre"> </span>Target: x86_64-redhat-linux
<span class="Apple-tab-span" style="white-space:pre"> </span>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
<span class="Apple-tab-span" style="white-space:pre"> </span>Thread model: posix
<span class="Apple-tab-span" style="white-space:pre"> </span>gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)


bash-4.1$ ./d
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
<span class="Apple-tab-span" style="white-space:pre"> </span>Platform: Linux-amd64
<span class="Apple-tab-span" style="white-space:pre"> </span>PLATFORM_TYPE=NATIVE
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2Collector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2GenerationalCollector=true
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.CheneyCollector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>[running copyphoneme...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building cldc-native-declarations...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[running cldc-native-declarations-gen...]
<span class="Apple-tab-span" style="white-space:pre"> </span>Skipping generation JNA files in ./cldc-native-declarations
<span class="Apple-tab-span" style="white-space:pre"> </span>[building cldc...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building debugger...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building translator...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building hosted-support...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[running squawk.jar...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building debugger-proxy...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building imp...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building javatest-device...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building mapper...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building romizer...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building ssl...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[building vm2c...]
<span class="Apple-tab-span" style="white-space:pre"> </span>Total time: 3s

<span class="Apple-tab-span" style="white-space:pre"> </span>bash-4.1$ ./d -prod -mac -o2 rom -metadata cldc imp debugger
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
<span class="Apple-tab-span" style="white-space:pre"> </span>Platform: Linux-amd64
<span class="Apple-tab-span" style="white-space:pre"> </span>PLATFORM_TYPE=NATIVE
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2Collector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2GenerationalCollector=true
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.CheneyCollector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>[running rom...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[running romize...]
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded suite stripping settings from squawk.library.properties
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded class excludes list from squawk.exclude
<span class="Apple-tab-span" style="white-space:pre"> </span>[translating suite squawk [closed: false, parent: null] ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>### Excluding compile: com.sun.squawk.Method::getParameterTypes
<span class="Apple-tab-span" style="white-space:pre"> </span>### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
<span class="Apple-tab-span" style="white-space:pre"> </span>[Including resource: META-INF/MANIFEST.MF]
<span class="Apple-tab-span" style="white-space:pre"> </span>[Including resource: META-INF/MANIFEST.MF]
<span class="Apple-tab-span" style="white-space:pre"> </span>[Including resource: META-INF/MANIFEST.MF]
<span class="Apple-tab-span" style="white-space:pre"> </span>[Including resource: META-INF/MANIFEST.MF]
<span class="Apple-tab-span" style="white-space:pre"> </span>[Including resource: META-INF/MANIFEST.MF]
[Including resource: META-INF/MANIFEST.MF]
<span class="Apple-tab-span" style="white-space:pre"> </span>**WARNING**: suite includes class 'com.sun.squawk.io.connections.ClasspathConnection' that is matched by exclusion spec 'com.sun.squawk.io.connections.ClasspathConnection'
<span class="Apple-tab-span" style="white-space:pre"> </span>### Excluding compile: com.sun.squawk.SymbolParser::stripMethods
<span class="Apple-tab-span" style="white-space:pre"> </span>Romizer processed 659 classes and generated 7 files.
<span class="Apple-tab-span" style="white-space:pre"> </span>[preprocessing with forced JAVA5SYNTAX for vm2c]
<span class="Apple-tab-span" style="white-space:pre"> </span>[running runvm2c...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[compiling floating point sources in vmcore/src/vm/fp ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[compiling native verification sources in vmcore/src/vm/util ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[compiling 'vmcore/src/vm/squawk.c' ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[linking 'squawk' ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[running squawk.jar...]
<span class="Apple-tab-span" style="white-space:pre"> </span>Total time: 37s

bash-4.1$ ./d user-suite tests/HelloWorld
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
<span class="Apple-tab-span" style="white-space:pre"> </span>CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
<span class="Apple-tab-span" style="white-space:pre"> </span>Platform: Linux-amd64
<span class="Apple-tab-span" style="white-space:pre"> </span>PLATFORM_TYPE=NATIVE
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2Collector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.Lisp2GenerationalCollector=true
<span class="Apple-tab-span" style="white-space:pre"> </span>GC_com.sun.squawk.CheneyCollector=false
<span class="Apple-tab-span" style="white-space:pre"> </span>[running user-suite...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[compiling user project at tests/HelloWorld...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[linking user project at tests/HelloWorld...]
<span class="Apple-tab-span" style="white-space:pre"> </span>[translating suite HelloWorld [closed: false, parent: squawk] ...]
<span class="Apple-tab-span" style="white-space:pre"> </span>Romizer processed 1 classes and generated 4 files.
<span class="Apple-tab-span" style="white-space:pre"> </span>Total time: 1s


bash-4.1$ ./squawk -suite:tests/HelloWorld/HelloWorld
<span class="Apple-tab-span" style="white-space:pre"> </span>Squawk VM caught signal 11
<span class="Apple-tab-span" style="white-space:pre"> </span>CRASH
<span class="Apple-tab-span" style="white-space:pre"> </span>si_code: 0x1
<span class="Apple-tab-span" style="white-space:pre"> </span>si_errno: 0
<span class="Apple-tab-span" style="white-space:pre"> </span>si_addr: 0x4f000000
<span class="Apple-tab-span" style="white-space:pre"> </span>Not in callout to native function.
<span class="Apple-tab-span" style="white-space:pre"> </span>Resuming system signal handler...
<span class="Apple-tab-span" style="white-space:pre"> </span>Segmentation fault (core dumped)


bash-4.1$ ./squawk -veryverbose -suite:tests/HelloWorld/HelloWorld
[Klass.forName(com.sun.squawk.io.j2me.file.Protocol)]
[initializing class com.sun.squawk.io.j2me.file.Protocol]
[initializing interface com.sun.squawk.platform.posix.natives.LibC]
[Klass.forName(com.sun.squawk.platform.posix.natives.LibC)]
[Klass.forName(com.sun.squawk.platform.posix.linux.natives.LibCImpl)]
[initializing class com.sun.squawk.platform.posix.linux.natives.LibCImpl]

Squawk VM caught signal 11
CRASH
    si_code: 0x1
    si_errno: 0
    si_addr: 0x4f000000
    Not in callout to native function.
Resuming system signal handler...


Coredump output using gdb:
<span class="Apple-tab-span" style="white-space:pre"> </span>bash-4.1$ gdb ./squawk core.31977
<span class="Apple-tab-span" style="white-space:pre"> </span>GNU gdb (GDB) Red Hat Enterprise Linux (7.1-29.el6)

<span class="Apple-tab-span" style="white-space:pre"> </span>Copyright (C) 2010 Free Software Foundation, Inc.
<span class="Apple-tab-span" style="white-space:pre"> </span>License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
<span class="Apple-tab-span" style="white-space:pre"> </span>This is free software: you are free to change and redistribute it.
<span class="Apple-tab-span" style="white-space:pre"> </span>There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
<span class="Apple-tab-span" style="white-space:pre"> </span>and &quot;show warranty&quot; for details.
<span class="Apple-tab-span" style="white-space:pre"> </span>This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.
<span class="Apple-tab-span" style="white-space:pre"> </span>For bug reporting instructions, please see:
<span class="Apple-tab-span" style="white-space:pre"> </span>&lt;http://www.gnu.org/software/gdb/bugs/&gt;...
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /home/ppadmin/squawk/trunk/squawk...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>[New Thread 31977]
<span class="Apple-tab-span" style="white-space:pre"> </span>[New Thread 31978]
<span class="Apple-tab-span" style="white-space:pre"> </span>Missing separate debuginfo for
<span class="Apple-tab-span" style="white-space:pre"> </span>Try: yum --disablerepo='*' --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/85/756cec1977a6d3ae65be87c2878591481668d7
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/libdl.so.2
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/libm.so.6
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/libnsl.so.1
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/libpthread.so.0
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/libc.so.6
<span class="Apple-tab-span" style="white-space:pre"> </span>Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
<span class="Apple-tab-span" style="white-space:pre"> </span>Loaded symbols for /lib/ld-linux.so.2
<span class="Apple-tab-span" style="white-space:pre"> </span>Core was generated by `./squawk -suite:tests/HelloWorld/HelloWorld'.
<span class="Apple-tab-span" style="white-space:pre"> </span>Program terminated with signal 11, Segmentation fault.
<span class="Apple-tab-span" style="white-space:pre"> </span>#0  0x00c6bc18 in __strcmp_ssse3 () from /lib/libc.so.6
<span class="Apple-tab-span" style="white-space:pre"> </span>Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.7.el6.i686
<span class="Apple-tab-span" style="white-space:pre"> </span>(gdb) bt
<span class="Apple-tab-span" style="white-space:pre"> </span>#0  0x00c6bc18 in __strcmp_ssse3 () from /lib/libc.so.6
<span class="Apple-tab-span" style="white-space:pre"> </span>#1  0x0804d49b in sysdlsym ()
<span class="Apple-tab-span" style="white-space:pre"> </span>#2  0x0804fdfc in cioExecute ()
<span class="Apple-tab-span" style="white-space:pre"> </span>#3  0x08055e4c in Squawk_continue ()
<span class="Apple-tab-span" style="white-space:pre"> </span>#4  0x080579f8 in Squawk_main ()
<span class="Apple-tab-span" style="white-space:pre"> </span>#5  0x08057a3a in Squawk_main_wrapper ()
<span class="Apple-tab-span" style="white-space:pre"> </span>#6  0x08057a5b in main ()

Regards,

Steve

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
derek_white
Offline
Joined: 2006-09-08
Points: 0

Yep, that's a problem. I just did some more testing - it hits Solaris build too. Looking into it...