Bug 290362 - find: duplicate path component printed on SIGINFO
Summary: find: duplicate path component printed on SIGINFO
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Alan Somers
URL: https://github.com/freebsd/freebsd-sr...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-10-19 12:55 UTC by John F. Carr
Modified: 2025-11-22 15:03 UTC (History)
0 users

See Also:
asomers: mfc-stable14+
asomers: mfc-stable13-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2025-10-19 12:55:47 UTC
If I type ^T while find is running, it prints the pathname it is looking at with the last component duplicated.

# find * -type d -user root
load: 3.59  cmd: find 77496 [running] 30.37r 0.50u 10.42s 17% 8392k
Scanning: 2025/L-01-raw/L1001179.DNG/L1001179.DNG
Scanned: 440513

"2025/L-01-raw/L1001179.DNG" is a file, not a directory.

This code was introduced in 2024 in commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-10-19 15:01:47 UTC
^Triage: assign to committer.
Comment 2 Alan Somers freebsd_committer freebsd_triage 2025-10-19 15:48:28 UTC
Good catch.  I'll investigate.
Comment 3 Alan Somers freebsd_committer freebsd_triage 2025-10-19 15:55:59 UTC
Code review in progress
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-10-19 23:27:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6d767fe862964f704baf4eb388a30ed8227bb65

commit f6d767fe862964f704baf4eb388a30ed8227bb65
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-10-19 15:53:50 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-10-19 23:26:53 +0000

    find: fix pathnames printed by the SIGINFO handler

    Don't duplicate the last component.

    PR:             290362
    Reported by:    John F. Carr <jfc@mit.edu>
    Fixes:          d06a00963b7
    MFC after:      3 days
    Reviewed by:    jilles, Goran Mekić <meka@tilda.center>
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1878

 usr.bin/find/find.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-10-26 22:45:21 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=be122b46be2d56de3e354d3f89af7e8e9c88f94a

commit be122b46be2d56de3e354d3f89af7e8e9c88f94a
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-10-19 15:53:50 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-10-26 22:43:12 +0000

    find: fix pathnames printed by the SIGINFO handler

    Don't duplicate the last component.

    PR:             290362
    Reported by:    John F. Carr <jfc@mit.edu>
    Fixes:          d06a00963b7
    Reviewed by:    jilles, Goran Mekić <meka@tilda.center>
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1878

    (cherry picked from commit f6d767fe862964f704baf4eb388a30ed8227bb65)

 usr.bin/find/find.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-10-28 02:00:02 UTC
A commit in branch releng/15.0 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=52245427a5975d7b610fdb2271626dc82f607046

commit 52245427a5975d7b610fdb2271626dc82f607046
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-10-19 15:53:50 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-28 01:58:26 +0000

    find: fix pathnames printed by the SIGINFO handler

    Don't duplicate the last component.

    Approved by:    re (cperciva)
    PR:             290362
    Reported by:    John F. Carr <jfc@mit.edu>
    Fixes:          d06a00963b7
    Reviewed by:    jilles, Goran Mekić <meka@tilda.center>
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1878

    (cherry picked from commit f6d767fe862964f704baf4eb388a30ed8227bb65)
    (cherry picked from commit be122b46be2d56de3e354d3f89af7e8e9c88f94a)

 usr.bin/find/find.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2025-11-13 00:35:08 UTC
^Triage: already committed to 15. If no MFC to 14 desired, please just close.
Comment 8 Alan Somers freebsd_committer freebsd_triage 2025-11-13 14:33:46 UTC
I still plan to MFC to stable/14 .
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-11-22 14:55:04 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=cd81f86919c146fb9da4425a2a424e1447e3b355

commit cd81f86919c146fb9da4425a2a424e1447e3b355
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-10-19 15:53:50 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-11-22 14:54:07 +0000

    find: fix pathnames printed by the SIGINFO handler

    Don't duplicate the last component.

    PR:             290362
    Reported by:    John F. Carr <jfc@mit.edu>
    Fixes:          d06a00963b7
    Reviewed by:    jilles, Goran Mekić <meka@tilda.center>
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1878

    (cherry picked from commit f6d767fe862964f704baf4eb388a30ed8227bb65)

 usr.bin/find/find.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 Alan Somers freebsd_committer freebsd_triage 2025-11-22 15:03:19 UTC
MFCed to 15 and 14.  The affected code also lives in 13, but I'm not planning to MFC there because AFAIK no 13.6 release is planned.  If anybody wants this fix in 13, feel free to reopen the bug.