Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#8785 closed defect (fixed)

avoid subtle interaction between importing multiprocessing and twisted

Reported by: was Owned by: jason
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 was)

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/'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 was 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by was

  • Description modified (diff)

Changed 11 years ago by was

comment:2 Changed 11 years ago by was

  • Status changed from new to needs_review

comment:3 Changed 11 years ago by mariah

  • Status changed from needs_review to positive_review

comment:4 Changed 11 years ago by mariah

I tried it and it works!

comment:5 Changed 11 years ago by was

  • Merged in set to 4.4.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:6 Changed 11 years ago by mvngu

  • Authors set to William Stein
  • Reviewers set to Mariah Lennox

comment:7 Changed 11 years ago by mvngu

  • Merged in changed from 4.4.1.alpha0 to sage-4.4.1.alpha0

comment:8 Changed 5 years ago by vdelecroix

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.