Describe the bug
When a act run is cancelled (Ctrl+C) or a task failure causes early exit, any sail_riscv_sim processes already launched by worker threads are not terminated. They become orphaned OS processes and continue consuming CPU until the OS is rebooted or they are killed manually. If the sail processes are themselves hung, they run indefinitely and saturate all cores.
To Reproduce
Steps to reproduce the behavior:
For this to have real effect - test should hang and run indefinitely. Canceling this tests with CTRL + C reproduces this behavior.
Good target is removing F_SUPPORTED from rvtest_config.h and running F tests then canceling during hang.
Additional context
KeyboardInterrupt is delivered only to the main thread. The worker threads are unaffected - they continue blocking on their subprocess.run() call. When the ThreadPoolExecutor context manager exits, it calls executor.shutdown(wait=False, cancel_futures=True), which cancels not-yet-started futures but cannot stop threads already running.
Describe the bug
When a
actrun is cancelled (Ctrl+C) or a task failure causes early exit, anysail_riscv_simprocesses already launched by worker threads are not terminated. They become orphaned OS processes and continue consuming CPU until the OS is rebooted or they are killed manually. If the sail processes are themselves hung, they run indefinitely and saturate all cores.To Reproduce
Steps to reproduce the behavior:
For this to have real effect - test should hang and run indefinitely. Canceling this tests with CTRL + C reproduces this behavior.
Good target is removing F_SUPPORTED from rvtest_config.h and running F tests then canceling during hang.
Additional context
KeyboardInterruptis delivered only to the main thread. The worker threads are unaffected - they continue blocking on theirsubprocess.run()call. When theThreadPoolExecutorcontext manager exits, it callsexecutor.shutdown(wait=False, cancel_futures=True), which cancels not-yet-started futures but cannot stop threads already running.