Re: sort utility goes berzerk (x86_64)
- Date: Tue, 28 Nov 2017 06:37:39 -0700
- From: Doug Henderson <djndnbvg@xxxxxxxxx>
- Subject: Re: sort utility goes berzerk (x86_64)
On 28 November 2017 at 03:59, Houder wrote:
> On 2017-11-28 10:03, Corinna Vinschen wrote:
>> On Nov 28 08:21, Houder wrote:
>>> On 2017-11-25 14:23, Houder wrote:
>>> > 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).
>>> Anyone ** NOT ** seeing this?
>> Yes. I just tried it under tcsh and bash with 6000, 8000, and 8150 lines,
>> and it works for me. LANG=en_US.UTF-8 implies LC_COLLATE=en_US.UTF-8
>> but I also set LC_COLLATE explicitely and retried. sort tt | head
>> always prints
>> abcde 1xxxxx0123456789
>> abcde 2xxxxx0123456789
>> abcde 3xxxxx0123456789
>> abcde 4xxxxx0123456789
>> abcde 5xxxxx0123456789
>> abcde 6xxxxx0123456789
>> abcde 7xxxxx0123456789
>> abcde 8xxxxx0123456789
>> abcde 9xxxxx0123456789
>> abcde 10xxxxx0123456789
>> and then returns to the prompt.
> Corinna, thank you for trying !!!!!
> But that is curious ... I only send my initial post after having verified
> my system (Cygwin).
> As I got no response to my initial post, I decided it had to be "me". For
> that reason I once more scrutinized? my system (Cygwin).
> Among others:
> - downloaded the base packages (from my favorite mirror) into a separate
> repo (directory on my system)
> - installed Cygwin (base packages) into a new directory.
> All using setup! The outcome was the same. It came as a surprise to me.
> I will attach cygcheck-minsrv.out (for _anyone_ who is willing to take a
> look at it). I did not spot anything "funny" in there.
Q0. What is the value of PATH reported by "printenv PATH"? Just to
verify it matches the cygcheck reported path, and to confirm that
cygwin directories proceed windows folders.
Q1. What is output of "which -a sort"? Is there only one sort in the path?
Q2. What is output of "sort --version"? Confirm if it is "sort (GNU
Q3. What happens when you run "sort --check FILE" on a problem file?
Q4. After you kill a hung sort, are there files left over in /tmp? I
am wondering if the problem files are too big to do an in-core sort,
and something goes wrong when it switches to a temp file sort, but not
for smaller or larger input files where it correctly predicts which
type of sort it needs to do. Possibly using the "--buffer-size=N"
option will change the behavior, making smaller input files fail and
failing ones work.
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple