Page MenuHomePhabricator

makecat uses http on import, causing deadlock
Closed, ResolvedPublic

Description

makecat has its main loop at the module level, rather than in a function main() like other scripts.

This causes a deadlock in handleArgs while trying to fetch the live API version.


Version: core-(2.0)
Severity: major

Details

Reference
bz69781
Related Gerrit Patches:

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:28 AM
bzimport set Reference to bz69781.
bzimport added a subscriber: Unknown Object (????).
jayvdb created this task.Aug 20 2014, 11:12 AM

Change 155231 had a related patch set uploaded by John Vandenberg:
Add main() to makecat

https://gerrit.wikimedia.org/r/155231

Gallaecio assigned this task to jayvdb.Dec 19 2014, 6:59 PM
Gallaecio set Security to None.
Gallaecio removed a subscriber: Unknown Object (????).
Mpaa added a subscriber: Mpaa.
Mineo added a subscriber: Mineo.Jan 30 2015, 8:45 AM

Change 216407 had a related patch set uploaded (by John Vandenberg):
Deadlock problem fixed by using requests

https://gerrit.wikimedia.org/r/216407

The makecat problem has indirectly been fixed by T98439. The problem still exists on the 2.0 branch, and T87742 tracks the problem occurring in calling code.

jayvdb closed this task as Resolved.Jun 6 2015, 10:30 AM
XZise added a subscriber: XZise.Jun 6 2015, 10:33 AM

How does having it not in main() cause a deadlock?

The problem was the sequence of actions used to set up the threads and such. @valhallasw had a very nice graph of the import sequence which shows how the deadlock occurs, which I stumble across occasionally but can never find when I want it. :/

Putting code in main() means all imports complete before main starts.

Change 216407 merged by jenkins-bot:
Deadlock problem fixed by using requests

https://gerrit.wikimedia.org/r/216407