Re: [Sqlrelay-discussion] The JAVA client is crashed with SIGSEGV in 64bit LINUX
Brought to you by:
mused
|
From: seong h. p. <seo...@gm...> - 2010-04-15 09:29:11
|
I found a bug for myself :) In "com_firstworks_sqlrelay_SQLRConnection.C" , replacing env->GetIntField to env->GetLongField solves the problem. CAUSE: When GetIntField() returns a value which is '32bit negative number' It becames a '64bit negative number' through a type casting to "sqlrconnection *" . but GetLongField() always returns 64bit positive number in 64bit enviroment. On Wed, Apr 14, 2010 at 2:36 PM, seong hoon park <seo...@gm...> wrote: > HI~ > > In x86_64 linux , java client is crashed with SIGSEGV > > - sqlrelay version : 0.41 , rudiments version : 0.32 ( but same in > older version ) > - jdk : both openjdk 1.6 and SUN JDK 1.6 > - OS : RHEL , CENTOS > - In 32bit machine , there is no problem. > > > REPRODUCING: > > $ java MyClass.java > > /* after some output */ > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00002aaaf42d08f1, pid=18442, tid=1087682880 > # > # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) > # Problematic frame: > # C [libsqlrclient-0.41.so.1+0x128f1] _ZN10sqlrcursor12prepareQueryEPKcj+0x17 > # > # An error report file with more information is saved as: > # /neiz/cpool4/java/hs_err_pid18442.log > # > # If you would like to submit a bug report, please visit: > # http://icedtea.classpath.org/bugzilla > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > Aborted > > > > > - MyClass.java is a simple program which just fetches and prints . > - The error is occured in more high frequency when executing the > program repeatedly than just executing once . > > /* MyClass.java */ > > import com.firstworks.sqlrelay.*; > import java.io.*; > > > public class MyClass { > public static void main(String[] arg) { > int i; > > > for(i=0;i<10000;i++) > { > > System.out.printf("%d\n",i); > SQLRConnection con=new > SQLRConnection("sqlr.ssc.",(short)2001,"","user","pass",0,1); > con.delete(); > > SQLRCursor cur=new SQLRCursor(con); > > if(!cur.sendQuery("select * from tab")) > { > System.out.println(cur.errorMessage()); > } > con.endSession(); > > for (int row=0; row<cur.rowCount(); row++) { > String[] rowarray=cur.getRow(row); > for (int col=0; col<cur.colCount(); col++) { > System.out.println(rowarray[col] + ","); > } > System.out.println(); > } > > cur.delete(); > > } > > } > } > |