[Bug 266592] diff(1): 'diff -rl' called on 2 large directories opens too many files

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 25 Sep 2022 07:29:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266592

            Bug ID: 266592
           Summary: diff(1): 'diff -rl' called on 2 large directories
                    opens too many files
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

I've ran this command and it failed:
> $ diff -rl work.test1 work
> diff: kqueue: Too many open files in system

Both work and work.test1 are build directories of one port.

ktrace(1) shows that the file descriptor value grows continuously until the
above error occurs.

Correct behavior: the above command shouldn't keep many files open. It is
supposed to find differences between files, and can have 2 compared files open
and perhaps also 2 compared directories open.
There should be no need to keep a large number of files open.


13.1-STABLE

-- 
You are receiving this mail because:
You are the assignee for the bug.