From: Christophe C. <cc...@fr...> - 2007-07-17 12:10:53
|
Hello, I'm new to this list, and I'm currently trying to access an old windows Sybase ASA 7.0 from python/linux. I could make it work with freedts, but it hangs on some operation: >>> db=Sybase.connect(...) >>> c=db.cursor() >>> c.execute('select * from rue') >>> c.fetchone() (...) >>> c.close() here it hangs, nothing happens, with 0% CPU. It only exits if I stop the database server: Exception Sybase.DatabaseError: <Sybase.DatabaseError instance at 0xb7cf47cc> in <bound method _FetchLazy.__del__ of <Sybase._FetchLazy instance at 0xb7cf4e4c>> ignored What is the recommended way to investigate this? Did anyone have the same problem or is it trivial? thanks, Christophe |
From: Christophe C. <cc...@fr...> - 2007-07-17 13:51:22
|
Christophe Combelles a écrit : > Hello, > > I'm new to this list, and I'm currently trying to access an old windows Sybase > ASA 7.0 from python/linux. I could make it work with freedts, but it hangs on > some operation: > > >>> db=Sybase.connect(...) > >>> c=db.cursor() > >>> c.execute('select * from rue') > >>> c.fetchone() > (...) > >>> c.close() > > here it hangs, nothing happens, with 0% CPU. > It only exits if I stop the database server: > > Exception Sybase.DatabaseError: <Sybase.DatabaseError instance at 0xb7cf47cc> in > <bound method _FetchLazy.__del__ of <Sybase._FetchLazy instance at 0xb7cf4e4c>> > ignored > > What is the recommended way to investigate this? > Did anyone have the same problem or is it trivial? > > thanks, > Christophe more info: I'm using python 2.4.4 with sybase-python 0.38 compiled with -D HAVE_FREETDS -U WANT_BULKCOPY, and freetds/libct4 0.64rc2. it also hangs if I call again c.execute(...) after c.fetchone() The last thing found in the freetds logfile (debug level 99) is: ------------------------------------------------------- (...) 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 ------------------------------------------------------- If I hit Ctrl-C on the python terminal, the freetds logfile tells: net.c:336:socket read interrupted (as many times I hit Ctrl-C) Is there a clue to say if this is an issue in freetds or python-sybase ? |
From: Christophe C. <cc...@fr...> - 2007-07-21 00:54:00
|
Christophe Combelles a écrit : > Christophe Combelles a écrit : >> Hello, >> >> I'm new to this list, and I'm currently trying to access an old windows Sybase >> ASA 7.0 from python/linux. I could make it work with freedts, but it hangs on >> some operation: >> >> >>> db=Sybase.connect(...) >> >>> c=db.cursor() >> >>> c.execute('select * from rue') >> >>> c.fetchone() >> (...) >> >>> c.close() >> >> here it hangs, nothing happens, with 0% CPU. >> It only exits if I stop the database server: >> >> Exception Sybase.DatabaseError: <Sybase.DatabaseError instance at 0xb7cf47cc> in >> <bound method _FetchLazy.__del__ of <Sybase._FetchLazy instance at 0xb7cf4e4c>> >> ignored >> >> What is the recommended way to investigate this? >> Did anyone have the same problem or is it trivial? >> >> thanks, >> Christophe > > more info: > I'm using python 2.4.4 with sybase-python 0.38 compiled with -D HAVE_FREETDS -U > WANT_BULKCOPY, and freetds/libct4 0.64rc2. > > it also hangs if I call again c.execute(...) after c.fetchone() > > The last thing found in the freetds logfile (debug level 99) is: > ------------------------------------------------------- > (...) > 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 > > ------------------------------------------------------- > > If I hit Ctrl-C on the python terminal, the freetds logfile tells: > > net.c:336:socket read interrupted > (as many times I hit Ctrl-C) > > > Is there a clue to say if this is an issue in freetds or python-sybase ? > > ------------------------------------------------------------------------- I have some news: In fact, the ct_cancel command hangs in _FetchLazy.__del__ of Sybase.py, when I call cursor.close() after several fetchone() But this is a random effect, sometimes it hangs, sometimes not. It might look like a threading issue. I don't know what the real problem is, but I've tried to replace CS_CANCEL_ALL with CS_CANCEL_CURRENT or CS_CANCEL_ATTN, and it don't hangs anymore. The difference between the different types of cancel is explained here: http://manuals.sybase.com/onlinebooks/group-cnarc/cng1000e/prgguide/@Generic__BookTextView/5783;pt=6133 But I'm not sure what is the correct one in which circumstances. regards, Christophe |
From: Harri P. <har...@tr...> - 2007-08-07 09:32:24
|
T24gVHVlc2RheSAxNyBKdWx5IDIwMDcgMTU6NTA6MDAgQ2hyaXN0b3BoZSBDb21iZWxsZXMgd3Jv dGU6Cj4gQ2hyaXN0b3BoZSBDb21iZWxsZXMgYSDDqWNyaXQgOgo+ID4gSGVsbG8sCj4gPgo+ID4g SSdtIG5ldyB0byB0aGlzIGxpc3QsIGFuZCBJJ20gY3VycmVudGx5IHRyeWluZyB0byBhY2Nlc3Mg YW4gb2xkCj4gPiB3aW5kb3dzIFN5YmFzZSBBU0EgNy4wIGZyb20gcHl0aG9uL2xpbnV4LiBJIGNv dWxkIG1ha2UgaXQgd29yawo+ID4gd2l0aCBmcmVlZHRzLCBidXQgaXQgaGFuZ3Mgb24gLi4uCj4g PgoKSGF2ZSB5b3UgdmVyaWZpZWQgdGhlICJ0ZHMgdmVyc2lvbiIgaW4gLmZyZWV0ZHMuY29uZiBp cyBjb3JyZWN0IGZvciAKdGhhdCBvbGQgc3liYXNlPwoKSnVzdCBhIHRob3VnaHQsCgpIYXJyaQoK ClByaXZpbGVnZWQgb3IgY29uZmlkZW50aWFsIGluZm9ybWF0aW9uIG1heSBiZSBjb250YWluZWQg aW4gdGhpcyBt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uesday 17 July 2007 15:50:00 Christophe Combelles wrote: >> Christophe Combelles a écrit : >>> Hello, >>> >>> I'm new to this list, and I'm currently trying to access an old >>> windows Sybase ASA 7.0 from python/linux. I could make it work >>> with freedts, but it hangs on ... >>> > > Have you verified the "tds version" in .freetds.conf is correct for > that old sybase? yes I did, and I have tried manny settings. tds version must be 5.0 for this base Christophe > > Just a thought, > > Harri > > > Privileged or confidential information may be contained in this message. If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses. Statements in this message or attachments that do not relate to the business of Wall Street Systems are neither given nor endorsed by the company or its Directors. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Python-sybase-misc mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-sybase-misc |