0

I'm trying to start up a Cassandra node on a Solaris 10 server, but every time I try to create a new column family the JVM ends up crashing with "V [libjvm.so+0x976c08] Unsafe_GetLong+0x120" as the problematic frame. I'm using JRE version: 6.0_41-b02 and unfortunately updating to JRE 7 is not an option at this time. The odd thing is if I remove the -d64 option to switch the JRE version back to 32-bit I don't get this error, though I'm suck at only 2GB of heap space then.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0xffffffff7e576c08, pid=9076, tid=167
#
# JRE version: 6.0_41-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode solaris-sparc compressed oops)
# Problematic frame:
# V  [libjvm.so+0x976c08]  Unsafe_GetLong+0x120
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

Current thread (0x0000000100e17800):  JavaThread "Thrift:3" daemon [_thread_in_vm, id=167, stack(0xfffffffed5c00000,0xfffffffed5d00000)]

siginfo:si_signo=SIGBUS: si_errno=0, si_code=1 (BUS_ADRALN), si_addr=0xffffffff04635e6a

Registers:
 G1=0xffffffff7e868d58 G2=0xffffffff7e868d60 G3=0x000000000007ad58 G4=0x000000000007ad60
 G5=0x000000000007ac00 G6=0xfffffffef280e000 G7=0xfffffffeee11ca00 Y=0x0000000000000000
 O0=0x0000000000000000 O1=0x0000000000000000 O2=0x0000000000080988 O3=0x0000000000080800
 O4=0x0000000000000000 O5=0x0000000030000000 O6=0xfffffffed5cfcdd1 O7=0xffffffff04635e58
 L0=0x0000000100e110c0 L1=0xffffffff7e868d70 L2=0x0000000000000000 L3=0x0000000000000006
 L4=0x00000000100e1780 L5=0x0000000000001ffc L6=0xfffffffed5cff860 L7=0xffffffff7e86e988
 I0=0x0000000000000000 I1=0x0000000100e17800 I2=0x0000000100e0e9d0 I3=0x0000000000000012
 I4=0xffffffff7c900000 I5=0xffffffff7e7ee000 I6=0xfffffffed5cfce81 I7=0xffffffff7840e614
 PC=0xffffffff7e576c08 nPC=0xffffffff7e576c0c


Top of Stack: (sp=0xfffffffed5cfd5d0)
0xfffffffed5cfd5d0:   0000000100e110c0 ffffffff7e868d70
0xfffffffed5cfd5e0:   0000000000000000 0000000000000006
0xfffffffed5cfd5f0:   00000000100e1780 0000000000001ffc
0xfffffffed5cfd600:   fffffffed5cff860 ffffffff7e86e988
0xfffffffed5cfd610:   0000000000000000 0000000100e17800
0xfffffffed5cfd620:   0000000100e0e9d0 0000000000000012
0xfffffffed5cfd630:   ffffffff7c900000 ffffffff7e7ee000
0xfffffffed5cfd640:   fffffffed5cfce81 ffffffff7840e614
0xfffffffed5cfd650:   0000000100e0ea50 0000000100e17800
0xfffffffed5cfd660:   0000000100e0ea98 0000000100e0ea58
0xfffffffed5cfd670:   ffffffff78404f90 0000000204635cc0
0xfffffffed5cfd680:   fffffffed5cfe008 ffffffff73641cba
0xfffffffed5cfd690:   ffffffff728dd208 fffffffed5cfd938
0xfffffffed5cfd6a0:   fffffffed5cfe020 ffffffff7840af6c
0xfffffffed5cfd6b0:   fffffffed5cfd830 0000000100e17800
0xfffffffed5cfd6c0:   0000000000000679 fffffffed5cfd938

