bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in bash 4.3.30 with --disable-job-control


From: Eduardo A . Bustamante López
Subject: Re: Bug in bash 4.3.30 with --disable-job-control
Date: Wed, 10 Jun 2015 11:55:29 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jun 10, 2015 at 11:00:51AM -0400, Chet Ramey wrote:
> On 6/2/15 1:07 PM, Roy Keene wrote:
> > All,
> > 
> >     There is a bug of some sort in bash 4.3.30 (and likely others) when
> > compiled with --disable-job-control on Linux/x86_64.
> 
> I can't reproduce this on RHEL 6 or Fedora 22 with bash-4.3.39.

I can reliably reproduce this in 4.3.30 and in branch `master' of the latest
git:


# Bash from `master'

  dualbus@hp ...src/gnu/bash % time ./bash -ic 'until : | { ! :; }; do :; done; 
echo x'
  x
  ./bash -ic 'until : | { ! :; }; do :; done; echo x'  2.08s user 3.72s system 
48% cpu 12.011 total
  dualbus@hp ...src/gnu/bash % ./bash --version
  GNU bash, version 4.3.39(1)-release (x86_64-unknown-linux-gnu)
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  
  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.


# Bash from FTP

  dualbus@hp ~/Downloads/bash-4.3.30
   % time ./bash -c 'until : | { ! :; }; do :; done; echo x'
  ^C./bash -c 'until : | { ! :; }; do :; done; echo x'  3.10s user 18.81s 
system 41% cpu 52.893 total
  dualbus@hp ~/Downloads/bash-4.3.30
   % time ./bash -ic 'until : | { ! :; }; do :; done; echo x'
  x
  ./bash -ic 'until : | { ! :; }; do :; done; echo x'  1.97s user 3.53s system 
52% cpu 10.427 total
  dualbus@hp ~/Downloads/bash-4.3.30
   % ./bash --version
  GNU bash, version 4.3.30(1)-release (x86_64-unknown-linux-gnu)
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  
  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.


I compiled both with:

  CFLAGS='-O0 -g' ./configure --disable-job-control

Notice that it doesn't happen if you don't use the interactive mode.

All this is on GNU/Linux (debian sid):

  dualbus@hp ~ % uname -a
  Linux hp 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux


I can reproduce it on OpenBSD:

  $ ./bash --version
  GNU bash, version 4.3.30(1)-release (x86_64-unknown-openbsd5.6)
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  
  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  $ time ./bash -ic 'until : | { ! :; }; do :; done; echo x'
  x
      0m0.39s real     0m0.06s user     0m0.28s system
  $ time ./bash -c 'until : | { ! :; }; do :; done; echo x'  
  ^C^C^C^C    0m11.27s real     0m2.25s user     0m6.87s system
  $ uname -a
  OpenBSD openbsd.my.domain 5.6 GENERIC#310 amd64


And NetBSD:

  [dualbus@faeroes.sdf.org]$ ./bash --version
  GNU bash, version 4.3.30(1)-release (x86_64-unknown-netbsd6.1.)
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  
  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  [dualbus@faeroes.sdf.org]$ time ./bash -ic 'until : | { ! :; }; do :; done; 
echo x'
  x
  
  real    0m27,27s
  user    0m9,72s
  sys     0m12,24s
  [dualbus@faeroes.sdf.org]$ uname -a
  NetBSD faeroes 6.1_STABLE NetBSD 6.1_STABLE (SDF6.amd64) #0: Sun Dec 21 
18:11:22 UTC 2014  
root@bjork:/spare/netbsd/usr/src/sys/arch/amd64/compile/SDF6.amd64 amd64


I tried digging into the issue with strace/ltrace, but I couldn't find any 
pattern.

-- 
Eduardo Bustamante
https://dualbus.me/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]