Date: Wed, 23 Mar 2022 18:05:23 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262746] lib/libsysdecode/mkioctls sometimes fails spuriously Message-ID: <bug-262746-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262746 Bug ID: 262746 Summary: lib/libsysdecode/mkioctls sometimes fails spuriously Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: np@FreeBSD.org CC: arichardson@FreeBSD.org, jhb@FreeBSD.org mkioctls uses a "find | sort | tee | xargs egrep -l | awk" pipeline to generate a list of header files. This pipeline fails spuriously if the shell's pipefail option is enabled and one of the egrep launched by xargs returns 1 because there are no _IO* markers in that particular batch of files. set -o pipefail was added in ec45ce6222366e69adf1fad1b33ec8598229c8c0 pipefail support was added to /bin/sh in 484160a9cf236a5892c1ab8344de287d7a1472c1 This also means the comment about /bin/bash in mkioctls is now stale. Here is a DTrace script (and its output) that shows the failure when "sh ./lib/libsysdecode/mkioctls ." is run inside a tree with this problem. cat mkioctl.d #!/usr/sbin/dtrace -s syscall:freebsd:exit:entry /execname == "awk" || \ execname == "egrep" || \ execname == "find" || \ execname == "grep" || \ execname == "sh" || \ execname == "tee" || \ execname == "xargs"/ { trace(execname); trace(arg0) } dtrace: script '/tmp/mkioctl.d' matched 1 probe CPU ID FUNCTION:NAME 3 88534 exit:entry sh 0 1 88534 exit:entry grep 0 4 88534 exit:entry find 0 2 88534 exit:entry egrep 1 0 88534 exit:entry egrep 0 2 88534 exit:entry egrep 0 7 88534 exit:entry tee 0 4 88534 exit:entry egrep 0 6 88534 exit:entry xargs 1 2 88534 exit:entry awk 0 0 88534 exit:entry sh 1 3 88534 exit:entry sh 1 -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262746-227>
