[freetds] [ freetds-Patches-1120675 ] new features in ctlib

Thompson, Bill D (London) bill_d_thompson at ml.com
Wed Feb 16 08:02:44 EST 2005


Hi Freddy,

I had a couple of days off, so apologies for not getting back.

I've downloaded and started testing latest snapshot.

> ODBC works correctly :) ctlib not :(
> - cancel test fails. It gets all rows instead of stopping... 
> I don't understand why and enabling logging just core cause 
> tdsdump_log is not reentrant...

I find the behaviour od the ctlib/unittest/cancel is erratic.
sometimes test passes other times not. so...

cancel.c: Check asynchronous called ct_cancel()
ct_results() result_type CS_CMD_FAIL.
More results?...
- SIGALRM
ct_fetch() unexpected return -1 on row 7164.
do_fetch() returned: 1
More results?...
do_fetch retrieved 10000 rows
do_fetch() returned: 0
More results?...
cancel.c: asynchronous cancel test: PASSED
PASS: cancel

OR...

cancel.c: Check asynchronous called ct_cancel()
ct_results() result_type CS_CMD_FAIL.
More results?...
do_fetch retrieved 10000 rows
do_fetch() returned: 0
More results?...
All rows read, this may not occur.
FAIL: cancel

So I think sometimes the program/database just too fast for the test
sometimes.

If you enable TDSDUMP it always pass (because program always much
slower),
but it produce 27Mb TDSDUMP file ! I don't get core dump.

I'll look further at the problem and at the cursor free-ing issue.
I also don't see this problem , but my old compiler probably doesn't
notice the issue.

Bill






-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: 11 February 2005 13:27
To: FreeTDS Development Group
Subject: RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib


Il giorno ven, 11-02-2005 alle 10:28 +0000, Thompson, Bill D (London) ha
scritto:
> Freddy,
> 
> In order to get this code to compile with my ancient compiler, I had
to
> change a bit of your code in login.c
> My compiler will only accept initialisation with constant values...
> 

Ok, fixed.

> I've rejigged the structure of the ctlib include files 
> (previously pretty much everything was in cspublic.h)
> - so the diff shows big differences, although really there is little
> changed.
> 
> There are mercifully few changes necessary to tds code (shows how
mature
> it is I guess)
> I'm pretty sure none of these should functionally affect odbc code...
> 
> Bill
> 

Committed!

ODBC works correctly :) ctlib not :(
- cancel test fails. It gets all rows instead of stopping... I don't
understand why and enabling logging just core cause tdsdump_log is not
reentrant...
- ct_cursor fails with "ct_cmd_props() CS_CUR_STATUS != CS_CURSTAT_NONE"
  Also it has a problem with memory, from log (attached):

  ==10866== 1 errors in context 1 of 1:
  ==10866== Invalid read of size 2
  ==10866==    at 0x1B90D4A3: ct_cmd_props (ct.c:2476)
  ==10866==    by 0x804935D: main (ct_cursor.c:256)
  ==10866==  Address 0x1BABAC80 is 64 bytes inside a block of size 72
free'd

It try to read freed memory

  ==10866==    at 0x1B905269: free (vg_replace_malloc.c:153)
  ==10866==    by 0x1B916048: tds_free_cursor (mem.c:677)
  ==10866==    by 0x1B918689: tds_process_cursor_tokens (token.c:3361)
  ==10866==    by 0x1B91C1CF: tds_process_result_tokens (token.c:750)
  ==10866==    by 0x1B910CA4: ct_results (ct.c:1132)
  ==10866==    by 0x8049245: main (ct_cursor.c:248)

cursor seems already freed here...

freddy77 
--------------------------------------------------------
 
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/ 
--------------------------------------------------------
 


More information about the FreeTDS mailing list