Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24681
to look at the new patch set (#2).
Change subject: [dist-test] Fix chrpath ETXTBSY race in dist slaves
......................................................................
[dist-test] Fix chrpath ETXTBSY race in dist slaves
chrpath rewrites ELF RPATH/RUNPATH entries in-place using an open with
write permission. Linux returns ETXTBSY for that open when the target
inode is currently being executed by some process.
Since KUDU-3788 all dist-test slaves share a single prebuilt thirdparty
installation. fixup_rpaths() is called at the start of every task
regardless of build type and walks the entire thirdparty tree. If an
ASAN or TSAN task on the same slave has already spawned llvm-symbolizer,
any subsequent task calling chrpath on that binary will fail with
ETXTBSY. The failure surfaces in whichever task runs fixup_rpaths()
concurrently, which can be a DEBUG/RELEASE task even though the cause is
always an ASAN/TSAN task holding llvm-symbolizer open for execution.
In the dist-test runs, multiple such errors ('open: Text file busy')
were seen and all of those pointed to chrpath failing while attempting
to rewrite the path into llvm-symbolizer binary.
Fix fix_rpath() to fall back to a copy-modify-rename sequence when
chrpath fails by copying the binary to a sibling temp file, rewrite the
RPATH on the copy, and atomically replace the original with os.rename().
os.rename() only updates the directory entry, any process that already
runs the original inode continues running undisturbed. This eliminates
the ETXTBSY failure for all build types without requiring any
coordination between concurrent tasks.
Change-Id: I80cdc5b903f5ed0865ec5a92f905a46719f7e316
---
M build-support/run_dist_test.py
1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/81/24681/2
--
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: newpatchset
Gerrit-Change-Id: I80cdc5b903f5ed0865ec5a92f905a46719f7e316
Gerrit-Change-Number: 24681
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)