Instructions: (pc=0xffffffff7e576c08)
0xffffffff7e576be8:   9e 10 20 00 f4 5d a0 10 10 80 00 05 e0 5d a0 08
0xffffffff7e576bf8:   de 5e a0 00 e0 5d a0 08 f4 5d a0 10 e4 5e a0 00
0xffffffff7e576c08:   f0 5b c0 1b 02 c4 80 05 aa 10 20 07 7f e0 c4 83
0xffffffff7e576c18:   90 10 00 1a f4 5d a0 10 f4 74 20 08 f8 5d a0 18

Register to memory mapping:

G1=0xffffffff7e868d58: _DYNAMIC+0x79170 in /opt/resolve3/jre/jre/lib/sparcv9/server/libjvm.so at 0xffffffff7dc00000
G2=0xffffffff7e868d60: _DYNAMIC+0x79178 in /opt/resolve3/jre/jre/lib/sparcv9/server/libjvm.so at 0xffffffff7dc00000
G3=0x000000000007ad58 is an unknown value
G4=0x000000000007ad60 is an unknown value
G5=0x000000000007ac00 is an unknown value
G6=0xfffffffef280e000 is an unknown value
G7=0xfffffffeee11ca00 is an unknown value

O0=0x0000000000000000 is an unknown value
O1=0x0000000000000000 is an unknown value
O2=0x0000000000080988 is an unknown value
O3=0x0000000000080800 is an unknown value
O4=0x0000000000000000 is an unknown value
O5=0x0000000030000000 is an unknown value
O6=0xfffffffed5cfcdd1 is pointing into the stack for thread: 0x0000000100e17800
O7=0xffffffff04635e58 is an oop

[error occurred during error reporting (printing register info), id 0xa]

