[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-06-11 Thread Bryce Harrington
Fixes have been pushed to cosmic-proposed and bionic-proposed.

** Summary changed:

- Apply Bash 4.4.20 to fix cpu spinning on built-in wait
+ [SRU] Apply Bash 4.4.20 to fix cpu spinning on built-in wait

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  [SRU] Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  In Progress
Status in bash source package in Cosmic:
  In Progress

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  [Test Case]

  A PPA with the proposed fix included is at:

https://launchpad.net/~bryce/+archive/ubuntu/bash-sru-19-010-1

  Install the PPA with the fix via:

sudo add-apt-repository ppa:bryce/bash-sru-19-010-1
sudo apt-get update
sudo apt-get install bash

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-06-07 Thread Launchpad Bug Tracker
** Merge proposal linked:
   https://code.launchpad.net/~bryce/ubuntu/+source/bash/+git/bash/+merge/368573

** Merge proposal linked:
   https://code.launchpad.net/~bryce/ubuntu/+source/bash/+git/bash/+merge/368574

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  In Progress
Status in bash source package in Cosmic:
  In Progress

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  [Test Case]

  A PPA with the proposed fix included is at:

https://launchpad.net/~bryce/+archive/ubuntu/bash-sru-19-010-1

  Install the PPA with the fix via:

sudo add-apt-repository ppa:bryce/bash-sru-19-010-1
sudo apt-get update
sudo apt-get install bash

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-06-07 Thread Bryce Harrington
** Description changed:

  [Impact]
  
  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.
  
+ [Test Case]
  
- [Test Case]
+ A PPA with the proposed fix included is at:
+ 
+   https://launchpad.net/~bryce/+archive/ubuntu/bash-sru-19-010-1
+ 
+ Install the PPA with the fix via:
+ 
+   sudo add-apt-repository ppa:bryce/bash-sru-19-010-1
+   sudo apt-get update
+   sudo apt-get install bash
  
  Run this loop for a few days/weeks:
  
    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done
  
  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs are
  cycled in the machine.
  
  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.
- 
  
  [Regression Potential]
  
  The fix has been reviewed and accepted upstream.  The patch adds a test
  at time of pid determination for if the pid is already in use and if so,
  skip it and pick a different one.  This does change behavior slightly in
  that different pid numbers will be generated in rare cases, but nothing
  should depend on how pids are generated, as the behavior is not
  specified to be anything but random.
  
  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.
  
  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.
  
  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not skipping
  patches).
  
- 
  [Fix]
  
  Official patch to fix, and to bump to 4.4.20:
  
  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
  
  The newest Ubuntu tar.xz with patches I could find at:
  
  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/
  
  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has the
  fix yet.
  
  Although not completely sure, this problem seems to have been introduced
  in the 4.4 version of Bash, so in term of LTS versions, 18.04 and up are
  affected.
- 
  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:
  
  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
  
  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).
  
  The 4.4-020 version needs to be included. I think it's actually quite
  critical.
  
  A justification for including the fix would be that a standard language
  feature in a script language is broken, and that it's indeterminate when
  it breaks. Considering the wide spread use of bash, I'm surprised not
  more people have reported issues. My and a client started having issues
  with independently of each other very soon after upgrading to an
  affected version.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  In Progress
Status in bash source package in Cosmic:
  In Progress

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  [Test Case]

  A PPA with the proposed fix included is at:

https://launchpad.net/~bryce/+archive/ubuntu/bash-sru-19-010-1

  Install the PPA with the fix via:

sudo add-apt-repository ppa:bryce/bash-sru-19-010-1
sudo apt-get update
sudo apt-get install bash

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will 

