need to be more aggressive about transport thread safety

Bug #390972 reported by Michael Hudson-Doyle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
loggerhead
Fix Released
Critical
Michael Hudson-Doyle

Bug Description

If you run serve-branches http://whatever and make simultaneous or very nearly so requests to loggerhead, things explode in exciting ways. This is because http transport share connections across clone() calls, so although each thread serving a request gets its own clone()d transport they share a connection and using this connection from more than one thread at once doesn't work at all well (a call may get bytes that are the response to another thread's call, for example).

Probably what we should do is have a threading.local object that stores a transport for each thread (it's what we do on Launchpad and it works well there).

Related branches

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Fixed in lp:loggerhead r373, no?

Changed in loggerhead:
status: Triaged → Fix Committed
Martin Albisetti (beuno)
Changed in loggerhead:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.