[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55212: GNU Linux "sort -g" can hang indefinitely when run on standar
bug#55212: GNU Linux "sort -g" can hang indefinitely when run on standard input if NaNs are involved
Tue, 10 May 2022 12:08:03 -0700
On 2022/05/01 10:16, Giulio Genovese wrote:
As explained here
when running "sort -g" from standard input, if NaNs are involved, this can
cause "sort -g" to hang indefinitely while consuming 100% of the CPU. This
seems to be system dependent. I cannot reproduce the bug on a RHEL7
machine. However, multiple users seem to be able to reproduce the bug. The
following command can provoke the bug:
yes nan | head -n128095 | timeout 5 sort -g
Unless there is some magic about -n1238095,
Using a smaller number like -n1 or -n12 both terminate after 1 or 12 lines.
I wasn't willing to wait for 1.2M lines being output, though the -n128085
case did start to output until I terminated it -- which would seem to
indicate that the sort had finished and was dumping its output. I.e.
no indefinite hang.
sort from 8.26.18-5e871
from suse old tumbleweed (out of sync - no longer updates)