Bugzilla – Bug 1203080
git-send-email: perl-TermReadLine-Gnu: Bad file descriptor during global destruction
Last modified: 2023-03-09 10:25:25 UTC
git-send-email 2.35.3 on Leap 15.4 spits out a page full of warnings after a patch is successfully sent. E.g. > git send-email -1 ... Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): y ... Result: 250 Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. Warning: unable to close filehandle properly: Bad file descriptor during global destruction. As mentioned, the patch is sent successfully, hence the minor severity. Searching around lead me to https://github.com/netdisco/netdisco/wiki/Troubleshooting#perl-termreadline-gnu-operating-system-packages which states: > certain versions of this package can make netdisco-deploy error out with: > Warning: unable to close filehandle properly: Bad file descriptor during global destruction. > upgrading to a newer version (1.35) should fix the problem. I upgraded the Leap 15.4 perl-TermReadLine-Gnu-1.20 package to perl-Term-ReadLine-Gnu-1.42-lp154 from obs devel:languages:perl and sure enough the warning disappeared (the patch is also still successfully sent). @Tina, Coolo and Nathan: would you be open to updating the Leap 15.4 / SLE15-SP4 perl-TermReadLine-Gnu-1.20 package to perl-Term-ReadLine-Gnu-1.42?
*** Bug 1091069 has been marked as a duplicate of this bug. ***
*** Bug 1201046 has been marked as a duplicate of this bug. ***
See also bug #1207253. Very easy to reproduce: yast2 users foo -> Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line 5 during global destruction (#1) (S io) There were errors during the implicit close() done on a filehandle when its reference count reached zero while it was still open, e.g.: { open my $fh, '>', $file or die "open: '$file': $!\n"; print $fh $data or die "print: $!"; } # implicit close here
Nathan, in that other bug, the reporter suggests: "Cause for this error seems to be the package "perl-TermReadLine-Gnu" (consider naming) V1.20, which is part of all 15.X Leap distributions. Replacing this with the package perl-Term-ReadLine-Gnu V1.45 (also consider naming) from https://software.opensuse.org/package/perl-Term-ReadLine-Gnu seems to fix the issue, but is missing in distributions."
*** Bug 1207253 has been marked as a duplicate of this bug. ***
perl-Term-ReadLine-Gnu 1.42 has been released as a maintenance update for openSUSE Leap 15.4/SLE-15-SP4. I have verified that it correctly replaces the old perl-TermReadLine-Gnu 1.20.