Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to run Oracle JVM jdk-7u60-linux-x64.rpm with osv #339

Closed
asias opened this issue Jun 11, 2014 · 7 comments
Closed

Fail to run Oracle JVM jdk-7u60-linux-x64.rpm with osv #339

asias opened this issue Jun 11, 2014 · 7 comments
Labels
Milestone

Comments

@asias
Copy link
Contributor

asias commented Jun 11, 2014

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000100000d909da, pid=0, tid=18446603337270435840
#
# JRE version:  (7.0_60-b19) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.60-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x5909da]  AsyncGetCallTrace+0x7c49a
#
# Core dump written. Default location: //core or core.0
#
# An error report file with more information is saved as:
# //hs_err_pid0.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Aborted

[backtrace]
0x000010000101e8c4 <fork1+10900>
0x000010000119ebc6 <JVM_handle_linux_signal+1553734>
0x00001000010237ce <JVM_handle_linux_signal+334>
0x0000000000368592 <call_signal_handler+338>
0x000000000036c39d <call_signal_handler_thunk+7>
0x0000100000c226ff <sem_destroy+12723967>
0x0000100000db0764 <AsyncGetCallTrace+639524>
0x000010000115a72c <JVM_handle_linux_signal+1274028>
0x0000100000e387c3 <JNI_CreateJavaVM+115>
0x00001000000080a7 <_init+2647>
0x00000000003ccc2f <osv::run(std::string, int, char**, int*)+255>
0x00000000003cd03f <osv::run(std::string, std::vector<std::string, std::allocator<std::string> >, int*)+575>
0x000000000020eb65 <run_main(std::vector<std::string, std::allocator<std::string> > const&)+245>
0x000000000021088f <do_main_thread(void*)+431>
0x0000000000416e05 <sync+69>
0x00000000003b6f9a <thread_main_c+26>
0x000000000036c395 <thread_main+7>


(gdb) bt
#0  0x00000000003c8e12 in cli_hlt () at /home/asias/src/cloudius-systems/osv/arch/x64/processor.hh:241
#1  halt_no_interrupts () at /home/asias/src/cloudius-systems/osv/arch/x64/arch.hh:48
#2  osv::halt () at /home/asias/src/cloudius-systems/osv/core/power.cc:34
#3  0x000000000021fc20 in abort (fmt=fmt@entry=0x5b90c4 "Aborted\n") at /home/asias/src/cloudius-systems/osv/runtime.cc:126
#4  0x000000000021fca0 in abort () at /home/asias/src/cloudius-systems/osv/runtime.cc:104
#5  0x000010000101e8c5 in PhaseIterGVN::subsume_node(Node*, Node*) ()
#6  0x000010000119ebc7 in ?? ()
#7  0xffffa00000000000 in ?? ()
#8  0xffffa0003fcbbcc0 in ?? ()
#9  0xffffa0003fcbbe40 in ?? ()
#10 0x0000000000000000 in ?? ()
@hw-claudio
Copy link
Contributor

Just a few questions / thoughts which come to mind:
is this about the missing fork implementation? Where does the fork1 symbol come from..?
Is it possible to parametrize the jvm launch to run in a single process?

@tgrabiec
Copy link
Member

I doubt that fork1 is actually called from JVM_handle_linux_signal. I also doubt that that function is over 1 Mb long (JVM_handle_linux_signal+1553734)

Our built-in backtrace printer is known to have issues with symbol resolution: #263

I would take this backtrace with a grain of salt. It's best to attach a backtrace obtained using GDB.

It would be also good to fetch this hs_err_pid0.log file, it has much more details.

@asias
Copy link
Contributor Author

asias commented Jun 19, 2014

# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x56431a]  AsyncGetCallTrace+0x73e9a
#
# Core dump written. Default location: //core or core.0
#
# An error report file with more information is saved as:
# /tmp/jvm-0/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
Aborted

[backtrace]
0x00001000017b68c4 <fork1+11236>
0x000010000192478e <JVM_handle_linux_signal+1478190>
0x00001000017bba91 <JVM_handle_linux_signal+305>
0x0000000000365702 <call_signal_handler+338>
0x000000000036950d <call_signal_handler_thunk+7>
0x000010000140bf9f <dlerror+21020575>
0x0000100001583d5b <AsyncGetCallTrace+604379>
0x00001000018e50b8 <JVM_handle_linux_signal+1218392>
0x00001000015df95e <JNI_CreateJavaVM+110>
0x000010000080807f <_init+2607>
0x00000000003c988f <osv::run(std::string, int, char**, int*)+255>
0x00000000003c9c9f <osv::run(std::string, std::vector<std::string, std::allocator<std::string> >, int*)+575>
0x000000000020e5d5 <run_main(std::vector<std::string, std::allocator<std::string> > const&)+245>
0x00000000002102ff <do_main_thread(void*)+431>
0x0000000000411785 <setpgid()+229>
0x00000000003b320a <thread_main_c+26>
0x0000000000369505 <thread_main+7>


