diff mbox series

breakpseudo: Add demo of breaking pseudo with symlink creation

Message ID 20250319133457.806384-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series breakpseudo: Add demo of breaking pseudo with symlink creation | expand

Commit Message

Richard Purdie March 19, 2025, 1:34 p.m. UTC
We sometimes see https://bugzilla.yoctoproject.org/show_bug.cgi?id=14957 on
the autobuilder. This recipe replicates that failure. Usually it occurs in
pciutils in creation of libpci.so.

The issue is the makefile can result in multiple calls to ln -sf in
parallel which race and confuse pseudo.

We have two issues:

a) it would be nice to fix the picutils makefiles so they don't race and call
this multiple times

b) pseudo should fail like this

I'm sharing this reproducer since it moves the bug from "I can't understand
or reproduce this" to a "there is a reproducer".

I commonly get complaints that bugs aren't reproducible, this one now is. I'm
hoping that means I will get some help on it.

To reprocude, run "bitbake breakpseudo" and watch the inoode mismatch errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../breakpseudo/breakpseudo/run.sh              | 16 ++++++++++++++++
 .../breakpseudo/breakpseudo_1.0.bb              | 17 +++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100755 meta/recipes-devtools/breakpseudo/breakpseudo/run.sh
 create mode 100644 meta/recipes-devtools/breakpseudo/breakpseudo_1.0.bb
diff mbox series

Patch

diff --git a/meta/recipes-devtools/breakpseudo/breakpseudo/run.sh b/meta/recipes-devtools/breakpseudo/breakpseudo/run.sh
new file mode 100755
index 00000000000..dc500894ca9
--- /dev/null
+++ b/meta/recipes-devtools/breakpseudo/breakpseudo/run.sh
@@ -0,0 +1,16 @@ 
+#!/bin/bash
+
+D=$1
+
+function run()
+{
+	for run in $(seq 10); do
+	    ln -sf file ${D}/file2
+	    ls -la ${D}/file2
+	done
+}
+
+run &
+run &
+run &
+run &
diff --git a/meta/recipes-devtools/breakpseudo/breakpseudo_1.0.bb b/meta/recipes-devtools/breakpseudo/breakpseudo_1.0.bb
new file mode 100644
index 00000000000..6c35b93112e
--- /dev/null
+++ b/meta/recipes-devtools/breakpseudo/breakpseudo_1.0.bb
@@ -0,0 +1,17 @@ 
+
+LICENSE = "MIT"
+SUMMARY = "test to break psuedo"
+DESCRIPTION = "test to break psuedo"
+SRC_URI = "file://run.sh"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+FILES:${PN} = "/file*"
+
+inherit allarch
+
+do_install () {
+	touch ${D}/file
+
+	${UNPACKDIR}/run.sh ${D}
+
+	sleep 2
+}
\ No newline at end of file