brian d
unread,Aug 24, 2011, 5:25:46 PM8/24/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pymssql
Hello,
If this is not the proper avenue for reporting what may be a bug, or
if this the result of an illogical use of pymssql on my part, please
let me know. The following code is the smallest snippet that
illustrates the problem.
import threading
import datetime
import time
import pymssql
class ThreadClass(threading.Thread):
def run(self):
now = datetime.datetime.now()
print "%s connecting at time: %s" % (self.getName(), now)
conn = pymssql.connect(host="10.255.255.1", database='blah',
user="blah", password="blah")
for i in range(2):
t = ThreadClass()
t.start()
time.sleep(2)
The expected behavior would be to receive two tracebacks, instead of
one traceback and a segfault as shown below. This is happening with
pymssql 1.0.2. I tried this in each of the 4 environments below, with
the same result in each.
python 2.7.1 (Ubuntu 11.04 64 bit)
python 2.6.5 (Ubuntu 10.04 64 bit)
python 2.6.4 (Gentoo 64 bit)
python 2.6.6 (Gentoo 32 bit)
=========OUTPUT BEGIN===========
Thread-1 connecting at time: 2011-08-24 15:57:13.239528
Thread-2 connecting at time: 2011-08-24 15:57:15.242436
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 525, in
__bootstrap_inner
self.run()
File "pymssql_test.py", line 13, in run
user="blah", password="blah")
File "/usr/lib64/python2.6/site-packages/pymssql.py", line 607, in
connect
raise OperationalError, e[0]
OperationalError: DB-Lib error message 20009, severity 9:
Server is unavailable or does not exist.
Segmentation fault (core dumped)
=========OUTPUT END===========
If you would like any other information please let me know, I'd be
happy to provide it.
Thanks,
Brian Davis