Skip to content

SmartOS Support (SIGSEGV in libjvm.so / jvw_raw_lock()) #155

@matthiasg

Description

@matthiasg

I am trying to get node-java to work on SmartOS/Solaris with x86 node.

After making the necessary changes (https://github.com/curasystems/node-java see #154) for it to compile without errors I get a SIGSEGV.

node is 32bit / libjvm.so and postInstall writes jvm_dll_path as ":/opt/local/java/sun6/jre/lib/i386/server" which I assume to be correct.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfd29f448, pid=41827, tid=1
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Server VM (20.1-b02 mixed mode solaris-x86 )
# Problematic frame:
# C  [libjvm.so+0x49f448]  void Monitor::jvm_raw_lock()+0x1fc
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x08f12c00):  JavaThread "Unknown thread" [_thread_in_native, id=1, stack(0x07848000,0x08048000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x000000b0

Registers:
EAX=0x00000000, EBX=0xfd490000, ECX=0x000000fd, EDX=0xfe842a40
ESP=0x08041060, EBP=0x08041080, ESI=0x00000000, EDI=0x09072018
EIP=0xfd29f448, EFLAGS=0x00210202

Top of Stack: (sp=0x08041060)
0x08041060:   08041a30 08041558 fd490000 08041080
0x08041070:   08041090 fefc2ba0 fe0a0bf0 fd4ac2b8
0x08041080:   08041098 fce7fce1 09072018 fd58e000
0x08041090:   080414c8 fe0a0bf0 080414c8 fd57b015
0x080410a0:   09072018 08041a30 08041558 fd58e000
0x080410b0:   74706f2f 636f6c2f 6a2f6c61 2f617661
0x080410c0:   366e7573 62696c2f 2e74722f 0072616a
0x080410d0:   08041558 08f12d20 08f12c00 fe104000

Instructions: (pc=0xfd29f448)
0xfd29f428:   a1 00 00 00 00 8b d0 c1 e8 09 8b ca c1 e9 14 33
0xfd29f438:   c8 81 e1 ff 00 00 00 8b 83 0c 00 00 00 8b 04 88
0xfd29f448:   39 90 b0 00 00 00 74 0a 51 52 e8 a9 b1 bd ff 83
0xfd29f458:   c4 08 8b 4d 08 89 41 04 5f 5e 5b c9 c3 00 00 00

Stack: [0x07848000,0x08048000],  sp=0x08041060,  free space=8164k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libjvm.so+0x49f448]  void Monitor::jvm_raw_lock()+0x1fc
C  [libjvm.so+0x7fce1]  JVM_RawMonitorEnter+0x2d
C  [libzip.so+0xb015]  ZIP_Get_From_Cache+0x81
C  [libzip.so+0x196a]  ZIP_Open_Generic+0x3e
C  [libzip.so+0x1923]  ZIP_Open+0x27
V  [libjvm.so+0x42e408]  void ClassLoader::create_class_path_entry(char*,stat,ClassPathEntry**,bool)+0x1b0
V  [libjvm.so+0x42dd60]  ClassFileStream*LazyClassPathEntry::open_stream(const char*)+0x1d8
V  [libjvm.so+0x166be7]  instanceKlassHandle ClassLoader::load_classfile(symbolHandle,Thread*)+0x227
V  [libjvm.so+0x15e303]  instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle,Handle,Thread*)+0x26b
V  [libjvm.so+0x12275d]  klassOopDesc*SystemDictionary::resolve_instance_class_or_null(symbolHandle,Handle,Handle,Thread*)+0x769
V  [libjvm.so+0x82b49b]  klassOopDesc*SystemDictionary::resolve_or_fail(symbolHandle,Handle,Handle,bool,Thread*)+0x177
V  [libjvm.so+0x82e5f8]  void SystemDictionary::initialize_wk_klasses_until(SystemDictionary::WKID,SystemDictionary::WKID&,Thread*)+0x184
V  [libjvm.so+0x270036]  void SystemDictionary::initialize_preloaded_classes(Thread*)+0x2e
V  [libjvm.so+0x270339]  void SystemDictionary::initialize(Thread*)+0xed
V  [libjvm.so+0x235b09]  void Universe::genesis(Thread*)+0xc15
V  [libjvm.so+0x236d2f]  void universe2_init()+0x23
V  [libjvm.so+0x2467fc]  int init_globals()+0xb0
V  [libjvm.so+0x85200c]  int Threads::create_vm(JavaVMInitArgs*,bool*)+0x194
V  [libjvm.so+0x24c043]  JNI_CreateJavaVM+0x77
C  [nodejavabridge_bindings.node+0xa440]  Java::createJVM(JavaVM_**, JNIEnv_**)+0x7d0
C  [nodejavabridge_bindings.node+0xa795]  Java::ensureJvm()+0xa5
C  [nodejavabridge_bindings.node+0x10906]  Java::callStaticMethodSync(const v8::Arguments&)+0x76
C  [node+0x28e3c7]  _ZN2v88internalL21Builtin_HandleApiCallENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE+0x157
C  0x9970a236
C  0x8a77dd99
C  0x8a77dc38
C  0x8a77dc38
C  0x8a77dc38
C  0x8a77b836
C  0x8a777644
C  0x8a75921d
C  0x8a75c9a9
C  0x8a75c8fa
C  0x8a758cfe
C  0x997141a5
C  0x8a75c6f8
C  0x9970f7a1
C  0x8a776d49
C  0x8a775c8e
C  0x8a75ca8e
C  0x8a75921d
C  0x8a75c9a9
C  0x8a75c8fa
C  0x8a758cfe
C  0x997141a5
C  0x8a75c6f8
C  0x9970f7a1
C  0x8a75c59e
C  0x8a75c4b3
C  0x9970f7a1
C  0x8a75c3f0
C  0x8a75c257
C  0x8a75a26d
C  0x997141a5
C  0x8a759d7d
C  0x9970f7a1
C  0x9970fe12
C  0x9970a0aa
C  [node+0x2ac98f]  _ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0xef
C  [node+0x2ae140]  v8::internal::Execution::Call(void::Handle<void::Object>(void, int, void*, bool*, bool))+0xd0
C  [node+0x27503c]  v8::Function::Call(v8::Handle<v8::Object>(int, void<v8::Value>*))+0x15c
C  [node+0x1f744e]  node::MakeCallback(v8::Handle<v8::Object>(v8::Object<v8::Function>(int, v8::Object<v8::Function><v8::Value>*)))+0x5e
C  [node+0x1f7630]  node::MakeCallback(v8::Handle<v8::Object>(v8::Object<v8::String>(int, v8::Object<v8::String><v8::Value>*)))+0x60
C  [node+0x1fffdc]  _ZN4nodeL5AfterEP7uv_fs_s+0x14c
C  [node+0x257a43]  uv__work_done+0x83
C  [node+0x24db06]  uv__async_event+0x56
C  [node+0x24dba4]  uv__async_io+0x84
C  [node+0x25a2ff]  uv__io_poll+0x1df
C  [node+0x24e34a]  uv_run+0xea
C  [node+0x1f9c77]  node::Start(int, char**)+0x187
C  [node+0x209bab]  main+0x1b
C  [node+0x1695e3]  _start+0x83


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )

