public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sort utility goes berzerk (x86_64)
@ 2017-11-25 13:23 Houder
  2017-11-28  7:21 ` Houder
  0 siblings, 1 reply; 21+ messages in thread
From: Houder @ 2017-11-25 13:23 UTC (permalink / raw)
  To: cygwin

Hi,

Anyone seeing this as well? sort goes berzerk on my system when piped into
head (or less) when it is fed with a 'specially prepared' input file.

 - only happens on x86_64
 - does not happen for 'LC_COLLATE=C sort tt | head'

'specially prepared' input file? (see bottom of post).

Henri

64-@@ sort tt | head
abcde    1xxxxx0123456789
abcde    2xxxxx0123456789
abcde    3xxxxx0123456789
abcde    4xxxxx0123456789
abcde    5xxxxx0123456789
abcde    6xxxxx0123456789
abcde    7xxxxx0123456789
abcde    8xxxxx0123456789
abcde    9xxxxx0123456789
abcde   10xxxxx0123456789
 <==== prompt does not return
 note: sort.exe cannot be killed using 'kill -9'
 note: sort.exe is using a high amount of CPU ... (loop?)
 note: file tt is obtained as follows ./genfl.sh > tt (see bottom of post)

# sort is terminated from another instance of bash, using:
64-@@ taskkill /f /im sort.exe
SUCCESS: The process "sort.exe" with PID 3680 has been terminated.

-----
64-@@ uname -a
CYGWIN_NT-6.1 Seven 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin

64-@@ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=

64-@@ cat genfl.sh
#!/bin/bash

# sorting seems not to obey LC_COLLATE=en_US.UTF-8

awk '
#BEGIN  { cnt = 4000 }
#BEGIN  { cnt = 5000 }
#BEGIN  { cnt = 5050 } # sort going berzerk
#BEGIN  { cnt = 5500 } # sort going berzerk
#BEGIN  { cnt = 6000 } # sort going berzerk
#BEGIN  { cnt = 8000 } # sort going berzerk
BEGIN   { cnt = 8150 } # sort going berzerk
#BEGIN  { cnt = 8200 }
#BEGIN  { cnt = 8500 }
#BEGIN  { cnt = 9000 }
#BEGIN  { cnt = 10000 }
#BEGIN  { cnt = 12000 }
#BEGIN  { cnt = 16000 }
END     {
          for (i = 1; i <= cnt; i++) {
            str = "0123456789"
            printf "abcde%5dxxxxx%s\n", i, str
          }
        } ' /dev/null

=====


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-11-30 11:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 13:23 sort utility goes berzerk (x86_64) Houder
2017-11-28  7:21 ` Houder
2017-11-28  9:03   ` Corinna Vinschen
2017-11-28 10:59     ` Houder
2017-11-28 13:38       ` Doug Henderson
2017-11-28 14:54         ` Houder
2017-11-28 17:12         ` Houder
2017-11-28 18:55           ` Andrew Schulman
2017-11-28 20:50             ` Houder
2017-11-29  0:02               ` Andrew Schulman
2017-11-29 19:45               ` Achim Gratz
2017-11-30 11:18                 ` Houder
2017-11-29 22:39           ` Brian Inglis
2017-11-30  0:44             ` Houder
2017-11-30  8:51               ` David Macek
2017-11-30 10:28                 ` Houder
2017-11-28 13:12     ` Houder
2017-11-28 13:27       ` cyg Simple
2017-11-28 14:42         ` Houder
2017-11-28 15:42     ` EXTERNAL: " Wells, Roger K.
2017-11-28 16:56       ` Houder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).