Skip to Content.
Sympa Menu

freetds - RE: [freetds] tdsdump SIGSEGV with mt apps

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] tdsdump SIGSEGV with mt apps
  • Date: Fri, 6 May 2005 14:49:08 +0200

>
> Hi,
>
> Attached is my patch which from my testing, appears to fix
> the timeout
> problems, makes dblib and TDSDUMP thread-safe.
>
> I've had to modify the ODBC test case in order for it to pass. I
> believe this is the appropriate behaviour for the test case but I
> could be mistaken.
>
> Comments?
>
> Thanks.
>

Sorry, I forgot to add some comments. Why do you add a fixed 60 seconds
timeout and a 3600 query_timeout? I think that is up to developer if it
wants an infinite wait... Looking deeper to your code I saw the
interrupt handling. However on other errors (and not
EAGAIN/TDSSOCK_EINPROGRESS) you should return -1 and let caller close
the connection (we can't continue in this situations, usually is a
connection close). You removed code to close connection if we are not
able to read header... however if we read partially header we go to an
invalid state... much better to close connection... Note that goodread
do not exit till if read all data... it CANNOT exit on timeout (as it do
now... this is the reason timeout test do not works). You can change
this behavior however you cannot lose sync with server...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page