ct_connect threading issue?

"Purcell, John (MTVi)" <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <[email protected]>
Hi all,

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

status = ct_connect(self->conn, dsn, CS_NULLTERM); on line 310 of conn.c.

It seem that this method isn't thread safe, from the Open Clien ref manual:

Note If ct_connect is called in the entry funtions of a DLL, a deadlock

may arise. This system creates OS threads and tries to synchronize them

using system utilities. This synchronization conflicts with the operating

system’s serialization process.

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).

Any help would be greatly appriciated (stack traces on request for Win32, Core files on Solaris).

JP
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.