Comment 0 for bug 1822776

Revision history for this message
halfgaar (wiebe-halfgaar) wrote : Apply Bash 4.4.20 to fix cpu spinning on built-in wait

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:

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.