This test fails occasionally in CI, also locally for me. tail(1) crashes when the test fails, so it appears to be a real bug. The crash doesn't happen when ASLR is disabled. Program terminated with signal SIGBUS, Bus error. Object-specific hardware error. #0 rlines (fp=0x1d9c41e5d630, fn=0x1d941c249630 "stdin", off=10, sbp=0x1d9c3d0a89b8) at /root/freebsd/usr.bin/tail/forward.c:219 219 /root/freebsd/usr.bin/tail/forward.c: No such file or directory. (gdb) bt #0 rlines (fp=0x1d9c41e5d630, fn=0x1d941c249630 "stdin", off=10, sbp=0x1d9c3d0a89b8) at /root/freebsd/usr.bin/tail/forward.c:219 #1 forward (fp=0x1d9c41e5d630, fn=0x1d941c249630 "stdin", style=style@entry=RLINES, off=off@entry=10, sbp=sbp@entry=0x1d9c3d0a89b8) at /root/freebsd/usr.bin/tail/forward.c:167 #2 0x00001d941c24b5c9 in follow (files=files@entry=0x1d9c3d0a89a8, style=1149239296, off=2564102) at /root/freebsd/usr.bin/tail/forward.c:330 #3 0x00001d941c24d632 in main (argc=0, argv=<optimized out>) at /root/freebsd/usr.bin/tail/tail.c:276 "info proc map"'s output has the following suspicious-looking line: 0x1d9c44800000 0x1d9c44a73000 0x273000 0x1d9c3e400000 r-- ---- /tmp/infile
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e599810ded07590708437cf58b8dd05f7cb474e5 commit e599810ded07590708437cf58b8dd05f7cb474e5 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-09-08 20:21:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-09-08 20:21:39 +0000 tail: Initialize the stat buffer used when input is stdin PR: 266284 Reported by: Jenkins via delphij Fixes: 7e11889959a6 ("tail: Fix -f with stdin") MFC after: 3 days usr.bin/tail/tail.c | 1 + 1 file changed, 1 insertion(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d223449d6ba9ec81f0c7629f0cc1a83e8168e3af commit d223449d6ba9ec81f0c7629f0cc1a83e8168e3af Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-09-08 20:21:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-09-15 13:04:07 +0000 tail: Initialize the stat buffer used when input is stdin PR: 266284 Reported by: Jenkins via delphij Fixes: 7e11889959a6 ("tail: Fix -f with stdin") (cherry picked from commit e599810ded07590708437cf58b8dd05f7cb474e5) usr.bin/tail/tail.c | 1 + 1 file changed, 1 insertion(+)