问题描述
通过Java的JNI调用libcurl导致JVM崩溃,不知道什么原因大家帮看看,并不是刚上来就崩溃,而是执行一段就崩溃,JVM崩溃的log如下:##AfatalerrorhasbeendetectedbytheJavaRuntimeEnvironment:##SIGSEGV(0xb)atpc=0x0000003163221ca2,pid=12648,tid=47588522796480##JREversion:6.0_23-b05#JavaVM:JavaHotSpot(TM)64-BitServerVM(19.0-b09mixedmodelinux-amd64compressedoops)#Problematicframe:#C[libcurl.so.3+0x21ca2]##Ifyouwouldliketosubmitabugreport,pleasevisit:#http://java.sun.com/webapps/bugreport/crash.jsp#---------------THREAD---------------Currentthreadisnativethreadsiginfo:si_signo=SIGSEGV:si_errno=0,si_code=1(SEGV_MAPERR),si_addr=0x0000003100000500Registers:RAX=0x0000003100000500,RBX=0x0000003163234700,RCX=0x00000000438fc3a0,RDX=0x0000000000004000RSP=0x00000000438fad48,RBP=0x0000000000000000,RSI=0x00000000438fc370,RDI=0x000000000000006eR8=0x00000000438fc490,R9=0x0000000000000001,R10=0x0000000000000008,R11=0x0000000000000246R12=0x0000000000000000,R13=0x00000000438fc370,R14=0x0000003163221c90,R15=0x00002aaabc00b0e0RIP=0x0000003163221ca2,EFL=0x0000000000010287,CSGSFS=0x0000000000000033,ERR=0x0000000000000006TRAPNO=0x000000000000000eRegistertomemorymapping:RAX=0x00000031000005000x0000003100000500ispointingtounknownlocationRBX=0x00000031632347000x0000003163234700:<offset0x34700>in/usr/lib64/libcurl.so.3at0x0000003163200000RCX=0x00000000438fc3a00x00000000438fc3a0ispointingintothestackforthread:0x000000005aba3000[erroroccurredduringerrorreporting(printingregisters,topofstack,instructionsnearpc),id0xb]Stack:[0x00002b4811ad5000,0x00007fff99bde000],sp=0x00000000438fad48,freespace=18014352037410967kNativeframes:(J=compiledJavacode,j=interpreted,Vv=VMcode,C=nativecode)C[libcurl.so.3+0x21ca2][erroroccurredduringerrorreporting(printingnativestack),id0xb]---------------PROCESS---------------VMstate:notatsafepoint(normalexecution)VMMutex/Monitorcurrentlyownedbyathread:NoneHeapPSYoungGentotal152896K,used94414K[0x00000000eaab0000,0x00000000f5550000,0x0000000100000000)edenspace131072K,72%used[0x00000000eaab0000,0x00000000f06e38f0,0x00000000f2ab0000)fromspace21824K,0%used[0x00000000f4000000,0x00000000f4000000,0x00000000f5550000)tospace21824K,0%used[0x00000000f2ab0000,0x00000000f2ab0000,0x00000000f4000000)PSOldGentotal349568K,used0K[0x00000000c0000000,0x00000000d5560000,0x00000000eaab0000)objectspace349568K,0%used[0x00000000c0000000,0x00000000c0000000,0x00000000d5560000)PSPermGentotal131072K,used16158K[0x00000000b0000000,0x00000000b8000000,0x00000000c0000000)objectspace131072K,12%used[0x00000000b0000000,0x00000000b0fc7a10,0x00000000b8000000)Dynamiclibraries:40000000-40009000r-xp00000000fd:0033554530/usr/java/jdk1.6.0_23/bin/java40108000-4010a000rwxp00008000fd:0033554530/usr/java/jdk1.6.0_23/bin/java405e5000-405e6000---p405e500000:000405e6000-406e6000rwxp405e600000:000略去.........VMArguments:jvm_args:-Xms512m-Xmx1024m-XX:PermSize=128M-XX:MaxPermSize=256m-Dlog4j.configuration=file:./config/log4j.properties-Djava.ext.dirs=./libjava_command:cn.knet.kx.monitor.site.machine.App-startLauncherType:SUN_STANDARDEnvironmentVariables:JAVA_HOME=/usr/java/jdk1.6.0_23CLASSPATH=.:/usr/java/jdk1.6.0_23/lib/dt.jar:/usr/java/jdk1.6.0_23/lib/tools.jarPATH=/usr/java/jdk1.6.0_23/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/apache/bin:/home/kx_monitor/binSHELL=/bin/bashSignalHandlers:SIGSEGV:[libjvm.so+0x76a860],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGBUS:[libjvm.so+0x76a860],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGFPE:[libjvm.so+0x621870],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGPIPE:[libjvm.so+0x621870],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGXFSZ:[libjvm.so+0x621870],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGILL:[libjvm.so+0x621870],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGUSR1:SIG_DFL,sa_mask[0]=0x00000000,sa_flags=0x00000000SIGUSR2:[libjvm.so+0x624450],sa_mask[0]=0x00000000,sa_flags=0x10000004SIGHUP:[libjvm.so+0x624050],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGINT:SIG_IGN,sa_mask[0]=0x00000000,sa_flags=0x00000000SIGTERM:[libjvm.so+0x624050],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004SIGQUIT:[libjvm.so+0x624050],sa_mask[0]=0x7ffbfeff,sa_flags=0x10000004---------------SYSTEM---------------OS:RedHatEnterpriseLinuxServerrelease5.3(Tikanga)uname:Linux2.6.18-128.el5#1SMPWedDec1711:41:38EST2008x86_64libc:glibc2.5NPTL2.5rlimit:STACKinfinity,CORE0k,NPROC268288,NOFILE65535,ASinfinityloadaverage:0.070.030.01/proc/meminfo:MemTotal:32950012kBMemFree:26245316kBBuffers:191892kBCached:4575968kBSwapCached:0kBActive:2425692kBInactive:4001500kBHighTotal:0kBHighFree:0kBLowTotal:32950012kBLowFree:26245316kBSwapTotal:34996216kBSwapFree:34996216kBDirty:188kBWriteback:0kBAnonPages:1659260kBMapped:124168kBSlab:203896kBPageTables:16740kBNFS_Unstable:0kBBounce:0kBCommitLimit:51471220kBCommitted_AS:5603664kBVmallocTotal:34359738367kBVmallocUsed:280396kBVmallocChunk:34359456683kBHugePages_Total:0HugePages_Free:0HugePages_Rsvd:0Hugepagesize:2048kBCPU:total24(6corespercpu,2threadspercore)family6model44stepping2,cmov,cx8,fxsr,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,htMemory:4kpage,physical32950012k(26245316kfree),swap34996216k(34996216kfree)vm_info:JavaHotSpot(TM)64-BitServerVM(19.0-b09)forlinux-amd64JRE(1.6.0_23-b05),builtonNov12201014:12:21by"java_re"withgcc3.2.2(SuSELinux)time:FriJul2216:32:532011elapsedtime:338seconds