pulp-platform / snitch_cluster

An energy-efficient RISC-V floating-point compute cluster.
https://pulp-platform.github.io/snitch_cluster/
Apache License 2.0
51 stars 51 forks source link

util/sim: Robustify subprocess termination #140

Closed colluca closed 5 months ago

colluca commented 5 months ago

Addresses a possible race condition for which, from the moment living subprocesses are listed and killed, new subprocesses could be spawned, which would never be killed.

This solution provides a remedy so long as this race condition doesn't occur 10 times in a row. Note that it does not fundamentally solve the problem, but even if subprocesses might still be leaked, the leakage rate should be acceptable.