Subject: redo-ifchange hangs when called with many arguments

From: goredo <[email-masked]>
Date: Sat, 16 Oct 2021 15:58:54 +0000 (UTC)

Hi,

One of my projects resulted in an inadvertent stress test of how many arguments redo-ifchange can handle.

There was a situation where it was called with 500 arguments which resulted in a strange lockup. redo was started with `-j 5` and REDO_LOG=1. The redo-ifchange process was just sleeping without making progress, like it was waiting for pipe input or something similar. It was not waiting for disk, nor consuming any CPU time, nor launching processes. I killed it with SIGTERM after about 2 minutes. So, it seems it was actively waiting for some file descriptors and terminated normally when asked to.

Limiting the call to 50 arguments resolved the issue. I haven't iteratively narrowed it down, just cut it to 50 directly.

I also noticed before, that killing redo with C-c does not always terminate the process it spawned (through a .do file). So, maybe these two are related and there is some intricate issue with controlling sub-processes, like redo not properly waiting for its sub-processes.

–Michael