As explained here <https://unix.stackexchange.com/questions/700863/gnu-linux-sort-g-can-hang-indefinitely-when-run-on-standard-input-on-ubuntu>, 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