threads / discuss / 50143

git-send-email warnings & process dying of signal 11

Subject: git-send-email warnings & process dying of signal 11

## tl;dr

3 messages between Jan 2, 2019 and Jan 4, 2019.

replies: 2people: 2as markdown or json

Rafał Miłecki· Jan 1, 2019, 22:45 UTC · lore
Hello & Happy New Year!

I've recently switched from openSUSE 42.3 (perl 5.18.2 & git 2.13.7) to the openSUSE Tumbleweed (perl 5.28.1 & git 2.20.1) and send-email doesn't work for me anymore.

FWIW it doesn't seem like a git regression. I've manually installed 2.13.7 in my new OS and it also fails.

It basically fails with the:
Warning: unable to close filehandle __ANONIO__ properly: Bad file descriptor at /usr/lib/git/git-send-email line 812.
Warning: unable to close filehandle __ANONIO__ properly: Bad file descriptor at /usr/lib/git/git-send-email line 812.
error: git-send-email died of signal 11
Relevant perl source:
    802  sub ask {
    803          my ($prompt, %arg) = @_;
    804          my $valid_re = $arg{valid_re};
    805          my $default = $arg{default};
    806          my $confirm_only = $arg{confirm_only};
    807          my $resp;
    808          my $i = 0;
    809          return defined $default ? $default : undef
    810                  unless defined $term->IN and defined fileno($term->IN) and
    811                         defined $term->OUT and defined fileno($term->OUT);
    812          while ($i++ < 10) {
    813                  $resp = $term->readline($prompt);
    814                  if (!defined $resp) { # EOF
    815                          print "\n";
    816                          return defined $default ? $default : undef;
    817                  }
    818                  if ($resp eq '' and defined $default) {
    819                          return $default;
    820                  }
    821                  if (!defined $valid_re or $resp =~ /$valid_re/) {
    822                          return $resp;
    823                  }
    824                  if ($confirm_only) {
    825                          my $yesno = $term->readline(
    826                                  # TRANSLATORS: please keep [y/N] as is.
    827                                  sprintf(__("Are you sure you want to use <%s> [y/N]? "), $resp));
    828                          if (defined $yesno && $yesno =~ /y/i) {
    829                                  return $resp;
    830                          }
    831                  }
    832          }
    833          return;
    834  }
It seems that the "return defined" line causes warnings.

I don't know perl but I tried patching /usr/lib/git/git-send-email with the attached diff and got a following output:

Warning: unable to close filehandle __ANONIO__ properly: Bad file descriptor at /usr/lib/git/git-send-email line 812.
Warning: unable to close filehandle __ANONIO__ properly: Bad file descriptor at /usr/lib/git/git-send-email line 812.
term: Term::ReadLine=HASH(0x56138dd97c50)
*** buffer overflow detected ***: /usr/bin/perl terminated
error: git-send-email died of signal 6
It makes me suspect that maybe readline() call causes a crash.
Does this report make sense? Is there anything else I can provide?

--- /usr/lib/git/git-send-email.orig 2019-01-01 23:38:35.980954492 +0100 +++ /usr/lib/git/git-send-email 2019-01-01 23:37:58.964956240 +0100

@@ -810,7 +810,9 @@
                 unless defined $term->IN and defined fileno($term->IN) and
                        defined $term->OUT and defined fileno($term->OUT);
         while ($i++ < 10) {
+               print STDERR "term: $term\n";
                 $resp = $term->readline($prompt);
+               print STDERR "readline done\n";
                 if (!defined $resp) { # EOF
                         print "\n";
                         return defined $default ? $default : undef;
Rafał Miłecki· Jan 3, 2019, 07:22 UTC · re: Rafał Miłecki · lore

Re: git-send-email warnings & process dying of signal 11

On 2019-01-01 23:45, Rafał Miłecki wrote:
Show 15 quoted lines
> Hello & Happy New Year!
> 
> I've recently switched from openSUSE 42.3 (perl 5.18.2 & git 2.13.7) to
> the openSUSE Tumbleweed (perl 5.28.1 & git 2.20.1) and send-email
> doesn't work for me anymore.
> 
> FWIW it doesn't seem like a git regression. I've manually installed
> 2.13.7 in my new OS and it also fails.
> 
> It basically fails with the:
> Warning: unable to close filehandle __ANONIO__ properly: Bad file
> descriptor at /usr/lib/git/git-send-email line 812.
> Warning: unable to close filehandle __ANONIO__ properly: Bad file
> descriptor at /usr/lib/git/git-send-email line 812.
> error: git-send-email died of signal 11

It appears to be a problem with (my?) perl. I've tried reporting it: https://rt.perl.org/Public/Bug/Display.html?id=133750

Carlo Arenas· Jan 4, 2019, 06:25 UTC · re: Rafał Miłecki · lore

Re: git-send-email warnings & process dying of signal 11

one important point to consider when tracking this bug is that perl is not crashing, but is told to abort by some instrumentation (most likely gcc's fortify) and as shown by :

*** buffer overflow detected ***: /usr/bin/perl terminated
Carlo

← back to recent threads