execute_process not reading stdout properly on macOS
We have noticed this in issue randomly happen in our build pipelines when running ctest
on macOS 10.15 and 11.0.1. It occurs when running many parallel jobs using ctest
that executes a cmake script that calls execute_process
. According to the docs execute_process
writes stdout
to the specified OUTPUT_FILE
. The bytes being read from the process's stdout
stream is some how corrupted and written to disk. It works fine on Windows and Ubuntu.
Attached is a test project that can be used to reproduce the problem:
https://www.dropbox.com/s/89u1uhn4m8fd5h3/copyfile.zip?dl=0
cmake .
cmake --build . --config Release
ctest -C Release . --parallel 6 --repeat-until-fail 20000 -V
The project is a copyfile.c source code that just copies stdin to stdout using a randomized read()
buffer size for each read.
Edited by Nathan Moinvaziri