Opened 12 years ago

Closed 12 years ago

Last modified 7 years ago

#8785 closed defect (fixed)

avoid subtle interaction between importing multiprocessing and twisted

Reported by: William Stein Owned by: Jason Grout
Priority: major Milestone: sage-4.4.1
Component: misc Keywords:
Cc: Merged in: sage-4.4.1.alpha0
Authors: William Stein Reviewers: Mariah Lennox
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by William Stein)

It turns out that on some platforms, importing multiprocessing, then twisted, leads to an "int object is not callable" TypeError?. This breaks devel/sage/sage/all.py's quit_sage function, causing a big traceback at exit. This could also cause great confusion for people writing a program that uses @parallel('multiprocessing') followed by anything involving twisted.

A simple fix is to import the relevant part of twisted before using multiprocessing in @parallel. The attached patch does this.

NOTE: The system that exhibits this is in a corporate setting, and no devs have systems where this can be replicated at present, unfortunately. So please do NOT revert this just because you don't see the problem on your laptop!

Attachments (1)

trac_8785.patch (746 bytes) - added by William Stein 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by William Stein

Description: modified (diff)

Changed 12 years ago by William Stein

Attachment: trac_8785.patch added

comment:2 Changed 12 years ago by William Stein

Status: newneeds_review

comment:3 Changed 12 years ago by Mariah Lennox

Status: needs_reviewpositive_review

comment:4 Changed 12 years ago by Mariah Lennox

I tried it and it works!

comment:5 Changed 12 years ago by William Stein

Merged in: 4.4.1.alpha0
Resolution: fixed
Status: positive_reviewclosed

comment:6 Changed 12 years ago by Minh Van Nguyen

Authors: William Stein
Reviewers: Mariah Lennox

comment:7 Changed 12 years ago by Minh Van Nguyen

Merged in: 4.4.1.alpha0sage-4.4.1.alpha0

comment:8 Changed 7 years ago by Vincent Delecroix

Would be more informative to write explicitely on which hardware/OS it failed. "corporate settings" is more than vague. Was there any upstream report? This problem might have been solved since then!

Note: See TracTickets for help on using tickets.