Bugs item #1160437, was opened at 2005-03-10 07:27
Message generated for change (Comment added) made by jiangwen365
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1160437&group_id=78018
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: 江文 (jiangwen365)
Assigned to: Nobody/Anonymous (nobody)
Summary: Connect different DSNs servial times and Python would crash.
Initial Comment:
Hi,
When I run the script listed below, Python VM would
crash, and usually within 20 seconds. "HScode_MDB" is
the ODBC DSN pointing to an Access MDB file, "HScode"
is the ODBC DSN pointing to a PostgreSQL Server. Dunno
it's a bug of ODBC module or the ODBC drivers. But
somehow it seems more like the ODBC module's bug.
import dbi,odbc
while True:
print 'connecting MDB'
a=odbc.odbc("HScode_MDB") # a DSN
print 'getting MDB cursor'
ac=a.cursor()
ac.execute('SELECT * FROM [latest_parts]') # some
operations
ac.fetchall()
ac.close()
a.close()
print 'connecting Postgres'
b=odbc.odbc("HScode") # another DSN
print 'getting postgres cursor'
bc=b.cursor()
bc.execute('select * from latest_parts limit 1') #
some operations
#print bc.fetchall()
bc.close()
b.close()
----------------------------------------------------------------------
>Comment By: 江文 (jiangwen365)
Date: 2005-03-23 07:42
Message:
Logged In: YES
user_id=1147025
Mhanmond,
Sorry, at last I'm not able to find a server for you, as
I'm no longer in university and my PC is only using
telephone line to connect to the internet.
But if your PC has enough room for installing a PostgreSQL
win32 server(I mean if you are willing to:-)), I would be
glad to give you the URL for download, it's about 17.5M, and
comes with both ODBC Driver & GUI data browser:
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=win32%2Fpostgresql-8.0.1.zip
Below is the script which leads to crash: (But sometimes it
crashes a lot at first and somehow becomes pretty stable
later, I can't explain why, so I'm just hoping you can
luckily and successfully crash your python when running tests:))
import dbi,odbc
while True:
print 'connecting Postgres'
b=odbc.odbc("HScode") # another DSN
print 'getting postgres cursor'
bc=b.cursor()
bc.execute('select * from latest_parts limit 1') #do some
operations
#print bc.fetchall()
bc.close()
b.close()
It would be great if you can find and fix the problem,
after all, odbc is such a important module for any
programming languages.
Thanks,
Henry
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2005-03-16 23:01
Message:
Logged In: YES
user_id=14198
I don't have a postgres DB server available to me, so am
unable to reproduce this crash. If you can make a
connection available to me and give me a complete script
that demonstrates the error against the connection, I'd be
happy to help diagnose it.
----------------------------------------------------------------------
Comment By: 江文 (jiangwen365)
Date: 2005-03-10 08:58
Message:
Logged In: YES
user_id=1147025
Another strangeness found: Increase the number after LIMIT,
say 7, and Python could go further, maybe 60 loops; increase
it to 100, and Python could almost pass the loop block
successfully!
Maybe it's still Python's bug? I'm confused.
'select * from latest_parts limit 100'
----------------------------------------------------------------------
Comment By: 江文 (jiangwen365)
Date: 2005-03-10 08:19
Message:
Logged In: YES
user_id=1147025
Oh, when commenting out the MDB block and leaving the
Postgres block, Python would crash much sooner. Exactly the
fifith loop, aftter printing out "connecting Postgres" on my
machine!
But it seems to work pretty smoothly with the MDB block only.
So it's more likly a Postgres ODBC driver bug.
I'v submitted this to the postgres odbc developer group:
http://gborg.postgresql.org/project/psqlodbc/bugs/bugupdate.php?1207
I don't know if it would be helpful if somebody here can
provide some debug info to the postgres ODBC team?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1160437&group_id=78018
|