Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

System.loadLibrary() core dump

Posted on 2002-04-18
13
Medium Priority
?
926 Views
Last Modified: 2007-11-27
I've just been handed this problem to look at.
I'm looking for some comments and suggestions on this.
I'm trying to decide what actions I need to take.

Thanks


JAVA/Solaris related.

In a nutshell, we have been attempting to use JAVA 1.3.0 and/or 1.3.1 on Solaris 2.8 wanting to upgrade from the JAVA 1.2.X versions. Thing is, we are unsuccessful in attempts to run on the 1.3.X versions due to the VM process aborting:

Example:
{hyperion}19%java LoadLib
Before Load Lib...
Abort (core dumped)

After running with truss it appears that the problem occurs during the loading of one of our shared libraries. Thus I created a new test, LoadLib, which only calls System.loadLibrary("ourlib") and immediately fails with the core dump.

I have added the required Solaris 2.8 patches specified by the JAVA installation documents and thing are still not working.

This behavior is strange to say the least since we can run successfully with the 1.2.x versions and NOT the 1.3.x versions.

Anyone have an issue with loadLibrary of the sort or have a clue what may be happening?

More Information:
I can compile and link my libs on Solaris 2.8 with JDK 1.2.x and everything works fine.

The call to System.loadLibrary() subsequently "core dumps" deep within the call stack of a JVM native method call, so there wouldn't be an exception to catch. You can check it out yourself, I've included the call stack I get from dbx.

The LD_LIBRARY_PATH is set properly.


Here is the class which gets run:

public class LoadLib {

static {
System.out.println("LD_LIBRARY_PATH=" + System.getProperty("java.library.path"));
System.out.println("Before Load Lib...");
try {
System.loadLibrary("com_devkit");
}
catch (Throwable t) {
System.out.println("Caught this..." + t.toString());
t.printStackTrace(System.out);
}

System.out.println("After Load Lib...");
}

public static void main (String[] args) {
System.out.println("Done!");
}
}