(gdb) bt
#0  0x00000000003c5b72 in cli_hlt () at /home/asias/src/cloudius-systems/osv/arch/x64/processor.hh:241
#1  halt_no_interrupts () at /home/asias/src/cloudius-systems/osv/arch/x64/arch.hh:48
#2  osv::halt () at /home/asias/src/cloudius-systems/osv/core/power.cc:34
#3  0x000000000021f6c0 in abort (fmt=fmt@entry=0x5b3e54 "Aborted\n") at /home/asias/src/cloudius-systems/osv/runtime.cc:126
#4  0x000000000021f740 in abort () at /home/asias/src/cloudius-systems/osv/runtime.cc:104
#5  0x00001000017b68c5 in MemoryService::add_psYoung_memory_pool(PSYoungGen*, MemoryManager*, MemoryManager*) ()
#6  0x000010000192478f in SystemDictionary::find_method_handle_type(Symbol*, KlassHandle, Thread*) ()
#7  0x00001000017bba92 in methodDataKlass::oop_oop_iterate(oopDesc*, OopClosure*) ()
#8  0x0000000000365703 in call_signal_handler (frame=0x2000001ff300) at /home/asias/src/cloudius-systems/osv/arch/x64/signal.cc:85
#9  <signal handler called>
#10 0x000010000156431a in PhaseCFG::hoist_to_cheaper_block(Block*, Block*, Node*) ()
#11 0x000010000140bfa0 in ?? ()
#12 0x0000200000000000 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) i th
  Id   Target Id         Frame
* 1    Thread 1 (CPU#0 [halted ]) 0x00000000003c5b72 in cli_hlt () at /home/asias/src/cloudius-systems/osv/arch/x64/processor.hh:241

I mounted the usr.img on host, but /tmp/jvm-0/hs_error.log is not saved during the panic.

@asias
Copy link
Contributor Author

asias commented Jun 19, 2014

I have tried OpenJDK from Centos 6.4.

java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm
java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm

I saw similar error.

# JRE version:  (7.0_55-b13) (build )
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x56431a]  AsyncGetCallTrace+0x73e9a
#
# Core dump written. Default location: //core or core.0
#
# An error report file with more information is saved as:
# /tmp/jvm-0/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
Aborted

[backtrace]
0x0000100000fb68c4 <fork1+11236>
0x000010000112478e <JVM_handle_linux_signal+1478190>
0x0000100000fbba91 <JVM_handle_linux_signal+305>
0x0000000000365702 <call_signal_handler+338>
0x000000000036950d <call_signal_handler_thunk+7>
0x0000100000c0bf9f <dlerror+12631967>
0x0000100000d83d5b <AsyncGetCallTrace+604379>
0x00001000010e50b8 <JVM_handle_linux_signal+1218392>
0x0000100000ddf95e <JNI_CreateJavaVM+110>
0x000010000000807f <_init+2607>
0x00000000003c988f <osv::run(std::string, int, char**, int*)+255>
0x00000000003c9c9f <osv::run(std::string, std::vector<std::string, std::allocator<std::string> >, int*)+575>
0x000000000020e5d5 <run_main(std::vector<std::string, std::allocator<std::string> > const&)+245>
0x00000000002102ff <do_main_thread(void*)+431>
0x0000000000411785 <setpgid()+229>
0x00000000003b320a <thread_main_c+26>
0x0000000000369505 <thread_main+7>

(gdb) bt
#0  0x00000000003c5b72 in cli_hlt () at /home/asias/src/cloudius-systems/osv/arch/x64/processor.hh:241
#1  halt_no_interrupts () at /home/asias/src/cloudius-systems/osv/arch/x64/arch.hh:48
#2  osv::halt () at /home/asias/src/cloudius-systems/osv/core/power.cc:34
#3  0x000000000021f6c0 in abort (fmt=fmt@entry=0x5b3e54 "Aborted\n") at /home/asias/src/cloudius-systems/osv/runtime.cc:126
#4  0x000000000021f740 in abort () at /home/asias/src/cloudius-systems/osv/runtime.cc:104
#5  0x0000100000fb68c5 in MemoryService::add_psYoung_memory_pool(PSYoungGen*, MemoryManager*, MemoryManager*) ()
#6  0x000010000112478f in SystemDictionary::find_method_handle_type(Symbol*, KlassHandle, Thread*) ()
#7  0x0000100000fbba92 in methodDataKlass::oop_oop_iterate(oopDesc*, OopClosure*) ()
#8  0x0000000000365703 in call_signal_handler (frame=0x2000001ff300) at /home/asias/src/cloudius-systems/osv/arch/x64/signal.cc:85
#9  <signal handler called>
#10 0x0000100000d6431a in PhaseCFG::hoist_to_cheaper_block(Block*, Block*, Node*) ()
#11 0x0000100000c0bfa0 in ?? ()
#12 0x0000200000000000 in ?? ()
#13 0x0000000000000000 in ?? ()

@asias
Copy link
Contributor Author

asias commented Jun 19, 2014

FYI: how to use different JVM on OSv.

cd osv/external/x64
mv openjdk.bin openjdk.bin.f20
mkdir openjdk.bin.centos
cd openjdk.bin.centos
download the rpms
rpm2cpio * | cpio -idmv
cd ..
ln -sf  openjdk.bin.centos  openjdk.bin

@tgrabiec
Copy link
Member

@asias You can also pass jdkbase= to make to avoid messing with existing directories.

@slivne slivne added this to the release 0.14 milestone Sep 30, 2014
@slivne slivne added the bug label Sep 30, 2014
penberg pushed a commit that referenced this issue Oct 1, 2014
Seems certain binaries (such as those compiled on centos) contains inlined
references to __strtol_internal (which in turn seems like a bug to me).

Copied the weak defs from the musl version of the file. Other option
is to modify the musl version to deal with OSv file struct and use that instead.

Refs #339

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
penberg pushed a commit that referenced this issue Oct 1, 2014
While the previous comment about "modern" gcc not generating DT_INIT/FINI
sections any longer is most likely quite true, certain older gcc, such as
those used by CentOS build of OpenJDK or Oracle build of Not-so-open-JDK
does in fact do so.

Refs #339

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
@tzach
Copy link
Member

tzach commented Oct 2, 2014

fix by
c3646e5

@tzach tzach closed this as completed Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants