Skip to Content.
Sympa Menu

freetds - Re: [freetds] stuck in endless loop in tds_goodread

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] stuck in endless loop in tds_goodread
  • Date: Fri, 2 Feb 2007 11:56:21 +0100

>
> Hi,
>
> Earlier this week, I've tried the current snapshot, but I
> still had the same
> problem, so I switched back to the 0.64 version. I didn't
> look at the new
> code though, so I'm not really sure if the behavior is
> exactly the same. But
> I had a quick look now and imho the problem is still there.
> In the latest
> version of tds_goodread function in net.c, it will never get
> out of the loop
> (now it's a for(;;) loop) in case of TDS_INT_CONTINUE (as in
> my case) and
> probably also not in case of TDS_INT_TIMEOUT (as in the
> discussion you're
> referring to), because there is just a continue statement.
> Maybe I'm missing
> something as I'm not an expert in the freetds code, it was
> the first time I
> had to look into it. Maybe it's the intention that you get in the
> TDS_INT_CANCEL after the cancel is sent, but what if that for
> some reason
> never happens? I think this function should have a better
> mechanism to guard
> against an endless loop.
>
> Meanwhile I've made a patch that works for me. In case of
> TDS_INT_CONTINE,
> I've just put 'return got;' and looking at the comments in
> the current code,
> the developper was also thinking about that in case of
> TDS_INT_TIMEOUT. In
> my case, the result is that the connection fails, which is ok
> for me. As
> long as I'm not in an endless loop, everything's ok for me ;-)
>
> regards,
> Largo
>
> ps. If you want to discuss this further, I'm
> interested...however, in a few
> hours I'm leaving on holiday for week :-)

Current CVS HEAD (that is tomorrow snapshot) should work.
I wrote a test that check timeout and message returned.
I'm going to backport test and try to fix it...

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page