reclient
reclient copied to clipboard
bug: shared directory output (e.g. clang crashreports) fails with racing
https://github.com/bazelbuild/reclient/commit/35813b877b5fbf0fe69bb558c15ed239a816c226 introduced a directory type output to clang actions, which is shared among all actions of this type (with a -fcrash-diagnostics-dir
option on). However, in racing
strategy, this results in the following error:
reclient[b1872204-b036-4d9d-85ca-575109a989fd]: LocalErrorResultStatus: b1872204-b036-4d9d-85ca-575109a989fd: cannot move directory ../../tools/clang/crashreports from /projects/brave-browser-3/src/out/android_Release_x86/.reproxy_tmp/racing/b1872204-b036-4d9d-85ca-575109a989fd/src/out/android_Release_x86 to /projects/brave-browser-3/src/out/android_Release_x86: rename /projects/brave-browser-3/src/out/android_Release_x86/.reproxy_tmp/racing/b1872204-b036-4d9d-85ca-575109a989fd/src/tools/clang/crashreports /projects/brave-browser-3/src/tools/clang/crashreports: file exists
This is because here we're trying to use os.Rename
to move the output directory from the temporary racing
directory, and the directory already exists, because it was populated by a different action.
I'm not sure what is the intended behavior of the shared output directory -- as I understand the current code, any output gets removed before it is downloaded, so it looks to me like the behavior is badly defined when multiple actions share an output directory.
If the intended behavior was to aggregate outputs from multiple actions in the same ../../tools/clang/crashreports
directory, then this will need to be fixed both in the SDK and Reclient, IIUC.