Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

JNI core file.

Thread view: 
Gioerenmic@aol.com - 16 Jan 2008 18:54 GMT
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.
Roedy Green - 16 Jan 2008 21:20 GMT
>  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.
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com

Thomas Fritsch - 16 Jan 2008 22:03 GMT
> Hey folks,
>   I have a Java client that communicates with a server using RMI.
[quoted text clipped - 4 lines]
> 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:
[quoted text clipped - 6 lines]
> pid [7729]
> [monitor_app] exiting...

Signature

Thomas



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.