Missing python import: socket in trac.web.api
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
trac (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: trac
My web server hangs up every few days since I upgraded it to lucid. One error I see in the logs is this trac bug.
Line 464 of /usr/lib/
except (IOError, socket.error), e:
The file does not import the socket module, so I get a traceback:
2010-09-05 02:13:53,373 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/usr/lib/
dispatcher.
File "/usr/lib/
req.
File "/usr/lib/
self.
File "/usr/lib/
except (IOError, socket.error), e:
NameError: global name 'socket' is not defined
A simple "import socket" near the top of the file should fix this.
I have yet to see whether this fix stops the hangups. The hangups seem to be related to trac fcgi processes spinning forever on a lock. Sometimes I catch them merely using up all CPU. I can only guess about the times when I can no longer get into the server; the server still runs to some extent and reportedly uses all available CPU time when that happens.
Unfortunately, fixing this does not cure the regular server hangs.