[freetds] Querying from multiple threads - SEGMENTATION FAULT

Wolfgang Gruen wgruen at caci.com
Thu Jan 5 08:57:00 EST 2006


I had the same problem and got the fix from a snapshot I got last 
December. I could not build the snapshot, because of build errors.

I am wondering, is there a new "Release" in the near future and which kind 
of unit testing is performed to call it a release.

I appreciate an answer.
Thanks
Wolfgang




"ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com> 
Sent by: freetds-bounces at lists.ibiblio.org
01/05/2006 05:17 AM
Please respond to
FreeTDS Development Group <freetds at lists.ibiblio.org>


To
"FreeTDS Development Group" <freetds at lists.ibiblio.org>
cc

Subject
Re: [freetds] Querying from multiple threads - SEGMENTATION FAULT






> 
>  I am facing a problem using TDS. The problem occurs only 
> when using  multiple threads to access SQL Server 2000. The 
> current scenerio is  that whenever I need to query database 
> in a thread, the thread opens  the db (dbopen), executes the 
> query, checks the results etc and in the  end closes the db 
> connection (dbclose). The problem arrises when while  a 
> thread is processing the results, the other thread calls 
> dbopen to  open a connection with same LOGINREC. Sometimes it 
> even occurs in other  states as well and results in 
> segmenation fault. I used another  approach to solve this 
> problem and that was to create a connection pool  and give a 
> free connection to a thread and calling dbcancel before 
> binding parameters and executing the query. Everything worked 
> fine  until a special case arrived. If I bind a varchar 
> parameter will NULL  value (NULL acceptable in SP) and 
> specify maximum length = -1 and  Length = -1. the bind 
> function fails but now even the valid q uries  which were ru
>  nning
>  fine wont run on the same DBPROCESS. I cannot call  dbclose 
> and then dbopen again bcuz of the reason mentioned above. Can 
>  anybody help me on this? And can anybody tell me why this 
> happens and  how can I avoid it? If I check for the values of 
> length and max length  while binding the parameter myself 
> then can anybody provide me with the  list that can cause the 
> same problem?
> 

Hi, 
  sorry for late reply. You should try snapshot version as it fixes
problem like this.

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list