signal 11 issue using JNI

Discussion in 'Java' started by ron, Jul 28, 2003.

  1. ron

    ron Guest

    hi all,

    i've been working on a problem for days now and not making any
    progress, i'm hoping someone out there can help:

    i am using JNI to access a C++ API (it's well tested and stable).
    when i build the native modeule (the .so) on redhat 8.0 with gcc 3.2
    and run it on the blackdown JVM (compiled with gcc 3.2) everything
    works fine.

    however, i have a requirement that the application must run on redhat
    7.2. so i installed rh7.2 and tried to run my app. it wouldn't run
    because the c/c++ runtime libraries are of an older version on 7.2 and
    the ABI for gcc2.96 and gcc3.2 is different. so i recompiled the
    native module with 2.96 and got a signal 11 outside the VM. so i
    upgraded gcc and the standard c++ libraries to version 3.0.4 (the
    latest available for rh72) and tried again. same error (see below).
    this is also the error i get when i try to run this app with the sun
    jvm (btw, all JVMs i use are 1.4.1).

    i'm guessing this is some sort of compiler/library incompatibility
    issue, but my linux/c++ skills are rusty and i don't know how to go
    about resolving this. the strange thing is that the calls to the
    native c++ file that i wrote (cpp file corresponding to the h file
    generated by javah) succeed and return if i make no calls to the C++
    API i'm trying to integrate with, but as soon as a call into that API
    is made, signal 11. it might also be relevant to mention that i'm
    accessing the C++ API by compiling and linking it's source statically
    directly with my cpp files, so it's not an issue with how the C++ API
    is linked.

    any help or insight would be greatly appreciated. please email me
    directly (roncarmel AT yahoo DOT com) as i don't often read
    newsgroups.

    here is the error:

    An unexpected exception has been detected in native code outside the
    VM.
    Unexpected Signal : 11 occurred at PC=0xBFFFCB75
    Function=[Unknown.]
    Library=(N/A)

    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for
    possible
    reason and solutions.


    Current Java thread:
    at com.primordialsoftware.imageio.plugins.openexr.OpenEXR.readHeader(Native
    Method)
    - locked <0x441b4b08> (a
    com.primordialsoftware.imageio.plugins.openexr.OpenEXR)
    at com.primordialsoftware.imageio.plugins.openexr.OpenExrImageReaderSpi.canReadHeader(OpenExrImageReaderSpi.java:72)
    at com.primordialsoftware.imageio.plugins.openexr.OpenExrImageReaderSpi.canDecodeInput(OpenExrImageReaderSpi.java:50)
    at com.primordialsoftware.ooze.util.ImageUtilHack.read(ImageUtilHack.java:63)
    - locked <0x483c09f8> (a java.lang.Class)
    at com.primordialsoftware.ooze.test.OpenEXRTest2.<init>(OpenEXRTest2.java:64)
    at com.primordialsoftware.ooze.test.OpenEXRTest2.main(OpenEXRTest2.java:45)

    Dynamic libraries:
    08048000-0804e000 r-xp 00000000 03:03 1206482
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/bin/java
    0804e000-0804f000 rw-p 00005000 03:03 1206482
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/bin/java
    40000000-40013000 r-xp 00000000 03:03 587423 /lib/ld-2.3.2.so
    40013000-40014000 rw-p 00013000 03:03 587423 /lib/ld-2.3.2.so
    40014000-4001d000 r-xp 00000000 03:03 1059679
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/native_threads/libhpi.so
    4001d000-4001e000 rw-p 00008000 03:03 1059679
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/native_threads/libhpi.so
    4001f000-40022000 r--s 00000000 03:03 831871
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/ext/dnsns.jar
    40022000-40023000 r--s 00000000 03:03 798847
    /home/ron/morph/lib/oozemedia.jar
    40025000-40032000 r-xp 00000000 03:03 1042446
    /lib/i686/libpthread-0.10.so
    40032000-40035000 rw-p 0000d000 03:03 1042446
    /lib/i686/libpthread-0.10.so
    40075000-40077000 r-xp 00000000 03:03 586391 /lib/libdl-2.3.2.so
    40077000-40078000 rw-p 00002000 03:03 586391 /lib/libdl-2.3.2.so
    40078000-40390000 r-xp 00000000 03:03 1011013
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/client/libjvm.so
    40390000-40574000 rw-p 00317000 03:03 1011013
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/client/libjvm.so
    40585000-40598000 r-xp 00000000 03:03 586395 /lib/libnsl-2.3.2.so
    40598000-40599000 rw-p 00012000 03:03 586395 /lib/libnsl-2.3.2.so
    4059b000-405bc000 r-xp 00000000 03:03 1042444
    /lib/i686/libm-2.3.2.so
    405bc000-405bd000 rw-p 00021000 03:03 1042444
    /lib/i686/libm-2.3.2.so
    405bd000-405cd000 r-xp 00000000 03:03 538596
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libverify.so
    405cd000-405cf000 rw-p 0000f000 03:03 538596
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libverify.so
    405cf000-405f0000 r-xp 00000000 03:03 538584
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libjava.so
    405f0000-405f2000 rw-p 00020000 03:03 538584
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libjava.so
    405f2000-40607000 r-xp 00000000 03:03 538597
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libzip.so
    40607000-40609000 rw-p 00014000 03:03 538597
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libzip.so
    40609000-41cd8000 r--s 00000000 03:03 489420
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/rt.jar
    41d1b000-41d32000 r--s 00000000 03:03 489421
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/sunrsasign.jar
    41d32000-41da3000 r--s 00000000 03:03 489414
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/jsse.jar
    41da3000-41db6000 r--s 00000000 03:03 489413
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/jce.jar
    41fe0000-41fee000 r--s 00000000 03:03 831873
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/ext/ldapsec.jar
    41fee000-41fef000 r-xp 00000000 03:03 635309
    /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
    41fef000-41ff0000 rw-p 00000000 03:03 635309
    /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
    41ff0000-41ffb000 r-xp 00000000 03:03 586411
    /lib/libnss_files-2.3.2.so
    41ffb000-41ffc000 rw-p 0000a000 03:03 586411
    /lib/libnss_files-2.3.2.so
    42000000-42134000 r-xp 00000000 03:03 1043736
    /lib/i686/libc-2.3.2.so
    42134000-42139000 rw-p 00134000 03:03 1043736
    /lib/i686/libc-2.3.2.so
    4413b000-4413f000 r-xp 00000000 03:03 1091404
    /usr/X11R6/lib/libXtst.so.6.1
    4413f000-44140000 rw-p 00004000 03:03 1091404
    /usr/X11R6/lib/libXtst.so.6.1
    4c1c1000-4c3c1000 r--p 00000000 03:03 457004
    /usr/lib/locale/locale-archive
    4c5c5000-4c664000 r--s 00000000 03:03 831874
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/ext/localedata.jar
    4c664000-4c681000 r--s 00000000 03:03 831875
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/ext/sunjce_provider.jar
    4c681000-4c949000 r-xp 00000000 03:03 538576
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libawt.so
    4c949000-4c95e000 rw-p 002c7000 03:03 538576
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libawt.so
    4c984000-4c9d7000 r-xp 00000000 03:03 538592
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libmlib_image.so
    4c9d7000-4c9d8000 rw-p 00052000 03:03 538592
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libmlib_image.so
    4c9d8000-4c9e3000 r--s 00000000 03:03 798790
    /home/ron/morph/lib/kunststoff.jar
    4c9e3000-4c9e8000 r--s 00000000 03:03 555175
    /home/ron/morph/work/package/Linux/ooze-0.1/lib/openexr.jar
    4c9e8000-4c9ef000 r-xp 00000000 03:03 1091394
    /usr/X11R6/lib/libXp.so.6.2
    4c9ef000-4c9f0000 rw-p 00006000 03:03 1091394
    /usr/X11R6/lib/libXp.so.6.2
    4c9f0000-4ca3e000 r-xp 00000000 03:03 1091402
    /usr/X11R6/lib/libXt.so.6.0
    4ca3e000-4ca42000 rw-p 0004d000 03:03 1091402
    /usr/X11R6/lib/libXt.so.6.0
    4ca42000-4ca4f000 r-xp 00000000 03:03 1091382
    /usr/X11R6/lib/libXext.so.6.4
    4ca4f000-4ca50000 rw-p 0000c000 03:03 1091382
    /usr/X11R6/lib/libXext.so.6.4
    4ca50000-4cb2b000 r-xp 00000000 03:03 1091374
    /usr/X11R6/lib/libX11.so.6.2
    4cb2b000-4cb2e000 rw-p 000da000 03:03 1091374
    /usr/X11R6/lib/libX11.so.6.2
    4cb2e000-4cb36000 r-xp 00000000 03:03 1091372
    /usr/X11R6/lib/libSM.so.6.0
    4cb36000-4cb37000 rw-p 00007000 03:03 1091372
    /usr/X11R6/lib/libSM.so.6.0
    4cb37000-4cb4b000 r-xp 00000000 03:03 1091368
    /usr/X11R6/lib/libICE.so.6.3
    4cb4b000-4cb4c000 rw-p 00013000 03:03 1091368
    /usr/X11R6/lib/libICE.so.6.3
    4cb4e000-4cbc9000 r--s 00000000 03:03 799269
    /home/ron/morph/lib/icons.jar
    4cbc9000-4cbe5000 r--s 00000000 03:03 799270
    /home/ron/morph/lib/jlfgr-1_0.jar
    4cbe5000-4cc2c000 r--s 00000000 03:03 799272
    /home/ron/morph/lib/vecmath.jar
    4cc2c000-4cc5e000 r--s 00000000 03:03 684943
    /home/ron/morph/tools/Linux/jai-1_1_1_01/lib/jai_codec.jar
    4cc5e000-4cdbc000 r--s 00000000 03:03 684944
    /home/ron/morph/tools/Linux/jai-1_1_1_01/lib/jai_core.jar
    4cdbc000-4cdc6000 r--s 00000000 03:03 684946
    /home/ron/morph/tools/Linux/jai-1_1_1_01/lib/mlibwrapper_jai.jar
    4cdc6000-4ce9e000 r--s 00000000 03:03 766023
    /home/ron/morph/tools/Linux/jai_imageio-1_0-rc/jai_imageio.jar
    4ce9e000-4cea7000 r--s 00000000 03:03 766024
    /home/ron/morph/tools/Linux/jai_imageio-1_0-rc/clibwrapper_jiio.jar
    4cea7000-4ceb1000 r--s 00000000 03:03 766026
    /home/ron/morph/tools/Linux/jai_imageio-1_0-rc/mlibwrapper_jai.jar
    4ceb1000-4cf77000 r-xp 00000000 03:03 538580
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libfontmanager.so
    4cf77000-4cf92000 rw-p 000c5000 03:03 538580
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libfontmanager.so
    4cf92000-4cfc6000 r-xp 00000000 03:03 343190
    /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    4cfc6000-4cfd2000 rw-p 00033000 03:03 343190
    /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    4d055000-4d05b000 r--s 00000000 03:03 977478
    /usr/lib/gconv/gconv-modules.cache
    4d05b000-4d077000 r-xp 00000000 03:03 635307
    /usr/X11R6/lib/X11/locale/common/ximcp.so.2
    4d077000-4d079000 rw-p 0001b000 03:03 635307
    /usr/X11R6/lib/X11/locale/common/ximcp.so.2
    4d0fa000-4d152000 r-xp 00000000 03:03 538577
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libcmm.so
    4d152000-4d154000 rw-p 00057000 03:03 538577
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libcmm.so
    4d154000-4d18c000 r-xp 00000000 03:03 538589
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libjpeg.so
    4d18c000-4d18e000 rw-p 00037000 03:03 538589
    /home/ron/morph/tools/Linux/j2sdk1.4.1_02/jre/lib/i386/libjpeg.so
    4d18e000-4d195000 r-xp 00000000 03:03 586451
    /lib/libgcc_s-3.2-20020903.so.1
    4d195000-4d196000 rw-p 00007000 03:03 586451
    /lib/libgcc_s-3.2-20020903.so.1
    4d1cf000-4d26b000 r-xp 00000000 03:03 554705
    /home/ron/morph/work/package/Linux/ooze-0.1/bin/libopenexr.so
    4d26b000-4d277000 rw-p 0009b000 03:03 554705
    /home/ron/morph/work/package/Linux/ooze-0.1/bin/libopenexr.so
    4d277000-4d283000 r-xp 00000000 03:03 342161
    /usr/lib/libz.so.1.1.4
    4d283000-4d285000 rw-p 0000b000 03:03 342161
    /usr/lib/libz.so.1.1.4
    4d285000-4d31d000 r-xp 00000000 03:03 343160
    /usr/lib/libstdc++.so.5.0.1
    4d31d000-4d332000 rw-p 00098000 03:03 343160
    /usr/lib/libstdc++.so.5.0.1
    ron, Jul 28, 2003
    #1
    1. Advertising

  2. On 28 Jul 2003 12:37:35 -0700, (ron) wrote:

    > any help or insight would be greatly appreciated. please email me
    > directly (roncarmel AT yahoo DOT com) as i don't often read
    > newsgroups.


    It's hard to say. I would suggest running the failing app in
    gdb and trying to trace it that way. Build it will full
    symbols first, of course.

    If this an SMP box, make darn sure you are using a 2.4.18 or
    later kernel, prior to that kernel level there are nasty
    bugs regards Java on SMP boxes. I'd take a gander at the
    release notes for your JVM version and see if it has any
    special notes on Linux JNI issues (required library levels,
    etc.)

    If you don't find anything, I'd start with a simple test
    library with a dummy native method and test that out to see
    if it works ok.

    --Joe
    Joseph Millar, Jul 28, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Pronath
    Replies:
    1
    Views:
    1,140
    Diez B. Roggisch
    Jan 3, 2005
  2. Jack Orenstein

    threading.Thread vs. signal.signal

    Jack Orenstein, Sep 18, 2005, in forum: Python
    Replies:
    0
    Views:
    450
    Jack Orenstein
    Sep 18, 2005
  3. Weng Tianxiang
    Replies:
    2
    Views:
    637
    Jonathan Bromley
    Jan 30, 2007
  4. Nicolas Moreau
    Replies:
    9
    Views:
    3,086
  5. dibacco73
    Replies:
    1
    Views:
    630
    joris
    Feb 12, 2009
Loading...

Share This Page