Hello halfgaar, or anyone else affected, Accepted bash into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bash/4.4.18-2ubuntu3.1 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: bash (Ubuntu Cosmic) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-cosmic ** Changed in: bash (Ubuntu Bionic) Status: In Progress => Fix Committed ** Tags added: verification-needed-bionic -- 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: Fix Committed Status in bash source package in Cosmic: Fix Committed 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