|
|
DescriptionSet close_fds True in Popen of cloudtail
In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files.
Let's close fds when invoking cloudtail.
This will fix the bug on windows buildbot.
https://codereview.chromium.org/2377553002/
BUG=643139
Committed: https://chromium.googlesource.com/chromium/tools/build/+/2ef451d6c8afe2635e0eeb55038a0e3fb564d3ad
Patch Set 1 #
Total comments: 5
Patch Set 2 : use devnull for stdout/stderr of cloudtail #Messages
Total messages: 26 (13 generated)
tikuta@chromium.org changed reviewers: + phajdan.jr@chromium.org, shinyak@chromium.org, ukai@chromium.org, yyanagisawa@chromium.org
Description was changed from ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and prevents unlink opened files. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ========== to ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and prevents unlinking opened files. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ==========
Description was changed from ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and prevents unlinking opened files. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ========== to ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ==========
lgtm
The CQ bit was checked by tikuta@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
shinyak@google.com changed reviewers: + shinyak@google.com
https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... File scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py (right): https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py:24: close_fds=True) align indent?
https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... File scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py (right): https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py:24: close_fds=True) On 2016/09/27 09:05:18, shinyak (Google) wrote: > align indent? above lines are in array. it is correct indent.
Description was changed from ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ========== to ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files. Let's close fds when invoking cloudtail. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ==========
lgtm https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... File scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py (right): https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py:24: close_fds=True) mmm...
LGTM
vadimsh@chromium.org changed reviewers: + vadimsh@chromium.org
If you try to remove a file that cloudtail is tailing, it will still fail with permission errors on Windows, since cloudtail keeps a handler for that file. You'll need to make sure cloudtail is stopped before trying to remove the file.
https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... File scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py (right): https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py:24: close_fds=True) might be better to set stdout (and maybe stderr) to open(os.devnull, "w") ? http://stackoverflow.com/questions/11269575/how-to-hide-output-of-subprocess-...
On 2016/09/27 17:21:58, Vadim Sh. wrote: > If you try to remove a file that cloudtail is tailing, it will still fail with > permission errors on Windows, since cloudtail keeps a handler for that file. > > You'll need to make sure cloudtail is stopped before trying to remove the file. it's not file that cloudtail is tailing. it's a file that happens to be used as stdout of cloudtail. cloudtail_utils.py emits cloudtail's pid to stdout, and recipe raw_io will remove it when cloudtail_utils.py finished but cloudtail inherits that stdout and keep opening the descriptor, so removing the stdout file will fail.
Thank you for review, comment and explanation! https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... File scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py (right): https://codereview.chromium.org/2374543005/diff/1/scripts/slave/recipe_module... scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py:24: close_fds=True) On 2016/09/28 02:21:24, ukai wrote: > might be better to set stdout (and maybe stderr) to open(os.devnull, "w") ? > > http://stackoverflow.com/questions/11269575/how-to-hide-output-of-subprocess-... Done.
lgtm
The CQ bit was checked by tikuta@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yyanagisawa@chromium.org, phajdan.jr@chromium.org, shinyak@google.com Link to the patchset: https://codereview.chromium.org/2374543005/#ps20001 (title: "use devnull for stdout/stderr of cloudtail")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files. Let's close fds when invoking cloudtail. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 ========== to ========== Set close_fds True in Popen of cloudtail In windows, Popen inherits file descriptors and Exception occurs when raw_io unlinks opened files. Let's close fds when invoking cloudtail. This will fix the bug on windows buildbot. https://codereview.chromium.org/2377553002/ BUG=643139 Committed: https://chromium.googlesource.com/chromium/tools/build/+/2ef451d6c8afe2635e0e... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/tools/build/+/2ef451d6c8afe2635e0e... |