Re: [Sqlrelay-discussion] SQLRelay JAVA exception
Brought to you by:
mused
|
From: Rodrigo P. T. <te...@de...> - 2006-01-31 12:36:35
|
Hi David, David Muse wrote: > Long queries should actually mean queries that are longer than 32k > characters. A query with only 397 characters or so shouldn't cause a > problem. I vaguely remember an issue like this though, and if it's wha= t > I remember, I think I fixed it in 0.36. Is it possible for you to > upgrade SQL Relay to more current version? If so, try > http://www.firstworks.com/sqlrelay-0.37pre5.tar.gz or sqlrelay-0.36.4 > from the sqlrelay website and see if the problem still persists. If it= > does (or if you can't easily upgrade), then let me know and I'll see if= > I can get you some code with debug in it and we'll patch the version > you're running now. > =20 I'm using 0.36.4 in a test box and the problem happens too. I upgraded to 0.37pre5 but it's not possible to run my Java code, a lot of types of constructors changed and it will be necessary to change all Java code :-( best regards, Telles > Dave > dav...@fi... > > On Wed, 2006-01-04 at 10:34 -0200, Rodrigo P. Telles wrote: > =20 >> Hi David, >> >> At last I think we (our team) found a cause of the exception! >> >> I think there was a misunderstood from my part in that answer (about >> "long queries"). >> I understood "long queries" as "long result sets" - and not the lenght= >> of the queries - when in fact the queries has about 397-580 characters= =2E >> I don't know if it's big enough to be considered "long" but it's the >> cause of the problem. If we changes that long queries to small ones >> (selecting or updating only 3 fields instead of 34) the problem go awa= y >> and everything works fine. >> >> Problematic query: >> >> SELECT phplib_id, username, domain, password, first_name, last_name, >> phone, email_address, datetime_created, datetime_modified, confirmatio= n, >> flag, sendnotification, greeting, ha1, ha1b, perms, allow_find, >> timezone, rpid, empresa, codInscricao, numInscricao, endereco, bairro,= >> cep, cidade, estado, pais, listaPublica, sigame, temSigame, status, >> macAddress FROM subscriber WHERE username=3D'2740' >> >> Solution query: >> >> SELECT phplib_id, username, first_name FROM subscriber WHERE username=3D= '2740' >> >> So as you said perhaps it's easy to patch. >> We'll test with how many fields the query starts to generate an except= ion. >> >> best regards, >> Telles >> >> Rodrigo P. Telles wrote: >> >> =20 >>> Hi David, >>> >>> Firstworks/4access wrote: >>> >>> =20 >>>> Is it possible to reliably reproduce the problem with a particular >>>> query, or is it kind of random? >>>> =20 >>> No it doesn't, it happens in a random fashion. Could happens twice in= >>> a week or >>> once in a month. >>> >>> =20 >>>> Offhand, it looks like java is trying to run (or return from) a nati= ve >>>> C++ function and has the wrong address for the function (or wrong re= turn >>>> address) and it ends up jumping off into the weeds, possibly into a >>>> non-executable page of memory. This typically happens when a buffer= >>>> overrun occurs and overwrites a jump address. >>>> =20 >>>> Does this happen with really long queries? With >>>> =20 >>> No it doesn't. >>> It happens in a simple query using INSERT or SELECT! >>> >>> =20 >>>> Java/Perl/PHP/Ruby/TCL/Python, SQL Relay makes a copy of the query. >>>> It's possible that there's some kind of bug where the SQL Relay clie= nt >>>> is copying too much data and overrunning it's buffer. If it's only = long >>>> queries, that would make sense and should be easy to patch. >>>> =20 >>>> Let me know... >>>> =20 >>> Let me know if I can do any thing to "collect" more informations abou= t >>> that problem. >>> Thanks for your answer. >>> >>> Telles >>> >>> =20 >>>> David Muse >>>> dav...@fi... >>>> =20 >>>> On Fri, 2005-11-11 at 17:48 -0200, Rodrigo P. Telles wrote: >>>> =20 >>>> Hi Guys, >>>> =20 >>>> I've been experiencing some errors using JAVA with sqlrelay-0.35 API= >>>> =20 >>> and MySQL >>> =20 >>>> 4.1.7 as a DB backend. >>>> =20 >>>> Some thimes when I'm doing a query the application failed with that >>>> =20 >>> output >>> =20 >>>> exception: >>>> --------------------------------------------------------------------= -------------- >>>> An unexpected exception has been detected in native code outside the= VM. >>>> Unexpected Signal : 11 occurred at PC=3D0x400C6C48 >>>> Function=3D(null)+0x400C6C48 >>>> Library=3D/lib/libc.so.6 >>>> =20 >>>> NOTE: We are unable to locate the function name symbol for the error= >>>> just occurred. Please refer to release documentation for possib= le >>>> reason and solutions. >>>> =20 >>> =20 >>>> Current Java thread: >>>> at com.firstworks.sqlrelay.SQLRCursor.prepareQuery(Native Method) >>>> at it.devel.Dao.getBean(Dao.java:185) >>>> at >>>> =20 >>> it.devel.wiser.TerminadorDAO.calculaMinutagem(TerminadorDAO.java:131)= >>> =20 >>>> at it.devel.Bilhetagem.getTempoCorrigido(Bilhetagem.java:342) >>>> at it.devel.Bilhetagem.bilhetaTerminador(Bilhetagem.java:320) >>>> at it.devel.Bilhetagem.bilhetar(Bilhetagem.java:141) >>>> at it.devel.Bilhetagem.main(Bilhetagem.java:693) >>>> =20 >>>> Dynamic libraries: >>>> 08048000-08056000 r-xp 00000000 08:06 246208 =20 >>>> =20 >>> /usr/local/j2sdk1.4.2_06/bin/java >>> =20 >>>> 08056000-08059000 rwxp 0000d000 08:06 246208 =20 >>>> =20 >>> /usr/local/j2sdk1.4.2_06/bin/java >>> =20 >>>> 40000000-40011000 r-xp 00000000 08:05 212994 /lib/ld-2.3.3.so >>>> 40011000-40012000 rwxp 00011000 08:05 212994 /lib/ld-2.3.3.so >>>> 40018000-40026000 r-xp 00000000 08:05 213024 /lib/libpthread-0.1= 0.so >>>> 40026000-40028000 rwxp 0000d000 08:05 213024 /lib/libpthread-0.1= 0.so >>>> 4006a000-4006c000 r-xp 00000000 08:05 213005 /lib/libdl-2.3.3.so= >>>> 4006c000-4006d000 rwxp 00001000 08:05 213005 /lib/libdl-2.3.3.so= >>>> 4006d000-40167000 r-xp 00000000 08:05 213001 /lib/libc-2.3.3.so >>>> 40167000-40170000 rwxp 000fa000 08:05 213001 /lib/libc-2.3.3.so >>>> 40173000-4056f000 r-xp 00000000 08:06 134540 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so >>>> 4056f000-4058b000 rwxp 003fb000 08:06 134540 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so >>>> 405a2000-405b1000 r-xp 00000000 08:05 213009 /lib/libnsl-2.3.3.s= o >>>> 405b1000-405b2000 rwxp 0000f000 08:05 213009 /lib/libnsl-2.3.3.s= o >>>> 405b4000-405d4000 r-xp 00000000 08:05 213007 /lib/libm-2.3.3.so >>>> 405d4000-405d5000 rwxp 0001f000 08:05 213007 /lib/libm-2.3.3.so >>>> 405d5000-405dd000 r-xp 00000000 08:06 101710 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so >>>> 405dd000-405de000 rwxp 00007000 08:06 101710 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so >>>> 405de000-405e2000 rwxs 00000000 08:09 14628 =20 >>>> =20 >>> /tmp/hsperfdata_callstart/19866 >>> =20 >>>> 405e3000-405ec000 r-xp 00000000 08:05 213015 =20 >>>> =20 >>> /lib/libnss_files-2.3.3.so >>> =20 >>>> 405ec000-405ed000 rwxp 00009000 08:05 213015 =20 >>>> =20 >>> /lib/libnss_files-2.3.3.so >>> =20 >>>> 405ed000-405fd000 r-xp 00000000 08:06 101717 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libverify.so >>>> 405fd000-405ff000 rwxp 0000f000 08:06 101717 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libverify.so >>>> 405ff000-4061f000 r-xp 00000000 08:06 101718 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libjava.so >>>> 4061f000-40621000 rwxp 0001f000 08:06 101718 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libjava.so >>>> 40621000-40635000 r-xp 00000000 08:06 101720 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libzip.so >>>> 40635000-40638000 rwxp 00013000 08:06 101720 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/i386/libzip.so >>>> 40638000-41fdf000 r-xs 00000000 08:06 101803 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/rt.jar >>>> 42029000-4203f000 r-xs 00000000 08:06 101742 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/sunrsasign.jar >>>> 4203f000-4211c000 r-xs 00000000 08:06 101787 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/jsse.jar >>>> 4211c000-4212d000 r-xs 00000000 08:06 101743 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/jce.jar >>>> 4212d000-42686000 r-xs 00000000 08:06 101788 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/charsets.jar >>>> 4472e000-4472f000 r-xs 00000000 08:06 117021 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/Itau.jar >>>> 4c7b0000-4c7cc000 r-xs 00000000 08:06 117679 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar >>>> 4c7cc000-4c7cf000 r-xs 00000000 08:06 117680 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar >>>> 4c7cf000-4c7dc000 r-xs 00000000 08:06 117682 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar >>>> 4c7dc000-4c898000 r-xs 00000000 08:06 117684 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/localedata.jar >>>> 4c898000-4c8a6000 r-xs 00000000 08:06 117022 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/activation.jar >>>> 4c8a6000-4c8d3000 r-xs 00000000 08:06 117023 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/mailapi.jar >>>> 4c8d3000-4c92a000 r-xs 00000000 08:06 117024 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/mail.jar >>>> 4c92a000-4c930000 r-xs 00000000 08:06 117025 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/pop3.jar >>>> 4c930000-4c936000 r-xs 00000000 08:06 117026 >>>> /usr/local/j2sdk1.4.2_06/jre/lib/ext/smtp.jar >>>> 4c936000-4c939000 r-xp 00000000 08:06 377923 >>>> /usr/local/firstworks/java/com/firstworks/sqlrelay/libSQLRConnection= =2Eso >>>> 4c939000-4c93a000 rwxp 00002000 08:06 377923 >>>> /usr/local/firstworks/java/com/firstworks/sqlrelay/libSQLRConnection= =2Eso >>>> 4c93a000-4c950000 r-xp 00000000 08:06 265533 >>>> /usr/src/sqlrelay-0.35/src/api/c++/src/.libs/libsqlrclient-0.35.so.1= =2E0.0 >>>> 4c950000-4c953000 rwxp 00015000 08:06 265533 >>>> /usr/src/sqlrelay-0.35/src/api/c++/src/.libs/libsqlrclient-0.35.so.1= =2E0.0 >>>> 4c953000-4c998000 r-xp 00000000 08:06 377564 >>>> /usr/local/firstworks/lib/librudiments-0.27.so.1.0.0 >>>> 4c998000-4c9a2000 rwxp 00044000 08:06 377564 >>>> /usr/local/firstworks/lib/librudiments-0.27.so.1.0.0 >>>> 4c9a7000-4c9d2000 r-xp 00000000 08:06 115308 /usr/lib/libssl.so.= 0.9.7 >>>> 4c9d2000-4c9d5000 rwxp 0002a000 08:06 115308 /usr/lib/libssl.so.= 0.9.7 >>>> 4c9d5000-4caab000 r-xp 00000000 08:06 115306 =20 >>>> =20 >>> /usr/lib/libcrypto.so.0.9.7 >>> =20 >>>> 4caab000-4cabc000 rwxp 000d6000 08:06 115306 =20 >>>> =20 >>> /usr/lib/libcrypto.so.0.9.7 >>> =20 >>>> 4cac0000-4cac4000 r-xp 00000000 08:05 213003 /lib/libcrypt-2.3.3= =2Eso >>>> 4cac4000-4cac5000 rwxp 00003000 08:05 213003 /lib/libcrypt-2.3.3= =2Eso >>>> 4caec000-4cb8a000 r-xp 00000000 08:06 114711 =20 >>>> =20 >>> /usr/lib/libstdc++.so.5.0.5 >>> =20 >>>> 4cb8a000-4cba0000 rwxp 0009d000 08:06 114711 =20 >>>> =20 >>> /usr/lib/libstdc++.so.5.0.5 >>> =20 >>>> 4cba5000-4cbac000 r-xp 00000000 08:06 114701 /usr/lib/libgcc_s.s= o.1 >>>> 4cbac000-4cbad000 rwxp 00006000 08:06 114701 /usr/lib/libgcc_s.s= o.1 >>>> 4cbad000-4cbb7000 r-xp 00000000 08:06 377924 >>>> /usr/local/firstworks/java/com/firstworks/sqlrelay/libSQLRCursor.so >>>> 4cbb7000-4cbb9000 rwxp 0000a000 08:06 377924 >>>> /usr/local/firstworks/java/com/firstworks/sqlrelay/libSQLRCursor.so >>>> =20 >>>> Heap at VM Abort: >>>> Heap >>>> def new generation total 576K, used 236K [0x44730000, 0x447d0000, >>>> =20 >>> 0x44c10000) >>> =20 >>>> eden space 512K, 43% used [0x44730000, 0x44767248, 0x447b0000) >>>> from space 64K, 24% used [0x447b0000, 0x447b3fa8, 0x447c0000) >>>> to space 64K, 0% used [0x447c0000, 0x447c0000, 0x447d0000) >>>> tenured generation total 1408K, used 339K [0x44c10000, 0x44d70000,= >>>> =20 >>> 0x48730000) >>> =20 >>>> the space 1408K, 24% used [0x44c10000, 0x44c64f58, 0x44c65000, >>>> =20 >>> 0x44d70000) >>> =20 >>>> compacting perm gen total 4096K, used 1696K [0x48730000, >>>> =20 >>> 0x48b30000, 0x4c730000) >>> =20 >>>> the space 4096K, 41% used [0x48730000, 0x488d8380, 0x488d8400, >>>> =20 >>> 0x48b30000) >>> >>> =20 >>>> Local Time =3D Fri Nov 11 15:34:29 2005 >>>> Elapsed Time =3D 771 >>>> # >>>> # The exception above was detected in native code outside the VM >>>> # >>>> # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) >>>> - >>>> --------------------------------------------------------------------= ------------------------------------ >>>> =20 >>>> At the moment is not so easy for me to update to 0.36.x. >>>> Does some one can help with that problem? >>>> =20 >>>> Thanks in advance. >>>> -- >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> Rodrigo P. Telles <te...@de...> >>>> IT Manager >>>> Devel-IT - http://www.devel.it >>>> IVOZ # 1029 >>>> +55 14 3324-1200 >>>> Bestcom Group >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> =20 >>> ------------------------------------------------------- >>> SF.Net email is sponsored by: >>> Tame your development challenges with Apache's Geronimo App Server. >>> Download >>> it for free - -and be entered to win a 42" plasma tv or your very own= >>> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php= >>> _______________________________________________ >>> Sqlrelay-discussion mailing list >>> Sql...@li... >>> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >>> >>> >>> >>> >>> >>> =20 >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by the JBoss Inc. Get Certified Toda= y >>>> Register for a JBoss Training Course. Free Certification Exam >>>> for All Training Attendees Through End of 2005. For more info visit:= >>>> http://ads.osdn.com/?ad_id=3D7628&alloc_id=3D16845&op=3Dclick >>>> _______________________________________________ >>>> Sqlrelay-discussion mailing list >>>> Sql...@li... >>>> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >>>> =20 >>> >>> =20 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log = files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!= > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > =20 |