Skip to Content.
Sympa Menu

freetds - Re: [freetds] ct_cancel hangs

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Christophe Combelles <ccomb AT free.fr>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ct_cancel hangs
  • Date: Mon, 23 Jul 2007 18:08:12 +0200

James K. Lowden a écrit :
Christophe Combelles wrote:
I'm posting here my own monolog of a problem I have with
accessing a windows based sybase ASA 7.0 from python/freetds on linux.

Christophe,
Post a TDSDUMP log of the activity here. That will allow us to isolate
the "hang" at the TDS level, and might provide enough information about
the API calling sequence to decide if Python is doing the right thing.
I changed (i.e. fixed) cancel processing in the current snapshot some
months back, but ct-lib cancel processing isn't something I know much
about. We'll have to compare your log to the unit test (if extant) and
the docs to see what should be done.

I really want to provide most information to investigate this, but I must be extremely careful because the database is full of personal medical informations, and I'm not authorized to disclose any of them, even accidentally, along with a logfile. Another thing is the full logfile size is 2,5Mb and I'm sure nobody will appreciate to receive it :)

Actually the hang occurs for requests that should return large results.
I'm doing just one cursor.fetchone(), then at the moment I run cursor.close() the logfile suddenly grows a lot (2,5MB) (it seems to contain the full result), then the close() operation never returns.

Here is the part of the logfile that contains the CANCEL_ALL operation.
If needed, please point me to the correct part of the logfile to provide so that the problem could be found.


(...)
ct.c:1858:_ct_get_client_type(type 39, user 1516, size 10)
cs.c:351:cs_convert()
ct.c:1971:_ct_get_server_type(0)
ct.c:1971:_ct_get_server_type(0)
cs.c:358:cs_convert() srctype = 47 (7) desttype = 47 (10)
cs.c:383:cs_convert() srctype = desttype
cs.c:419:cs_convert() desttype = character
ct.c:1677:_ct_bind_data(): column_type: 39 column_len: 1
ct.c:1971:_ct_get_server_type(0)
ct.c:1858:_ct_get_client_type(type 39, user 1515, size 2)
cs.c:351:cs_convert()
ct.c:1971:_ct_get_server_type(0)
ct.c:1971:_ct_get_server_type(0)
cs.c:358:cs_convert() srctype = 47 (1) desttype = 47 (2)
cs.c:383:cs_convert() srctype = desttype
cs.c:419:cs_convert() desttype = character
ct.c:2049:ct_cancel()
ct.c:2216:CS_CANCEL_ALL with connection
ct.c:2218:ct_cancel() cancelling a command for a connection
ct.c:2228:ct_cancel() command state SENT
ct.c:2229:ct_cancel() sending a cancel
net.c:673:Sending packet
0000 06 01 00 08 00 00 00 00- |........|

util.c:119:Changing query state from PENDING to READING
token.c:526:processing result tokens. marker is d1(ROW)
token.c:1863:tds_get_data: column 0, type 56, varint size 0
token.c:1920:processing row. column size is 4
token.c:1863:tds_get_data: column 1, type 47, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 2, type 56, varint size 0
token.c:1920:processing row. column size is 4
token.c:1863:tds_get_data: column 3, type 47, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 4, type 38, varint size 1
token.c:1920:processing row. column size is 4
token.c:1863:tds_get_data: column 5, type 39, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 6, type 38, varint size 1
...

(about 45000 lines)

...
token.c:1863:tds_get_data: column 9, type 111, varint size 1
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 10, type 39, varint size 1
token.c:1920:processing row. column size is 3
token.c:1863:tds_get_data: column 11, type 39, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 12, type 111, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 13, type 39, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 14, type 39, varint size 1
token.c:1920:processing row. column size is -1
token.c:526:processing result tokens. marker is d1(ROW)
token.c:1863:tds_get_data: column 0, type 56, varint size 0
token.c:1920:processing row. column size is 4
token.c:1863:tds_get_data: column 1, type 47, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 2, type 56, varint size 0
token.c:1920:processing row. column size is 4
token.c:1863:tds_get_data: column 3, type 47, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 4, type 38, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 5, type 39, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 6, type 38, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 7, type 39, varint size 1
token.c:1920:processing row. column size is -1
token.c:1863:tds_get_data: column 8, type 47, varint size 1
token.c:1920:processing row. column size is 16
token.c:1863:tds_get_data: column 9, type 111, varint size 1
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 10, type 39, varint size 1
token.c:1920:processing row. column size is 3
token.c:1863:tds_get_data: column 11, type 39, varint size 1
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 12, type 111, varint size 1
net.c:446:Received header
0000 04 01 00 11 00 00 00 00- |........|

net.c:542:Received packet
0000 fd 30 00 02 00 d1 04 00-00 |.0...... .|

token.c:1920:processing row. column size is 253





Archive powered by MHonArc 2.6.24.

Top of Page