On 9/26/22 20:52, Bernhard Voelker wrote:
On 9/26/22 13:42, Fabian Vogt wrote:
and we can see that the calling shell now has a lot of file descriptors open:
[ 249s] + ulimit -n 20 [ 249s] + yes [ 249s] + ls -l /proc/self/fd [ 249s] total 0 [ 249s] lr-x------ 1 abuild abuild 64 Sep 26 06:45 0 -> pipe:[63339] [ 249s] l-wx------ 1 abuild abuild 64 Sep 26 06:45 1 -> /home/abuild/rpmbuild/BUILD/coreutils-9.1/tests/split/r-chunk.log [ 249s] l-wx------ 1 abuild abuild 64 Sep 26 06:45 10 -> /tmp/GmIHNZVW
GNU make recently gained support for using named fifo for jobserver coordination. That filename matches the /tmp/Gm* pattern: https://build.opensuse.org/package/view_file/openSUSE:Factory/make/jobserver... (line 466). So could be a leak (or design issue) in make.
Hmm, both this coreutils and the dtc issue is already discussed upstream by Andreas:
https://lists.gnu.org/archive/html/bug-make/2022-09/msg00178.html
@Andreas: do you have news on this? Do we need to work around that GNU make bug in B:S/coreutils?
For my own reference, this is a snippet which would work to close all those leaked file descriptors: # GNU make 4.3.90 leaks a lot of file descriptors when using the jobserver. # Close all of them pointing to files matching '/tmp/Gm*'. p=$$ for n in $(find /proc/$p/fd -lname '/tmp/Gm*' -printf '%f\n'); do exec $n>- done Thanks & have a nice day, Berny