Bug 1203080 - git-send-email: perl-TermReadLine-Gnu: Bad file descriptor during global destruction
Summary: git-send-email: perl-TermReadLine-Gnu: Bad file descriptor during global dest...
Status: RESOLVED FIXED
: 1091069 1201046 1207253 (view as bug list)
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Development (show other bugs)
Version: Leap 15.4
Hardware: Other Other
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Nathan Cutler
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-02 19:57 UTC by David Disseldorp
Modified: 2023-03-09 10:25 UTC (History)
6 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2022-09-02 19:57:04 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?
Comment 4 Nathan Cutler 2022-09-09 15:14:47 UTC
*** Bug 1091069 has been marked as a duplicate of this bug. ***
Comment 5 Nathan Cutler 2022-09-09 15:16:11 UTC
*** Bug 1201046 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Hundhammer 2023-01-18 13:27:25 UTC
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
Comment 7 Stefan Hundhammer 2023-01-18 13:28:57 UTC
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."
Comment 9 Nathan Cutler 2023-01-19 12:35:08 UTC
*** Bug 1207253 has been marked as a duplicate of this bug. ***
Comment 11 Nathan Cutler 2023-03-09 10:25:25 UTC
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.