Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24681 )
Change subject: [dist-test] Fix chrpath ETXTBSY race in dist slaves ...................................................................... Patch Set 4: Code-Review+2 (1 comment) http://gerrit.cloudera.org:8080/#/c/24681/4/build-support/run_dist_test.py File build-support/run_dist_test.py: http://gerrit.cloudera.org:8080/#/c/24681/4/build-support/run_dist_test.py@131 PS4, Line 131: # The in-place rewrite failed. The one failure we recover from is when the : # binary is currently being executed by another concurrent task on the same : # slave (e.g. llvm-symbolizer in ASAN/TSAN): the kernel then rejects any : # write-capable open (O_RDWR or O_WRONLY) on the inode with ETXTBSY. We : # classify the failure by probing the kernel errno directly rather than : # matching chrpath's error text, which is locale-dependent (chrpath reports : # ETXTBSY as the strerror string "Text file busy", not "ETXTBSY"). Probing : # after the failure, rather than before the write, avoids a race window : # where the binary becomes busy between the check and the write. Any : # non-ETXTBSY failure is a genuine error and is propagated. : try: : fd = os.open(path, os.O_RDWR) : os.close(fd) : busy = False : except OSError as e: : busy = (e.errno == errno.ETXTBSY) : if not busy: : raise subprocess.CalledProcessError(p.returncode, "chrpath", chrpath_stderr) Thanks for the long comment. This indeed seems to be the best/only check we can do :( -- To view, visit http://gerrit.cloudera.org:8080/24681 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I80cdc5b903f5ed0865ec5a92f905a46719f7e316 Gerrit-Change-Number: 24681 Gerrit-PatchSet: 4 Gerrit-Owner: Ashwani Raina <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Tue, 18 Aug 2026 07:06:54 +0000 Gerrit-HasComments: Yes
