diff options
author | Valentin David <valentin.david@codethink.co.uk> | 2019-01-22 14:03:21 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-01-28 21:30:26 +0000 |
commit | a1ab48daf7b572bf857b115898db2d947552a155 (patch) | |
tree | d03ba6acc95cb351829db14f11b1e233de43fc22 /tests | |
parent | 80b36d0c5cf89eb9130642c255d18cbdf296cef0 (diff) | |
download | buildstream-valentindavid/crash_in_scheduler_857.tar.gz |
Fix crash when spawned job completes very fastvalentindavid/crash_in_scheduler_857
Job can complete before we return from `Job.span()` to
`Scheduler._spawn_job()`, so that `_active_jobs` would not yet contain
the job.
This would print a stack on the console and try to run a second time
the job which can have unexpected effects.
In order to reproduce the issue, in
`buildstream/_scheduler/jobs/job.py`, in `Job.spawn`,
add a call to `time.sleep()` right before call to
`asyncio.get_child_watcher()`.
This fixes issue #857.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions