[freetds] FreeTDS problem

Victor Gamov vit at lipetsk.ru
Wed Apr 9 12:02:30 EDT 2003


Lowden, James K wrote:
>>From: Victor Gamov [mailto:vit at lipetsk.ru]
>>Sent: April 9, 2003 9:06 AM
>>
>>I have problem with FreeTDS-0.60 and DBD-Sybase-1.91 on FreeBSD box.
> 
> Some of my favorite technologies....
> 
>>Sometimes connection is dead (network or other problem) and I see the 
>>following message in freetds dump file:
>>
>>TDS: Write failed in tds_write_packet
>>Error: 9 (Bad file descriptor)
>>2003-04-09 16:34:29.914383 inside ct_con_props() action = CS_GET 
>>property = 13
>>2003-04-09 16:34:29.914407 fetching userdata 140690736
>>2003-04-09 16:34:29.914475 ct_send() succeeded
>>2003-04-09 16:34:29.914500 inside ct_results()
>>2003-04-09 16:34:29.914521 processing result tokens.  marker is  0
>>2003-04-09 16:34:29.914544 inside 
>>tds_process_default_tokens() marker is 0
>>2003-04-09 16:34:29.914565 leaving tds_process_default_tokens() 
>>connection dead
>>2003-04-09 16:34:29.914640 inside ct_cmd_drop()
>>2003-04-09 16:35:29.923092 inside ct_cmd_alloc()
>>2003-04-09 16:35:29.923168 inside ct_command()
>>2003-04-09 16:35:29.923194 inside ct_send()
>>2003-04-09 16:35:29.923226 ct_send() succeeded
>>
>>and so on. But I cann't catch this error in my Perl program even if I 
>>connect with {RaiseError=>1, PrintError=>1}
> 
> First, can we isolate the problem?  If you turn on a DBI trace, is it clear
> whether or not FreeTDS is reporting a connection problem?  From the log you
> provided, it would seem not.  If FreeTDS is not propagating the error to
> DBD::Sybase, there's no way your program will detect it.  
> 
> You might want to upgrade.  FreeTDS version 0.61 saw work in this area, and
> Michael has called for testers of DBD::Sybase 0.99.  I suggest linking that
> to a recent snapshot of FreeTDS and see if the trouble persists.  If it
> does, I can tell you several people are looking at the FreeTDS network
> layer, timeout handling in particular.  If you describe a reproducible
> problem, I think we'll come up with a reproducible solution.  

I fix src/tds/write.c tds_flush_packet() to return result code getted 
from tds_write_packet().
Then I download 0.61 and found this fix in it. So I hope that everything 
will be OK. Now I test this in our productive system.

Thanks!





More information about the FreeTDS mailing list