emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55225: closed (GNU Linux "sort -g" can hang indefinitely when run on


From: GNU bug Tracking System
Subject: bug#55225: closed (GNU Linux "sort -g" can hang indefinitely when run on standard input (on Ubuntu))
Date: Mon, 02 May 2022 17:21:01 +0000

Your message dated Mon, 2 May 2022 10:20:07 -0700
with message-id <055069bd-b043-5fb7-8756-67a1a900a197@cs.ucla.edu>
and subject line Re: bug#55225: GNU Linux "sort -g" can hang indefinitely when 
run on standard input (on Ubuntu)
has caused the debbugs.gnu.org bug report #55225,
regarding GNU Linux "sort -g" can hang indefinitely when run on standard input 
(on Ubuntu)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
55225: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55225
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: GNU Linux "sort -g" can hang indefinitely when run on standard input (on Ubuntu) Date: Mon, 2 May 2022 10:59:48 +0000

https://unix.stackexchange.com/a/700967/2972

 

    dd if=/dev/urandom count=800000 bs=1 | od -An -t f4 -w4 | sponge | sort -g

 

goes into infinite loop.

 

It is caused by 'nan' showing up at a position that apparently is bad.

 

This works (100x bigger than the example above but removes all nan's):

 

    dd if=/dev/urandom count=80000000 bs=1 | od -An -t f4 -w4 | sponge | grep -v nan | time sort -g |tail

 

The bug can be provoked with:

 

    yes nan | head -n128095 | timeout 5 sort -g

 

The crazy part is, that this works:

 

    yes nan | head -n128095 > nan

    timeout 5 sort -g < nan

    timeout 5 sort -g nan

 

So it looks like something that is only relevant when reading from a pipe.

 

I can reproduce this on Ubuntu 20.04 and Ubuntu 22.04, but I cannot reproduce the error on CygWin.

 

 

Regards

 

 

 

Ole Tange

 


--- End Message ---
--- Begin Message --- Subject: Re: bug#55225: GNU Linux "sort -g" can hang indefinitely when run on standard input (on Ubuntu) Date: Mon, 2 May 2022 10:20:07 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1
Thanks for reporting that. Fixed as described here:

https://bugs.gnu.org/55212


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]