Opened 9 years ago

Closed 9 years ago

#14242 closed defect (fixed)

Race condition in gap_reset_workspace()

Reported by: jdemeyer Owned by: was
Priority: blocker Milestone: sage-5.9
Component: interfaces Keywords:
Cc: vbraun Merged in: sage-5.9.beta0
Authors: Jeroen Demeyer Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Consider this script gap_race.sage:

from multiprocessing import Process
import time

def rungap():

P = [Process(target=rungap) for i in range(4)]
for p in P:

When executing with ./sage --nodotsage gaprace.sage, this should run without producing errors. But it doesn't, due to race conditions in gap_reset_workspace().

Attachments (1)

14242_gap_workspace_race.patch (4.6 KB) - added by jdemeyer 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Cc vbraun added
  • Status changed from new to needs_review

comment:2 Changed 9 years ago by vbraun

Looks good. But on Windows, os.rename() will raise an OSError if destination exists. Not sure if that applies to Cygwin, but better safe than sorry?

Changed 9 years ago by jdemeyer

comment:3 Changed 9 years ago by jdemeyer


comment:4 Changed 9 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

Looks good to me

comment:5 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.9.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.