Stack trace during hang:

STACKTRACE - START

ThreadID: 140208457426688

File: "/usr/lib/python2.7/threading.py", line 524, in bootstrap
self.
bootstrap_inner()
File: "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File: "connectionkilltest.py", line 16, in run
for filename, lineno, name, line in traceback.extract_stack(stack):

ThreadID: 140208472311552

File: "/usr/lib/python2.7/threading.py", line 524, in bootstrap
self.
bootstrap_inner()
File: "/usr/lib/python2.7/threading.py", line 551, in bootstrap_inner
self.run()
File: "pywikibot/comms/threadedhttp.py", line 343, in run
item.data = self.http.request(item.args, *item.kwargs)
File: "pywikibot/comms/threadedhttp.py", line 219, in request
max_redirects, connection_type
File: "/usr/lib/python2.7/dist-packages/httplib2/
init.py", line 1444, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File: "/usr/lib/python2.7/dist-packages/httplib2/
init.py", line 1196, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File: "/usr/lib/python2.7/dist-packages/httplib2/
init__.py", line 1166, in _conn_request
response = conn.getresponse()
File: "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File: "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File: "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File: "/usr/lib/python2.7/socket.py", line 430, in readline
data = recv(1)
File: "/usr/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File: "/usr/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)

ThreadID: 140208510514944

File: "pwb.py", line 103, in
run_python_file(fn, args)
File: "pwb.py", line 49, in run_python_file
exec compile(source, filename, "exec") in main_mod.dict
File: "connectionkilltest.py", line 36, in
p.put_async('test edit')
File: "pywikibot/page.py", line 887, in put_async
async=True, callback=callback, kwargs)
File: "pywikibot/page.py", line 872, in put
async=async, callback=callback,
kwargs)
File: "pywikibot/page.py", line 782, in save
if not force and not self.botMayEdit():
File: "pywikibot/page.py", line 710, in botMayEdit
username = self.site.user()
File: "pywikibot/site.py", line 206, in user
if self.logged_in(True):
File: "pywikibot/site.py", line 842, in logged_in
if sysop and 'sysop' not in self.userinfo['groups']:
File: "pywikibot/site.py", line 910, in getuserinfo
uidata = uirequest.submit()
File: "pywikibot/data/api.py", line 284, in submit
body=paramstring)
File: "pywikibot/comms/http.py", line 118, in request
request.lock.acquire()
File: "/usr/lib/python2.7/threading.py", line 323, in acquire
self.__cond.wait()
File: "/usr/lib/python2.7/threading.py", line 243, in wait
waiter.acquire()

STACKTRACE - END

So: probably not a deadlock, just the ssl library hanging.


[bugs:#1657] core hangs on killed http(s) connection

Status: open
Created: Thu Aug 22, 2013 03:14 PM UTC by Merlijn S. van Deen
Last Updated: Thu Aug 22, 2013 03:14 PM UTC
Owner: nobody

Steps to reproduce:

p = pywikibot.Page(pywikibot.getSite('nl', 'wikipedia'), 'Wikipedia')
p.get()

now kill the connection, e.g. using tcpview in windows

p = pywikibot.Page(pywikibot.getSite('nl', 'wikipedia'), 'Wikipedia')
p.get()

hangs

Expected result:
pywikibot reconnects and executes the .get()

Actual result:
complete hang (deadlock?)


Sent from sourceforge.net because Pywikipedia-bugs@lists.wikimedia.org is subscribed to https://sourceforge.net/p/pywikipediabot/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pywikipediabot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.