From: Purcell, J. (MTVi) <Pur...@mt...> - 2003-04-04 17:30:33
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.0.6249.1"> <TITLE>ct_connect threading issue?</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I've been trying to use the Sybase = module with Python 2.2.2 on Win32 (W2K to be exact) w/ Sybase 11.9.2 and = on Solaris 2.8 64 bit on Sybase 12.5. It seems that it dies with a = thread access violation and aborts the interpreter. I've tracked down = the issue and it dies in</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial"> status =3D = ct_connect(self->conn, dsn, CS_NULLTERM); on line 310 of conn.c. = </FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">It seem that this method isn't thread = safe, from the Open Clien ref manual: </FONT> </P> <P><B><FONT SIZE=3D2 FACE=3D"Arial">Note</FONT></B> <FONT SIZE=3D2 = FACE=3D"Times New Roman">If ct_connect is called in the entry funtions = of a DLL, a deadlock</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">may arise. This system = creates OS threads and tries to synchronize them</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">using system utilities. This = synchronization conflicts with the operating</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">system’s serialization = process.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Too bad it doesn't explain a work = around :) Oddly enough, if I just use 32 bit mode on Solaris and only = use the 32 bit 11.9.2 driver it works fine (which would make sense since = the threading models are different).</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">Any help would be greatly appriciated = (stack traces on request for Win32, Core files on Solaris).</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">JP</FONT> </P> <BR> </BODY> </HTML> |