summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/osc.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2022-08-03 09:04:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-11 21:57:28 +0100
commitace871c199796a5ed730a3a95eae5bb26e342b03 (patch)
tree9c14ecb4997892765d86b0840e26dabf8c0d3f5e /bitbake/lib/bb/fetch2/osc.py
parentc4745d9c7d18e1df0c0aaae1ba69dd70a0e98490 (diff)
downloadpoky-ace871c199796a5ed730a3a95eae5bb26e342b03.tar.gz
bitbake: siggen: Fix insufficent entropy in sigtask file names
Signature generation uses mkstemp() to get a file descriptor to a unique file and then write the signature into it. However, the unique file name generation in glibc is based on the system timestamp, which means that with highly parallel builds it is more likely than one might expect expected that a conflict will occur between two different builder nodes. When operating over NFS (such as a shared sstate cache), this can cause race conditions and rare failures (particularly with NFS servers that may not correctly implement O_EXCL). The signature generation code is particularly susceptible to races since a single "sigtask." prefix used for all signatures from all tasks, which makes collision even more likely. To work around this, add an internal implementation of mkstemp() that adds additional truly random entropy to the file name to eliminate conflicts. (Bitbake rev: 63bb5591e833de0e7b552963ad9bc4b39e56fda9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 97955f3c1c738aa4b4478a6ec10a08094ffc689d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/osc.py')
0 files changed, 0 insertions, 0 deletions