[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-06-06 Thread Bryce Harrington
** Changed in: bash (Ubuntu Bionic)
   Status: New => In Progress

** Changed in: bash (Ubuntu Cosmic)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  In Progress
Status in bash source package in Cosmic:
  In Progress

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  
  [Test Case]

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  
  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  
  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-30 Thread Brian Murray
** Tags removed: rls-bb-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  
  [Test Case]

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  
  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  
  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-30 Thread Bryce Harrington
** Changed in: bash (Ubuntu Cosmic)
   Importance: Undecided => High

** Changed in: bash (Ubuntu Cosmic)
 Assignee: (unassigned) => Bryce Harrington (bryce)

** Changed in: bash (Ubuntu)
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  Fix Released
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  
  [Test Case]

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  
  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  
  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-29 Thread halfgaar
Thanks; it's not about getting it done yesterday so to speak, so I'll
patiently await next week.

I suspect you'll be able to reproduce it faster if you lower sysctl
kernel.pid_max. With 32k PIDs, one of my apps spawning about a process
every two seconds, needed about a week of running to hit it.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  
  [Test Case]

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  
  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  
  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-29 Thread Bryce Harrington
Hi halfgaar,

Robie asked me to help you with this bug, thanks for reporting it.  I
may not be able to get full attention on this until next week due to a
project deadline, but I've had a quick look at the patch and your
problem description, and it looks pretty straightforward.  Thanks also
for the test case, I'll run it and see if I can repro the bug myself.

It looks like both bionic and cosmic are running 4.4.18-x, so I'm
gathering cosmic will need the fix as well.  disco and eoan have moved
to bash 5.0, and I've verified the upstream source code includes the
fix, so no changes are needed for those distro releases.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New

Bug description:
  [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  
  [Test Case]

  Run this loop for a few days/weeks:

    #!/bin/bash
    while true; do
  sleep 0.5 &
  wait
    done

  It will eventually cause the 'wait' statement to hang, consuming 100%
  after some indeterminate amount of time, dependent on how fast PIDs
  are cycled in the machine.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  
  [Regression Potential]

  The fix has been reviewed and accepted upstream.  The patch adds a
  test at time of pid determination for if the pid is already in use and
  if so, skip it and pick a different one.  This does change behavior
  slightly in that different pid numbers will be generated in rare
  cases, but nothing should depend on how pids are generated, as the
  behavior is not specified to be anything but random.

  The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
  storage[psi].bucket_next", but this only shows when the original bug
  would have been triggered.

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

  
  [Fix]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

  
  [Original Report]
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-29 Thread Bryce Harrington
** Description changed:

- Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
- when spawning sub processes and waiting for them. There is a fix:
+ [Impact]
  
- https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
+ Long running bash loops that create and reap processes will crash,
+ hanging at 100% CPU.
  
- Our application started being affected (locking up) by this since
- migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
- Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
- because of their unusual versions as patches, apt shows it as
- 4.4.18-2ubuntu1).
  
- The 4.4-020 version needs to be included. I think it's actually quite
- critical.
+ [Test Case]
+ 
+ Run this loop for a few days/weeks:
+ 
+   #!/bin/bash
+   while true; do
+ sleep 0.5 &
+ wait
+   done
+ 
+ It will eventually cause the 'wait' statement to hang, consuming 100%
+ after some indeterminate amount of time, dependent on how fast PIDs are
+ cycled in the machine.
  
  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.
  
- Edit as per the SRU procedure:
  
-[Impact]
+ [Regression Potential]
  
- Long running bash loops that create and reap processes will crash,
- hanging at 100% CPU.
+ The fix has been reviewed and accepted upstream.  The patch adds a test
+ at time of pid determination for if the pid is already in use and if so,
+ skip it and pick a different one.  This does change behavior slightly in
+ that different pid numbers will be generated in rare cases, but nothing
+ should depend on how pids are generated, as the behavior is not
+ specified to be anything but random.
  
- A justification for including the fix would be that a standard language
- feature in a script language is broken, and that it's indeterminate when
- it breaks. Considering the wide spread use of bash, I'm surprised not
- more people have reported issues. My and a client started having issues
- with independently of each other very soon after upgrading to an
- affected version.
- 
-[Test Case]
- 
- Run this loop for a few days/weeks:
- 
-   #!/bin/bash
-   while true; do
- sleep 0.5 &
- wait
-   done
- 
- 
- It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.
- 
-[Regression Potential]
+ The patch adds a new warning message, "bgp_delete: LOOP: psi (%d) ==
+ storage[psi].bucket_next", but this only shows when the original bug
+ would have been triggered.
  
  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.
  
  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not skipping
  patches).
  