Here is the stack from "dbx":
Exception of type int {assumed} is unexpected
t@1 (l@4) stopped in __exdbg_notify_of_unexpected at 0xfefd5c84
0xfefd5c84: __exdbg_notify_of_unexpected : jmp %o7 + 0x8
Current function is JNIEnv_::FindClass
758 return functions->FindClass(this, name);
(/vobs/Solaris_tools/FD60/SUNWspro/WS6/bin/sparcv9/dbx) where
current thread: t@1
---- hidden frames, use 'where -h' to see them all ----
[3] __SLIP.INIT_A(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xf48135f0
[4] __STATIC_CONSTRUCTOR(0xf4812f74, 0x0, 0xffe4b108, 0xff3e3728, 0x23664, 0xf4863a94), at 0xf4814840
[5] _init(0x0, 0xff3e260c, 0x1, 0xff3e260c, 0x178f8, 0x0), at 0xf4863e78
[6] call_init(0xf4863a68, 0x0, 0xff3e21e0, 0xff3e260c, 0x0, 0x400000), at 0xff3ba730
[7] dlmopen_intn(0xfed01514, 0xfa250, 0xc01, 0xfee716f4, 0x0, 0xc01), at 0xff3be09c
[8] _dlopen(0xfa250, 0x1, 0xfa250, 0x0, 0x0, 0x0), at 0xff3be17c
[9] sysLoadLibrary(0xfa250, 0xffbed2a8, 0x400, 0xffbec, 0xff2f3b44, 0xffbece2c), at 0xfecd8b20
[10] JVM_LoadLibrary(0xfa250, 0xff306ce8, 0x24940, 0xff2f3b44, 0xfa250, 0xf4c24a14), at 0xff101e48
[11] Java_java_lang_ClassLoader_00024NativeLibrary_load(0x90c68, 0xfa250, 0xff38257c, 0xff3810b8, 0x249c4, 0xffbed900), at 0xff35bc10
[12] 0x6ba20(0xf4c24a90, 0xffbedc68, 0x24940, 0xff2f3b44, 0xb6, 0xf8c35930), at 0x6ba1f
[13] 0x68ba4(0xf4c247a8, 0xf8c684f0, 0xf4c23dc8, 0x71c28, 0xf4e00000, 0xf8c35810), at 0x68ba3
[14] 0x68be8(0x24940, 0xffbedc68, 0x24940, 0x73f60, 0xb8, 0xf8ca2450), at 0x68be7
[15] 0x68ba4(0xf4c23dc0, 0xffbedc68, 0x24940, 0x71dc8, 0xb6, 0xf8c3b558), at 0x68ba3
[16] 0x68ba4(0x24940, 0xffbedc68, 0x24940, 0x71c28, 0xb8, 0xf8ca0c28), at 0x68ba3
[17] 0x68ba4(0x0, 0x1, 0xff2ffd78, 0x71dc8, 0x1e, 0xe), at 0x68ba3
[18] 0xff324994(0xffbedc88, 0xffbeddc8, 0xa, 0xf8ca0a60, 0x6abec, 0xffbeddd4), at 0xff324993
[19] JavaCalls::call_helper(0xffbeddc0, 0xff2f3b44, 0xffbeddd0, 0x24940, 0x6abec, 0xffbeddc8), at 0xff0c9d3c
[20] JavaCalls::call(0xffbeddc0, 0xffbeddbc, 0xffbeddd0, 0x24940, 0x24f50, 0xffbedd2c), at 0xff0c99e8
[21] instanceKlass::call_class_initializer_impl(0xf8ca0a60, 0x24940, 0xf8c01c88, 0xf8ca0ad8, 0xff2f3b44, 0xffbede04), at 0xff0928ec
[22] instanceKlass::initialize_impl(0xffbedff0, 0xf8ca0ad8, 0xff2f3b44, 0x24940, 0x3, 0xf8c02f10), at 0xff090ce8
[23] instanceKlass::initialize(0xf8ca0ad8, 0x24940, 0x21da0, 0x1, 0x24940, 0xffbee07c), at 0xff08f848
[24] find_class_from_class_loader(0xf8ca0ad8, 0x249c4, 0x1, 0xffbee0e4, 0xffbee0e0, 0x1), at 0xff103e84
[25] jni_FindClass(0xf8c77100, 0x0, 0x249c4, 0x24940, 0x1124c, 0xff2f3b44), at 0xff0cf808
=>[26] JNIEnv_::FindClass(this = 0x249c4, name = 0x1124c "LoadLib"), line 758 in "jni.h"
[27] main(argc = 1, argv = 0xffbee2dc), line 52 in "simpVMtest.cpp"
0
Comment
Question by:Ryan Rowley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 5

Expert Comment

by:nebeker
ID: 6960757
Did you remove the Java 1.2 installation, or is it co-existing with the 1.3 installation?  If so, is the JAVA_HOME environment variable set?

What do you get when you call:

whence java  
 -or-
which java

(depends on your shell, I think)
0
 
LVL 5

Expert Comment

by:nebeker
ID: 6960765
Also, did you recompile/rebuild your library with the header files shipped with 1.3?  I don't know if there were any changes between the 1.2 and 1.3 versions - but it might be something to check...
0
 
LVL 6

Expert Comment

by:gadio
ID: 6962030
I also think that you should rebuild your libraries again with jdk1.3 header files.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Ryan Rowley
ID: 6963154
This program is tested on freshly loaded and confiquered
Sun Ultras. These systems are only used for testing.


This program runs successfully on:
     Solaris 7
     Windows 2000
     Redhat Linux 7.2
     AIX

It Fails only on Solaris 8.

When the .so is accessed it cores.


0
 
LVL 5

Expert Comment

by:nebeker
ID: 6963278
Personally, I think it is more important to know if the .so was recompiled with the 1.3 headers than having it work as-is on those other platforms....
0
 
LVL 2

Author Comment

by:Ryan Rowley
ID: 6963329
nebeker,
I believe that it has been, but I'm going to comfirm that
it has myself. I was told that they did recompiled everything with the 1.3 headers and the latest release of compilers.
0
 
LVL 5

Expert Comment

by:nebeker
ID: 6963348
After confirming the recompile, can you also check to see if Java 1.2 is still on the Solaris 8 box?  If it is, which version of java is in your path?  (i.e. "which java" will tell you where it is coming from, and "java -version" will tell you which version is actually loading...)
0
 
LVL 2

Author Comment

by:Ryan Rowley
ID: 6977600
As I suspected they could not confirm that everything was compiled using the newer headers. I'm reloading a machine from scratch and recording every installed patch and will rebuild everything.  

The testing machines are loaded from scratch and only have JAVA 1.3 on them.

This program runs with no problems under JAVA 1.2.
I'm going to test it under JAVA 1.4 to see if the problem carries over.

I'm having more hardrive space installed on my local Sun Ultra. It will give me the ability to build everything on my local machine and eliminate some of the varables.
0
 
LVL 2

Author Comment

by:Ryan Rowley
ID: 7244846
Do to another project needing my experience in embeded avionics systems (DoD project). I have handed off this problem to someone else. I have no way to verify a solution at this time.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7972354
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: nebeker
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
LVL 2

Author Comment

by:Ryan Rowley
ID: 7973812
Nebeker's comments didn't fix the problem.
I suspect the comments here would be useful to fixing other problems. I'm going to call over to the other office to see if they have found a fix yet.
0
 

Expert Comment

by:SpideyMod
ID: 8020572
Will return in 7 days to finalize this if it hasn't taken place.  Please leave any recommendations there before then.  Without recommendations I will PAQ with no refund.  Thanks.


SpideyMod
Community Support Moderator @Experts Exchange
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8066664
PAQ'd

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question