Other Threads:

=>0x08f12c00 (exited) JavaThread "Unknown thread" [_thread_in_native, id=1, stack(0x07848000,0x08048000)]

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

Dynamic libraries:
0x08050000  /opt/local/bin/node
0xfeac0000  /lib/libumem.so.1
0xfef00000  /opt/local/lib/libssl.so.1.0.0
0xfed50000  /opt/local/lib/libcrypto.so.1.0.0
0xfea40000  /lib/libkstat.so.1
0xfed20000  /lib/libsocket.so.1
0xfeb30000  /lib/libnsl.so.1
0xfecf0000  /lib/libsendfile.so.1
0xfebd0000  /opt/local/gcc47/i386-sun-solaris2.11/lib/./libstdc++.so.6
0xfe9d0000  /lib/libm.so.2
0xfea90000  /opt/local/gcc47/i386-sun-solaris2.11/lib/./libgcc_s.so.1
0xfebc0000  /lib/libpthread.so.1
0xfe860000  /lib/libc.so.1
0xfea80000  /lib/libdl.so.1
0xfe260000  /opt/local/iris/tika/node-java/build/Release/nodejavabridge_bindings.node
0xfd600000  /opt/local/java/sun6/jre/lib/i386/server//libjvm.so
0xfe240000  /usr/lib/libsched.so.1
0xfe220000  /lib/libm.so.1
0xfe1e0000  /usr/lib/libCrun.so.1
0xfe1d0000  /lib/libthread.so.1
0xfe1b0000  /lib/libdoor.so.1
0xfe170000  /usr/lib/libdemangle.so.1
0xfe120000  /opt/local/java/sun6/lib/i386/libverify.so
0xfce00000  /opt/local/java/sun6/lib/i386/libjvm.so
0xfe0d0000  /opt/local/java/sun6/lib/i386/libjava.so
0xfe0b0000  /lib/libmp.so.2
0xfd5d0000  /lib/libmd.so.1
0xfd570000  /opt/local/java/sun6/lib/i386/libzip.so

VM Arguments:
jvm_args: -Djava.awt.headless=true -XX:+UseAdaptiveSizePolicy -Djava.awt.headless=true
java_command: <unknown>
Launcher Type: generic

Environment Variables:
JAVA_HOME=/opt/local/java/sun6
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/opt/local/java/sun6/jre/lib/i386/server
SHELL=/usr/bin/bash

Signal Handlers:
SIGSEGV: [libjvm.so+0x89d1cc], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGBUS: [libjvm.so+0x89d1cc], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGFPE: [libjvm.so+0x16c518], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGPIPE: [libjvm.so+0x16c518], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGXFSZ: [libjvm.so+0x16c518], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGILL: [libjvm.so+0x16c518], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGUSR1: [node+0x253900], sa_mask[0]=0xffbffeff, sa_flags=0x00000000
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGQUIT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGHUP: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGINT: [node+0x1f3330], sa_mask[0]=0xffbffeff, sa_flags=0x00000000
SIGTERM: [node+0x1f3330], sa_mask[0]=0xffbffeff, sa_flags=0x00000000
SIG39: [libjvm.so+0x7740d0], sa_mask[0]=0x00000000, sa_flags=0x00000008
SIG40: [libjvm.so+0x16c518], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c


---------------  S Y S T E M  ---------------

OS:                                SmartOS x86_64
              Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
              Copyright 2010-2012 Joyent, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                   See `uname -v` for assembly date and time.

uname:SunOS 5.11 joyent_20140530T010428Z i86pc  (T2 libthread)
rlimit: STACK 10240k, CORE infinity, NOFILE 65536, AS infinity
load average:2.40 3.06 3.36

CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 60 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 3145728k(1145840k free)

vm_info: Java HotSpot(TM) Server VM (20.1-b02) for solaris-x86 JRE (1.6.0_26-b03), built on May  4 2011 01:22:50 by "" with Workshop 5.8

time: Sat Sep  6 12:36:55 2014
elapsed time: 0 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions