eth-cscs / DLA-Future

DLA-Future
https://eth-cscs.github.io/DLA-Future/master/
BSD 3-Clause "New" or "Revised" License
64 stars 14 forks source link

Fix data race in `test_pipeline` #1104

Closed msimberg closed 7 months ago

msimberg commented 8 months ago

Reading the size of the accesses vector races with pushing items into the vector. The pushing is done under a lock, but reading the size was not done under a lock, and doing so is considered a data race (there are no guarantees on what the size will return while the vector is being modified). This only applies to the case when subpipelines are accessed in new tasks, not inline, but I've added the lock for both cases to keep things simple. See https://gitlab.com/cscs-ci/ci-testing/webhook-ci/mirrors/4700071344751697/7514005670787789/-/jobs/6223967358 (view the full log) for the report by thread sanitizer.

msimberg commented 8 months ago

cscs-ci run

msimberg commented 7 months ago

The CI failure was jfrog being unavailable: https://gitlab.com/cscs-ci/ci-testing/webhook-ci/mirrors/4700071344751697/7514005670787789/-/jobs/6233220389#L1345. I've restarted the failed job.