[freetds] FreeTDS problem

Lowden, James K LowdenJK at bernstein.com
Wed Apr 9 11:07:13 EDT 2003

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


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above.  If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.

More information about the FreeTDS mailing list