Skip to Content.
Sympa Menu

freetds - Re: More on Crash in Python driver

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: More on Crash in Python driver
  • Date: Tue, 24 Sep 2002 16:41:13 -0400


Errrm...how is python calling ct_diag(), when it seems that FreeTDS doesn't
provide a ct_diag() implementation (not even a stub)?

bash-2.05$ grep ct_diag include/* src/ctlib/*
bash-2.05$

-----Original Message-----
From: bounce-freetds-145195 AT franklin.oit.unc.edu
[mailto:bounce-freetds-145195 AT franklin.oit.unc.edu]
Sent: Tuesday, September 24, 2002 4:20 PM
To: TDS Development Group
Subject: [freetds] Re: More on Crash in Python driver


Here is some more fodder. I turned on tracing in the driver code:

cs_ctx_alloc(CS_VERSION_100, &ctx) -> CS_SUCCEED, ctx0
cs_diag(ctx0, CS_INIT, CS_UNUSED, CS_UNUSED, NULL) -> CS_SUCCEED
ct_init(ctx0, CS_VERSION_100) -> CS_SUCCEED
ct_config(ctx0, CS_SET, CS_NETIO, 29, CS_UNUSED, NULL) -> CS_SUCCEED
ct_con_alloc(ctx0, &conn) -> CS_SUCCEED, conn0
ct_diag(conn0, CS_INIT, CS_UNUSED, CS_UNUSED, NULL) -> CS_SUCCEED
ct_con_props(conn0, CS_SET, CS_USERNAME, "XXX", CS_NULLTERM, NULL) ->
CS_SUCCEED
ct_con_props(conn0, CS_SET, CS_PASSWORD, "YYY", CS_NULLTERM, NULL) ->
CS_SUCCEED
ct_connect(conn0, "mydb", CS_NULLTERM) -> CS_FAIL
ct_diag(conn0, CS_STATUS, CS_SERVERMSG_TYPE, CS_UNUSED, &num) -> CS_SUCCEED,
0
ct_diag(conn0, CS_STATUS, CS_CLIENTMSG_TYPE, CS_UNUSED, &num) -> CS_SUCCEED,
0
ct_diag(conn0, CS_CLEAR, CS_ALLMSG_TYPE, CS_UNUSED, NULL) -> CS_SUCCEED
ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) ->
CS_SUCCEED, 0
ct_diag(conn0, CS_STATUS, CS_SERVERMSG_TYPE, CS_UNUSED, &num) -> CS_SUCCEED,
0
ct_diag(conn0, CS_STATUS, CS_CLIENTMSG_TYPE, CS_UNUSED, &num) -> CS_SUCCEED,
0
ct_diag(conn0, CS_CLEAR, CS_ALLMSG_TYPE, CS_UNUSED, NULL) -> CS_SUCCEED
ct_con_drop(conn0) -> CS_SUCCEED
cs_ctx_drop(ctx0) -> CS_SUCCEED

And here is the log from FreeTDS tracing:

2002-09-24 16:13:58 IP address pointer is NULL
2002-09-24 16:13:58 leaving ct_connect() returning 0
2002-09-24 16:13:58 inside ct_con_props() action = CS_GET property = 26
2002-09-24 16:13:58 inside ct_con_drop()


I suspect the big problem is that "IP address pointer is NULL". I have a
working version using mxODBC/unixODBC, and it passes the correct IP
address at the start.

Paul

On Tue, 2002-09-24 at 15:38, Paul Rensing wrote:
> FreeTDS People,
>
> I have been trying (but only a little) to get the Sybase Python driver
> working. It compiles just fine, but crashes with a SegFault. I put it in
> the debugger and the backtrace is:
>
>
> #0 0x40135e75 in tds_send_cancel () from /usr/lib/libct.so.0
> #1 0x40124ab9 in ct_cancel () from /usr/lib/libct.so.0
> #2 0x40101503 in CS_CONNECTION_ct_cancel (self=0x816d788,
> args=0x8166cc4)
> at conn.c:301
> #3 0x080cb709 in PyCFunction_Call ()
>
> I remember that there was a thread in this group about problems with
> ct_cancel(), but I did not keep the old messages.
>
> Before I dig further, any clues? I have the 0.60 release installed.
>
> Thanks,
>
> Paul Rensing
>
>
> ---
> You are currently subscribed to freetds as: [paul.rensing AT att.net]
> To unsubscribe, forward this message to
$subst('Email.Unsub')
>


---
You are currently subscribed to freetds as: [Nicholas_Castellano AT acml.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')


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 for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page