-[Other Info]
+ 
+ [Fix]
  
  Official patch to fix, and to bump to 4.4.20:
  
  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
  
  The newest Ubuntu tar.xz with patches I could find at:
  
  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/
  
  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has the
  fix yet.
  
  Although not completely sure, this problem seems to have been introduced
  in the 4.4 version of Bash, so in term of LTS versions, 18.04 and up are
  affected.
+ 
+ 
+ [Original Report]
+ Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops when 
spawning sub processes and waiting for them. There is a fix:
+ 
+ https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
+ 
+ Our application started being affected (locking up) by this since
+ migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
+ Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
+ because of their unusual versions as patches, apt shows it as
+ 4.4.18-2ubuntu1).
+ 
+ The 4.4-020 version needs to be included. I think it's actually quite
+ critical.
+ 
+ A justification for including the fix would be that a standard language
+ feature in a script language is broken, and that it's indeterminate when
+ it breaks. Considering the wide spread use of bash, I'm surprised not
+ more people have reported issues. My and a client started having issues
+ with independently of each other very soon after upgrading to an
+ affected version.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-29 Thread Bryce Harrington
** Also affects: bash (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: bash (Ubuntu Bionic)
   Importance: Undecided => High

** Changed in: bash (Ubuntu Bionic)
 Assignee: (unassigned) => Bryce Harrington (bryce)

** Also affects: bash (Ubuntu Cosmic)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New
Status in bash source package in Bionic:
  New
Status in bash source package in Cosmic:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  Edit as per the SRU procedure:

 [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

 [Test Case]

  Run this loop for a few days/weeks:

#!/bin/bash
while true; do
  sleep 0.5 &
  wait
done

  
  It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.

 [Regression Potential]

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

 [Other Info]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-29 Thread Robie Basak
** Tags added: bitesize server-next

** Changed in: bash (Ubuntu)
 Assignee: (unassigned) => Bryce Harrington (bryce)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  Edit as per the SRU procedure:

 [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

 [Test Case]

  Run this loop for a few days/weeks:

#!/bin/bash
while true; do
  sleep 0.5 &
  wait
done

  
  It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.

 [Regression Potential]

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

 [Other Info]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-21 Thread Sebastien Bacher
** Changed in: bash (Ubuntu)
   Importance: Undecided => High

** Tags added: rls-bb-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  Edit as per the SRU procedure:

 [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

 [Test Case]

  Run this loop for a few days/weeks:

#!/bin/bash
while true; do
  sleep 0.5 &
  wait
done

  
  It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.

 [Regression Potential]

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this involves linearly progressing to the next version (so not
  skipping patches).

 [Other Info]

  Official patch to fix, and to bump to 4.4.20:

  http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  The newest Ubuntu tar.xz with patches I could find at:

  http://archive.ubuntu.com/ubuntu/pool/main/b/bash/

  also didn't have the 4.4.20 patch, so it seems no Ubuntu release has
  the fix yet.

  Although not completely sure, this problem seems to have been
  introduced in the 4.4 version of Bash, so in term of LTS versions,
  18.04 and up are affected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-20 Thread halfgaar
I added more info (edited the original description) hoping it covers
everything the SRU requires.

** Description changed:

  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:
  
  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
  
  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).
  
  The 4.4-020 version needs to be included. I think it's actually quite
- critical, also for older Ubuntus.
+ critical.
  
  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.
+ 
+ Edit as per the SRU procedure:
+ 
+[Impact]
+ 
+ Long running bash loops that create and reap processes will crash,
+ hanging at 100% CPU.
+ 
+ A justification for including the fix would be that a standard language
+ feature in a script language is broken, and that it's indeterminate when
+ it breaks. Considering the wide spread use of bash, I'm surprised not
+ more people have reported issues. My and a client started having issues
+ with independently of each other very soon after upgrading to an
+ affected version.
+ 
+[Test Case]
+ 
+ Run this loop for a few days/weeks:
+ 
+   #!/bin/bash
+   while true; do
+ sleep 0.5 &
+ wait
+   done
+ 
+ 
+ It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.
+ 
+[Regression Potential]
+ 
+ Using 'apt-get source bash' to get the original source version, I
+ created a deb that includes the 4.4.20 patch and have been running it
+ since April 2nd. The 100% CPU spinning is solved, and no other
+ regressions have been observed.
+ 
+ Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
+ this involves linearly progressing to the next version (so not skipping
+ patches).
+ 
+[Other Info]
+ 
+ Official patch to fix, and to bump to 4.4.20:
+ 
+ http://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020
+ 
+ The newest Ubuntu tar.xz with patches I could find at:
+ 
+ http://archive.ubuntu.com/ubuntu/pool/main/b/bash/
+ 
+ also didn't have the 4.4.20 patch, so it seems no Ubuntu release has the
+ fix yet.
+ 
+ Although not completely sure, this problem seems to have been introduced
+ in the 4.4 version of Bash, so in term of LTS versions, 18.04 and up are
+ affected.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

  Edit as per the SRU procedure:

 [Impact]

  Long running bash loops that create and reap processes will crash,
  hanging at 100% CPU.

  A justification for including the fix would be that a standard
  language feature in a script language is broken, and that it's
  indeterminate when it breaks. Considering the wide spread use of bash,
  I'm surprised not more people have reported issues. My and a client
  started having issues with independently of each other very soon after
  upgrading to an affected version.

 [Test Case]

  Run this loop for a few days/weeks:

#!/bin/bash
while true; do
  sleep 0.5 &
  wait
done

  
  It will cause the 'wait' statement to hang, consuming 100% after some 
indeterminate amount of time, dependent on how fast PIDs are cycled in the 
machine.

 [Regression Potential]

  Using 'apt-get source bash' to get the original source version, I
  created a deb that includes the 4.4.20 patch and have been running it
  since April 2nd. The 100% CPU spinning is solved, and no other
  regressions have been observed.

  Ubuntu 18.04 is already at 4.4.19, which is one patch level behind, so
  this 

[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-05-20 Thread Robie Basak
Thank you for taking the time to report this bug and helping to make
Ubuntu better.

Please see https://wiki.ubuntu.com/StableReleaseUpdates for details of
Ubuntu's stable release update process. Based on your report it sounds
like this patch would qualify, but please could you update us on the
status of the bug in newer releases of Ubuntu so we can note where work
is needed?

I'm not sure how to prioritize this bug. Under what circumstances are
users affected by this problem? Is this problem likely to affect a large
number of Ubuntu users?

Either way, if it's a bug with a straightforward patch then you're
welcome to follow
https://wiki.ubuntu.com/StableReleaseUpdates#Procedure, and if you can
provide us with patches ready for inclusion in Ubuntu under that
procedure (and it turns out to qualify under our policy), I'd be happy
to help you get the fix landed.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical, also for older Ubuntus.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1822776] Re: Apply Bash 4.4.20 to fix cpu spinning on built-in wait

2019-04-23 Thread halfgaar
I see this bug hasn't gotten attention, but isn't this quite critical?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1822776

Title:
  Apply Bash 4.4.20 to fix cpu spinning on built-in wait

Status in bash package in Ubuntu:
  New

Bug description:
  Bash pre-4.4.20 has a bug in its PID hash table that causes spin-loops
  when spawning sub processes and waiting for them. There is a fix:

  https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-020

  Our application started being affected (locking up) by this since
  migrating from Ubuntu 14.04 to 18.04. Ubuntu 14.04 has bash 4.3.11(1),
  Ubuntu 18.04 has bash 4.4.19 (that is, when running 'bash --version',
  because of their unusual versions as patches, apt shows it as
  4.4.18-2ubuntu1).

  The 4.4-020 version needs to be included. I think it's actually quite
  critical, also for older Ubuntus.

  The Bash bug report mentions longer running loops, but it seems hash
  collisions are the cause, meaning it's just a matter of chance,
  influenced by how fast PIDs are cycled on the machine.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1822776/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp