diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 07:25:31 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 07:25:31 +0000 |
commit | 904b3e949a93a8953db41e41b256a5b27debeed4 (patch) | |
tree | b0522edde1d3c5356c95eb1ee2eae3e87befa1f3 /compiler_wrapper/libc_exec.go | |
parent | 4e4201457e5f51a132101c611c79ccff9f713c8b (diff) | |
parent | 882a18888febb9cb0b9d6c6069498cbc4aa30f88 (diff) | |
download | toolchain-utils-904b3e949a93a8953db41e41b256a5b27debeed4.tar.gz |
Snap for 8564071 from 882a18888febb9cb0b9d6c6069498cbc4aa30f88 to mainline-art-releaseaml_art_331813100aml_art_331813010aml_art_331711080aml_art_331612010aml_art_331413030aml_art_331314010aml_art_331113000aml_art_331012050android13-mainline-art-release
Change-Id: I173027e1513f8b33f7aec083bf3757087435e515
Diffstat (limited to 'compiler_wrapper/libc_exec.go')
-rw-r--r-- | compiler_wrapper/libc_exec.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler_wrapper/libc_exec.go b/compiler_wrapper/libc_exec.go index d9867733..a7a561bc 100644 --- a/compiler_wrapper/libc_exec.go +++ b/compiler_wrapper/libc_exec.go @@ -18,7 +18,20 @@ package main // // Since fork() brings us to one thread, we can only use async-signal-safe funcs below. // pid_t pid = fork(); // if (pid == 0) { -// execve(pathname, argv, envp); +// // crbug.com/1166017: we're (very rarely) getting ERESTARTSYS on some builders. +// // Documentation indicates that this is a bug in the kernel. Work around it by +// // retrying. 25 is an arbitrary retry number that Should Be Enough For Anyone(TM). +// int i = 0; +// for (; i < 25; i++) { +// execve(pathname, argv, envp); +// if (errno != 512) { +// break; +// } +// // Sleep a bit. Not sure if this helps, but if the condition we're seeing is +// // transient, it *hopefully* should. nanosleep isn't async-signal safe, so +// // we have to live with sleep() +// sleep(1); +// } // fprintf(stderr, "exec failed (errno: %d)\n", errno); // _exit(1); // } |