Solaris 10上的Cassandra 64位与Unsafe_GetLong崩溃

时间:2013-05-30 23:09:30

标签: cassandra java solaris-10

我正在尝试在Solaris 10服务器上启动一个Cassandra节点,但每次我尝试创建一个新的列族时,JVM最终都会崩溃“V [libjvm.so + 0x976c08] Unsafe_GetLong + 0x120”有问题的框架。我正在使用JRE版本:6.0_41-b02,遗憾的是,目前无法更新到JRE 7。奇怪的是,如果我删除-d64选项将JRE版本切换回32位我不会得到这个错误,虽然我只吸收了2GB的堆空间。

#
# 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

我是否可以添加任何JVM选项以使用安全或普通比较方法将其切换为可能有助于JVM在Solaris上更好地处理不安全方法的内容?

更新

所以它绝对是64位Solaris SPARC JVM中的一个错误。不幸的是,如果没有这个bug,我找不到任何JVM版本,没有触及基本代码就没有解决方法。我目前的解决方法是检查Solaris 64位,然后执行数组复制并使用Guava lexicographicalComparator(如果是)。这个方法显然比只使用FastByteComparisons慢,但直到我找到一个没有这个bug的JVM版本或者它必须做的更好的解决方法。

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);
        }
    }
}

2 个答案:

答案 0 :(得分:1)

看起来像那个特定JVM中的错误。

答案 1 :(得分:0)

这真的是JVM错误,不仅“看起来像”(Java 6/7)而且我们通过更改... HBase jar文件来修复它。它仅在Solaris 64位上发生。