JNI core file.

G

Gioerenmic

Hey folks,
I have a Java client that communicates with a server using RMI.
That server was made using C++ that interfaces with a Java library
using JNI to communicate with its clients. After about an hour, with
no noticeable increase in memory or CPU usage, the client crashes.
Here's the part that's throwing me: my Java client is creating a core
file. I'd like to pass the core file to gdb, but I'm unsure what I'd
be using as the executable. Here's the console output, with some +'s
covering up some names:

*** glibc detected *** double free or corruption (!prev):
0x0000002ae0b94750 ***
[monitor_app] exec pid [7730] is gone; exiting
[monitor_app] killing parent of pid [7729]
[monitor_app] CleanUp hit for app [/usr/local/j2sdk-1.6.0/bin/java]
pid [7729]
[monitor_app] exiting...
/++++/+++++/+++++/++++/run/exec_app: line 134: 7729 Done
/bin/nice -19 ${PROJ_ROOT}/${MYVER}/++++++++/run/
mon
itor_app run_app_name ${CUR_NAME_TITLE} $$ ${EXEC}
7730 Aborted (core dumped) | ${EXEC} "$@"
Mon Jan 14 13:11:33 EST 2008

app [++++++]
version [++++++]
params [-classpath ../+++++/build/+++++.jar:/devel/infr/++++
/v1.2.3/build/+++++.jar:/devel/infr/++++/v3.0.4/build++++.jar:/usr/lo
cal/+++++/++++.jar:lib/jdom.jar:lib/openmap.jar:lib/sam.jar:lib
/++++.jar:lib/gatmm.jar:lib/gram.jar:lib/++++.jar ++.+++.++++++++
++++ ++++++]

exited with a SIG ABORT.
 
R

Roedy Green

Here's the console output, with some +'s
covering up some names:

All you can really tell is that the JNI code screwed up. I find it
easier to write the a pure C/C++ program first to do the work with a
debugging driver. Only after it is completely solid do I hook it up
with JNI into Java. If you try to do it all in one step there are
just too many things that can go wrong.
 
T

Thomas Fritsch

Hey folks,
I have a Java client that communicates with a server using RMI.
That server was made using C++ that interfaces with a Java library
using JNI to communicate with its clients. After about an hour, with
no noticeable increase in memory or CPU usage, the client crashes.
Here's the part that's throwing me: my Java client is creating a core
file. I'd like to pass the core file to gdb, but I'm unsure what I'd
be using as the executable.
It is the java interpreter, which is probably (as seen from your info
below) "/usr/local/j2sdk-1.6.0/bin/java".

But don't expect too much from gdb. When there is bug in the C-JNI-code,
then the java process might not crash immediately after passing the
C-bug, but may survive several JNI-returns and JNI-calls until the JVM
is seriously corrupted by subsequent errors.
Here's the console output, with some +'s
covering up some names:

*** glibc detected *** double free or corruption (!prev):
0x0000002ae0b94750 ***
[monitor_app] exec pid [7730] is gone; exiting
[monitor_app] killing parent of pid [7729]
[monitor_app] CleanUp hit for app [/usr/local/j2sdk-1.6.0/bin/java]
pid [7729]
[monitor_app] exiting...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top