Stack: [0xfffffffed5c00000,0xfffffffed5d00000],  sp=0xfffffffed5cfd5d0,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x976c08]  Unsafe_GetLong+0x120
j  sun.misc.Unsafe.getLong(Ljava/lang/Object;J)J+14043826
j  sun.misc.Unsafe.getLong(Ljava/lang/Object;J)J+0
j  org.apache.cassandra.utils.FastByteComparisons$LexicographicalComparerHolder$UnsafeComparer.compareTo([BII[BII)I+74
j  org.apache.cassandra.utils.FastByteComparisons$LexicographicalComparerHolder$UnsafeComparer.compareTo(Ljava/lang/Object;IILjava/lang/Object;II)I+16
j  org.apache.cassandra.utils.FastByteComparisons.compareTo([BII[BII)I+11
j  org.apache.cassandra.utils.FBUtilities.compareUnsigned([B[BIIII)I+8
j  org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+91
j  org.apache.cassandra.db.marshal.BytesType.bytesCompare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+16
j  org.apache.cassandra.db.marshal.AsciiType.compare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+2
j  org.apache.cassandra.db.marshal.AsciiType.compare(Ljava/lang/Object;Ljava/lang/Object;)I+9
j  org.apache.cassandra.db.marshal.AbstractCompositeType.compare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+75
j  org.apache.cassandra.db.marshal.AbstractCompositeType.compare(Ljava/lang/Object;Ljava/lang/Object;)I+9
j  java.util.TreeMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+61
j  org.apache.cassandra.db.TreeMapBackedSortedColumns.addColumn(Lorg/apache/cassandra/db/IColumn;Lorg/apache/cassandra/utils/Allocator;)V+13
j  org.apache.cassandra.db.AbstractColumnContainer.addColumn(Lorg/apache/cassandra/db/IColumn;Lorg/apache/cassandra/utils/Allocator;)V+6
j  org.apache.cassandra.db.AbstractColumnContainer.addColumn(Lorg/apache/cassandra/db/IColumn;)V+5
j  org.apache.cassandra.config.CFMetaData.toSchemaNoColumns(Lorg/apache/cassandra/db/RowMutation;J)V+82
j  org.apache.cassandra.config.CFMetaData.toSchema(Lorg/apache/cassandra/db/RowMutation;J)V+3
j  org.apache.cassandra.config.CFMetaData.toSchema(J)Lorg/apache/cassandra/db/RowMutation;+20
j  org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(Lorg/apache/cassandra/config/CFMetaData;)V+123
j  org.apache.cassandra.thrift.CassandraServer.system_add_column_family(Lorg/apache/cassandra/thrift/CfDef;)Ljava/lang/String;+47
j  org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Lorg/apache/cassandra/thrift/Cassandra$Iface;Lorg/apache/cassandra/thrift/Cassandra$system_add_column_family_args;)Lorg/a
pache/cassandra/thrift/Cassandra$system_add_column_family_result;+14
j  org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Ljava/lang/Object;Lorg/apache/thrift/TBase;)Lorg/apache/thrift/TBase;+9
j  org.apache.thrift.ProcessFunction.process(ILorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;Ljava/lang/Object;)V+83
j  org.apache.thrift.TBaseProcessor.process(Lorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;)Z+126
j  org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run()V+102
j  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+66
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+33
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
V  [libjvm.so+0x1d6a18]  void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x200
V  [libjvm.so+0x1e11b4]  void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x3c
V  [libjvm.so+0x5ff850]  void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*)+0x150
V  [libjvm.so+0x26bfec]  void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*)+0x50
V  [libjvm.so+0x280398]  void thread_entry(JavaThread*,Thread*)+0x148
V  [libjvm.so+0x957ecc]  void JavaThread::thread_main_inner()+0x3c
V  [libjvm.so+0x86661c]  java_start+0x164

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.misc.Unsafe.getLong(Ljava/lang/Object;J)J+0
j  org.apache.cassandra.utils.FastByteComparisons$LexicographicalComparerHolder$UnsafeComparer.compareTo([BII[BII)I+74
j  org.apache.cassandra.utils.FastByteComparisons$LexicographicalComparerHolder$UnsafeComparer.compareTo(Ljava/lang/Object;IILjava/lang/Object;II)I+16
j  org.apache.cassandra.utils.FastByteComparisons.compareTo([BII[BII)I+11
j  org.apache.cassandra.utils.FBUtilities.compareUnsigned([B[BIIII)I+8
j  org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+91
j  org.apache.cassandra.db.marshal.BytesType.bytesCompare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+16
j  org.apache.cassandra.db.marshal.AsciiType.compare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+2
j  org.apache.cassandra.db.marshal.AsciiType.compare(Ljava/lang/Object;Ljava/lang/Object;)I+9
j  org.apache.cassandra.db.marshal.AbstractCompositeType.compare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+75
j  org.apache.cassandra.db.marshal.AbstractCompositeType.compare(Ljava/lang/Object;Ljava/lang/Object;)I+9
j  java.util.TreeMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+61
j  org.apache.cassandra.db.TreeMapBackedSortedColumns.addColumn(Lorg/apache/cassandra/db/IColumn;Lorg/apache/cassandra/utils/Allocator;)V+13
j  org.apache.cassandra.db.AbstractColumnContainer.addColumn(Lorg/apache/cassandra/db/IColumn;Lorg/apache/cassandra/utils/Allocator;)V+6
j  org.apache.cassandra.db.AbstractColumnContainer.addColumn(Lorg/apache/cassandra/db/IColumn;)V+5
j  org.apache.cassandra.config.CFMetaData.toSchemaNoColumns(Lorg/apache/cassandra/db/RowMutation;J)V+82
j  org.apache.cassandra.config.CFMetaData.toSchema(Lorg/apache/cassandra/db/RowMutation;J)V+3
j  org.apache.cassandra.config.CFMetaData.toSchema(J)Lorg/apache/cassandra/db/RowMutation;+20
j  org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(Lorg/apache/cassandra/config/CFMetaData;)V+123
j  org.apache.cassandra.thrift.CassandraServer.system_add_column_family(Lorg/apache/cassandra/thrift/CfDef;)Ljava/lang/String;+47
j  org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Lorg/apache/cassandra/thrift/Cassandra$Iface;Lorg/apache/cassandra/thrift/Cassandra$system_add_column_family_args;)Lorg/a
pache/cassandra/thrift/Cassandra$system_add_column_family_result;+14
j  org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Ljava/lang/Object;Lorg/apache/thrift/TBase;)Lorg/apache/thrift/TBase;+9
j  org.apache.thrift.ProcessFunction.process(ILorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;Ljava/lang/Object;)V+83
j  org.apache.thrift.TBaseProcessor.process(Lorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;)Z+126
j  org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run()V+102
j  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+66
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+33
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
=>0x0000000100e17800 JavaThread "Thrift:3" daemon [_thread_in_vm, id=167, stack(0xfffffffed5c00000,0xfffffffed5d00000)]
  0x00000001012cb000 JavaThread "Thrift:2" daemon [_thread_blocked, id=166, stack(0xfffffffed5e00000,0xfffffffed5f00000)]
  0x00000001012b5800 JavaThread "Thrift:1" daemon [_thread_blocked, id=165, stack(0xfffffffed6000000,0xfffffffed6100000)]
  0x0000000100118000 JavaThread "DestroyJavaVM" [_thread_blocked, id=2, stack(0xffffffff7c000000,0xffffffff7c100000)]
  0x000000010111e000 JavaThread "Thread-2" [_thread_in_native, id=164, stack(0xfffffffed6200000,0xfffffffed6300000)]
  0x0000000100dab800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=13, stack(0xfffffffeece00000,0xfffffffeecf00000)]
  ...
  0x0000000100cc5800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12, stack(0xfffffffeed000000,0xfffffffeed100000)]
  0x0000000100cc4000 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=11, stack(0xfffffffeed200000,0xfffffffeed300000)]
  0x0000000100c9e800 JavaThread "Finalizer" daemon [_thread_blocked, id=10, stack(0xfffffffeed400000,0xfffffffeed500000)]
  0x0000000100c9c800 JavaThread "Reference Handler" daemon [_thread_blocked, id=9, stack(0xfffffffeed600000,0xfffffffeed700000)]

Other Threads:
  0x0000000100c96800 VMThread [stack: 0xfffffffeee200000,0xfffffffeee300000] [id=8]
  0x000000010112c800 WatcherThread [stack: 0xfffffffeeb600000,0xfffffffeeb700000] [id=19]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 par new generation   total 737280K, used 295419K [0xfffffffef2810000, 0xffffffff24810000, 0xffffffff24810000)
  eden space 655360K,  44% used [0xfffffffef2810000, 0xffffffff046b4888, 0xffffffff1a810000)
  from space 81920K,   2% used [0xffffffff1f810000, 0xffffffff1f9ea6c8, 0xffffffff24810000)
  to   space 81920K,   0% used [0xffffffff1a810000, 0xffffffff1a810000, 0xffffffff1f810000)
 concurrent mark-sweep generation total 1277952K, used 0K [0xffffffff24810000, 0xffffffff72810000, 0xffffffff72810000)
 concurrent-mark-sweep perm gen total 22592K, used 22453K [0xffffffff72810000, 0xffffffff73e20000, 0xffffffff77810000)

Code Cache  [0xffffffff78400000, 0xffffffff78800000, 0xffffffff7b400000)
 total_blobs=432 nmethods=102 adapters=285 free_code_cache=49644160 largest_free_block=26432

Dynamic libraries:
0x0000000100000000      /opt/resolve3/jre/bin/sparcv9/java
0xffffffff7f700000      /lib/64/libthread.so.1
0xffffffff7f200000      /opt/resolve3/jre/bin/sparcv9/../../jre/lib/sparcv9/jli/libjli.so
0xffffffff7f000000      /lib/64/libdl.so.1
0xffffffff7ed00000      /lib/64/libc.so.1
0xffffffff7ec00000      /platform/SUNW,Sun-Fire-V440/lib/sparcv9/libc_psr.so.1
0xffffffff7dc00000      /opt/resolve3/jre/jre/lib/sparcv9/server/libjvm.so
0xffffffff7e900000      /lib/64/libsocket.so.1
0xffffffff7eb00000      /usr/lib/64/libsched.so.1
0xffffffff7da00000      /lib/64/libm.so.1
0xffffffff7d800000      /usr/lib/64/libCrun.so.1
0xffffffff7d600000      /lib/64/libdoor.so.1
0xffffffff7d400000      /usr/lib/64/libdemangle.so.1
0xffffffff7d200000      /lib/64/libkstat.so.1
0xffffffff7d000000      /lib/64/libnsl.so.1
0xffffffff7ce00000      /lib/64/libm.so.2
0xffffffff7cc00000      /lib/64/libscf.so.1
0xffffffff7ca00000      /lib/64/libuutil.so.1
0xffffffff7c800000      /lib/64/libgen.so.1
0xffffffff7c600000      /lib/64/libmd.so.1
0xffffffff7c400000      /platform/SUNW,Sun-Fire-V440/lib/sparcv9/libmd_psr.so.1
0xffffffff7c200000      /lib/64/libmp.so.2
0xffffffff7be00000      /opt/resolve3/jre/jre/lib/sparcv9/libverify.so
0xffffffff7bc00000      /opt/resolve3/jre/jre/lib/sparcv9/libjava.so
0xffffffff7ba00000      /opt/resolve3/jre/jre/lib/sparcv9/libinstrument.so
0xffffffff7b700000      /opt/resolve3/jre/jre/lib/sparcv9/libzip.so
0xfffffffeec800000      /opt/resolve3/jre/jre/lib/sparcv9/libmanagement.so
0xfffffffeec600000      /opt/resolve3/jre/jre/lib/sparcv9/libnet.so
0xfffffffeec400000      /opt/resolve3/jre/jre/lib/sparcv9/libj2pkcs11.so
0xfffffffeec200000      /usr/lib/sparcv9/libpkcs11.so
0xfffffffeec000000      /usr/lib/64/libcryptoutil.so.1
0xfffffffeebe00000      /usr/lib/security/64/pkcs11_softtoken_extra.so
0xfffffffeea400000      /opt/resolve3/jre/jre/lib/sparcv9/libnio.so
0xfffffffeea200000      /lib/64/librt.so.1
0xfffffffeea000000      /lib/64/libsendfile.so.1
0xfffffffee9e00000      /lib/64/libaio.so.1

VM Arguments:
jvm_args: -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms2G -Xmx2G -Xmn800M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSP
arallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.por
t=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dlog4j.configuration=log4j-server.properties -Dlog4j.defaultInitOverride=true -Dcassandra-pidfile=lock -Dpas
swd.properties=/opt/resolve3/cassandra/conf/passwd.properties -Dpasswd.mode=RESOLVE -Dorg.xerial.snappy.tempdir=/opt/resolve3/tmp
java_command: org.apache.cassandra.thrift.CassandraDaemon
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/usr/bin
LD_LIBRARY_PATH=/opt/resolve3/jre/jre/lib/sparcv9/server:/opt/resolve3/jre/jre/lib/sparcv9:/opt/resolve3/jre/jre/../lib/sparcv9
SHELL=/usr/bin/bash

Signal Handlers:
SIGSEGV: [libjvm.so+0x9b31a0], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGBUS: [libjvm.so+0x9b31a0], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGFPE: [libjvm.so+0x23f718], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGPIPE: [libjvm.so+0x23f718], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGXFSZ: [libjvm.so+0x23f718], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGILL: [libjvm.so+0x23f718], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGQUIT: [libjvm.so+0x868ee0], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGHUP: [libjvm.so+0x868ee0], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x868ee0], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIG39: [libjvm.so+0x86c340], sa_mask[0]=0x00000000, sa_flags=0x00000008
SIG40: [libjvm.so+0x23f718], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c


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

OS:                       Solaris 10 5/09 s10s_u7wos_08 SPARC
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 30 March 2009

uname:SunOS 5.10 Generic_142900-01 sun4u  (T2 libthread)
rlimit: STACK 8192k, CORE infinity, NOFILE 65536, AS infinity
load average:0.16 0.08 0.07

CPU:total 4 has_v8, has_v9, has_vis1, has_vis2, is_ultra3

Memory: 8k page, physical 16777216k(4361136k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.14-b01) for solaris-sparc JRE (1.6.0_41-b02), built on Feb  8 2013 00:50:12 by "" with Workshop 5.8

time: Thu May 30 13:52:10 2013
elapsed time: 49 seconds

Is there any JVM option I can add to switch it to using safe or vanilla compare methods, or something that might help the JVM deal with the unsafe method better on Solaris?

Update:

So it's definitely a bug in the 64bit Solaris SPARC JVM. Unfortunately I can't find any JVM version out there without this bug, and no workaround for it without touching the base code. My current fix is to check for Solaris 64 bit, then do an array copy and use the Guava lexicographicalComparator if it is. This method is clearly slower than just using the FastByteComparisons but until I can find a JVM version that doesn't have this bug or a better workaround it'll have to do.

private static final boolean useFastByteComparison = !System.getProperty("os.arch").contains("sparcv9");
...
public static int compareUnsigned(byte[] bytes1, byte[] bytes2, int offset1, int offset2, int len1, int len2)
{
    if (useFastByteComparison) {
        return FastByteComparisons.compareTo(bytes1, offset1, len1, bytes2, offset2, len2);
    } else {
        // Short circuit equal case
        if (bytes1 == bytes2 && offset1 == offset2 && len1 == len2) {
          return 0;
        } else {
            byte[] comp1 = new byte[len1];
            byte[] comp2 = new byte[len2];
            System.arraycopy(bytes1, offset1, comp1, 0, len1);
            System.arraycopy(bytes2, offset2, comp2, 0, len2);
            return UnsignedBytes.lexicographicalComparator().compare(comp1, comp2);
        }
    }
}
Justin
  • 1
  • 2
  • I was able to get a dev system up to test with 1.7 (JRE version: 7.0_21-b11) to see if it would help at all. It does not. It has the same problematic frame: V [libjvm.so+0xb9c3e8] Unsafe_GetLong+0x158 – Justin Jun 07 '13 at 01:59
  • I downloaded the 1.2.4 src and added an option to skip the unsafe comparison with a system property so we can at least keep testing with the 64 bit Solaris JVM, but I feel like this is a poor solution. `private static final boolean compareUnsafe = !"false".equalsIgnoreCase(System.getProperty("cassandra.compare_unsafe"));` – Justin Jun 11 '13 at 01:59

2 Answers2

1

Looks like a bug in that particular JVM.

jbellis
  • 19,347
  • 2
  • 38
  • 47
  • I've gone through a couple JRE versions with no luck. Is there a particular version of the Solaris SPARC JRE that has been tested and known to work in 64 bit mode with the Unsafe methods? – Justin Jun 11 '13 at 00:44
  • 1
    Looks like the SPARC JVM can't handle Unsafe.getLong when the offset is not a multiple of Longs.BYTES, and a call is being made with an offset of 2 from ByteBufferUtil.compareUnsigned. From a log I added: `Comparing ^Lbootstrapped to ^Lcluster_name with offsets 2 and 2 and lengths 12 and 12`. Windows and Linux JVMs appear fine with this. – Justin Jun 12 '13 at 21:22
  • It's really JVM bug (Java 6/7) and we fixed it by change of… HBase jar file. It happens only on Solaris 64 bit. – Yuri Levinsky Aug 08 '13 at 12:14
  • I tried opening a bug for this with Java but it was closed as Not an issue. https://bugs.openjdk.java.net/browse/JDK-8021574 It looks like they don't support using Unsafe to pull unaligned memory values. – Justin Apr 25 '14 at 17:10
0

It's really JVM bug, not only "look like" (Java 6/7) and we fixed it by change of… HBase jar file. It happens only on Solaris 64 bit.

Yuri Levinsky
  • 1,515
  • 2
  • 13
  • 26