Re: Segentation faults when connecting to SQL Server 2000

Harri Pasanen <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <[email protected]>
On Tuesday 10 September 2002 02:31, Dave Cole wrote:
> >>>>> "Kevin" == Kevin Jacobs <[email protected]> writes:
>
> Kevin> On 9 Sep 2002, Peter Hopfgartner wrote:
> >> I'm trying to use the Sybase module from a Debian Linux 3.0 system
> >> (Python 2.1.3, FreeTDS 0.53).
> >>
> >> I've set up some Python code in order to create ASCII file
> >> containing the database scheme, functions and stored
> >> procedures. The code runs fine when connecting through ODBC from a
> >> Windows computer. It crashes when connecting from the Linux client,
> >> as soon as the 2nd query is run.
> >>
> >> Has there already been some work done on it, both from the FreeTDS
> >> side (version 0.60rc1 came out these days, should I install it?)
> >> and the Sybase module side. Can I help in debugging the problem?
>
> Kevin> All I can suggest is that you use the _very_ lastest FreeTDS
> Kevin> library.  The last released version had some rather nasty bugs
> Kevin> in it.
>
> >> As soon as I have again the chance to connect to the SQL Server
> >> (it's at a customers place) I will paste you the exact message
> >> (something about threads and relesing a lock that has not been
> >> set).
>
> Kevin> Ah!  I've run into this myself.  I'll dig up my patches that
> Kevin> re-work the Sybase module locking code that fixes it (though
> Kevin> I'm not sure if I'm just working around errors in the FreeTDS
> Kevin> LibCT implementation or unsafe assumptions that David Cole made
> Kevin> about Sybase's implementation).
>
> I am very keen to get the module working with FreeTDS.  I think the
> future of the module is largely tied to the success of FreeTDS.
>

I also played with the Sybase module + FreeTDS combo, using FreeTDS current 
snapshot.

I ran into some problems where the equivalent code that ran against a Sybase 
db would halt with some error message when running against MS-SQL server.  
Some things I was able to sort out just by closing and reallocating a  cursor 
prior to continuing.  Note that I've had similar problems with Sybase module 
against Sybase DB, where I need to read all the result sets from a cursor 
before I can successfully run a stored procedure.

With Sybase+FreeTDS I then had the next problem with some threading asserts 
failing.   As I'm not using threads in my script, I boldly removed all 
threading and locking support from Sybase.py, and everything I was doing 
starting working.  Now the only remaining problem I have is that some stored 
procedure calls are segfaulting.

I heard a rumour the FreeTDS does not have support for on the wire procedure 
calls / parameter binding.  If that is true, so it may not be at the level 
off Sybase libs for some time.



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