Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jun 2000 20:42:45 +0530
From:      Pran Joseph <pranje@yahoo.com>
To:        freebsd-java@FreeBSD.org
Subject:   Subject: Segmentation violation when invoking JNI call to C from Java  with Pthreads 
Message-ID:  <3941096D.A8AF35CA@yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi,

      I am using FreeBsd 3.4 with jdk 1.1.8  green threads on  i386 . I
am getting Segmentation violation  from JNI call as  reported in  PR
12286.
Program is  crashing  when I try to create a new Java object
using JNI   NewObject function. Problem report still says that bug is
open. The PR is included in the end of this mail.

Any one of you know the solution for this problem or have a patch for
this problem.

-Pran Joseph


----------------------Start PR----------------------------------


Problem Report i386/12286

Segmentation violation when invoking JNI call to C from Java with
PTHREADS

Confidential : no
Severity   :  critical
Priority :   high
Responsible :  freebsd-bugs@FreeBSD.org
State :open
Class : sw-bug
Submitter-Id
     current-users
Arrival-Date
     Fri Jun 18 16:40:01 PDT 1999
Last-Modified
     Thu Jun 24 17:10:00 PDT 1999
Originator
     Steve Heller <sheller@paymentnet.com>
Release
     FreeBSD 3.1 RELEASE
Organization
     PaymentNet, Inc.
Environment

     FreeBSD yoda.paymentnet.com 3.1-RELEASE FreeBSD 3.1-RELEASE #0: Mon

Feb 15 11:08:08 GMT 1999
jkh@usw3.freebsd.org:/usr/src/sys/compile/GENERIC  i386

     % gcc --version
     2.7.2.1


Description

     When I link a static library which calls pthread routines into a
     shared object file with gcc -shared -pthread, and then run the
     java compiled program which calls it through JNI with JDK 1.1.8
     (green threads), (I had to add -lc_r to the link flags in order
     to get pthread_mutex_lock() to be found when linking the .so file),

     I get the following Segmentation violation:

     (cd jni; java pntransjava test.paymentnet.com 443
"TRXTYPE=S&TENDER=C&PWD=g0edel
     1685&USER=pnprodtest&ACCT=5105105105105100&EXPDATE=1299&AMT=27.33"
30;  cd ..)
     SIGSEGV   11*  segmentation violation

     Full thread dump:
         "Finalizer thread" (TID:0x28454210, sys_thread_t:0x29258f00,
state:R) prio=1
         "Async Garbage Collector" (TID:0x28454258,
sys_thread_t:0x29237f00, state:R)
      prio=1
         "Idle thread" (TID:0x284542a0, sys_thread_t:0x29216f00,
state:R) prio=0
         "Clock" (TID:0x28454088, sys_thread_t:0x291f5f00, state:CW)
prio=12
         "main" (TID:0x284540b0, sys_thread_t:0x8067700, state:R) prio=5

*current thr
     ead*
             pntransjava.main(pntransjava.java:59)
     Monitor Cache Dump:
     Registered Monitor Dump:
         Thread queue lock: <unowned>
         Name and type hash table lock: <unowned>
         String intern lock: <unowned>
         JNI pinning lock: <unowned>
         JNI global reference lock: <unowned>
         BinClass lock: <unowned>
         Class loading lock: <unowned>
         Java stack lock: <unowned>

----------------------end PR----------------------------------







__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3941096D.A8AF35CA>