Changes between Initial Version and Version 22 of Ticket #15585


Ignore:
Timestamp:
Jul 7, 2017, 7:50:46 AM (5 years ago)
Author:
Jeroen Demeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15585

    • Property Authors changed from to Jeroen Demeyer
    • Property Cc Sébastien Labbé added
    • Property Dependencies changed from to #22462
    • Property Milestone changed from sage-6.1 to sage-7.6
    • Property Keywords random_fail added
  • Ticket #15585 – Description

    initial v22  
    1212    False
    1313}}}
    14 Apparently the code uses @parallel and there was already a race fixed in #14150.
     14
     15This is because a race condition in `@parallel`. This is a parallel generator which forks processes, each process handling one item of the generator. The output of each finished process is stored as pickle in a working directory and then `yield`ed by the main process.
     16
     17When the generator is closed (for example, the generator is used as argument to `all()` and a `False` condition is found), the following happens in a `finally` block:
     18
     191. The working directory is removed.
     20
     212. The remaining processes are killed.
     22
     23This is a race condition because it can happen that a subprocess finishes between these steps. Then that process wants to write its output in the deleted directory. The fix is obvious: first kill the processes, then delete the directory.