X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:date:from:to:subject:in-reply-to
	:references:message-id; q=dns; s=default; b=dfEMBUfKjxV1z6onb+XR
	86H54pyXKfEpr5v7RrBhV/6XnfRKexLqWvoKG2rz6aOTIr/dLUTopwlqWsYQPGeS
	3Yv2ebl+0KQsoCQxpxYDAfqodrz5JyMiEVD1L0jls3VK3bZOek/z3KnyI7G/5BG/
	xfz7IJ5zAB/+jwpWtWGoeBA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:date:from:to:subject:in-reply-to
	:references:message-id; s=default; bh=X6qJvPtXN8rv2TllGr7t/JBU92
	Q=; b=jNUQPj387lR3ahnj4AxMT7GvDq9NfSv3Eu6XdZHriapd0BRteDo7qJTCjf
	0HutVHUONvNh9lxURt1qOUkmP+6v/Tx5+Wji6rGOlbNcI1eg9Rx6DASXXJHohvdk
	PMFAnhh9r12qjb0/s8TIF535dIPYE0fKcVKnJOd0i0OqNuX6g=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=RETURNED, H*F:D*nl, Hx-spam-relays-external:ESMTPA
X-HELO: lb3-smtp-cloud9.xs4all.net
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 28 Nov 2017 14:12:10 +0100
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: sort utility goes berzerk (x86_64)
In-Reply-To: <20171128090329.GN547@calimero.vinschen.de>
References: <177e9f9fe723eadd4a8e41e5e032d56d@smtp-cloud9.xs4all.net> <eeee637eb6e6b01641d33930e178cbae@xs4all.nl> <20171128090329.GN547@calimero.vinschen.de>
Message-ID: <e9692e0a537954935dd0eac378bd00e3@xs4all.nl>
X-Sender: houder@xs4all.nl
User-Agent: XS4ALL Webmail
X-CMAE-Envelope: MS4wfIDJJX46/8CUkv9/hhsdW943TBKp8nDkscpWGpphgPEDoUnqNc5/xRjeFnEuNhZyBxwqbXvPIN6wWYTdRJZAO8q/sjBSTgICkIw8Imd6iRjpgp1jifqU FxCPZM9DIR9l7ipQVz3rBF21AoluEYtsvTWeTx19mbj/PV9HAIsYxVMw6o9oP3+VsEy0s9MJ2plgu4e7Z5hl85M4mx3TgG771aQ=
X-IsSubscribed: yes

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
[snip}

> and then returns to the prompt.

Just trying ... is this a clue to the cause?

Henri

64-@@ trap -p
trap -- '' SIGPIPE # ignore SIGPIPE
64-@@ sort tt | head
abcde    1xxxxx0123456789
abcde    2xxxxx0123456789
abcde    3xxxxx0123456789
abcde    4xxxxx0123456789
abcde    5xxxxx0123456789
abcde    6xxxxx0123456789
abcde    7xxxxx0123456789
abcde    8xxxxx0123456789
abcde    9xxxxx0123456789
abcde   10xxxxx0123456789
sort: write failed: 'standard output': Broken pipe # as expected
sort: write error
64-@@ <==== PROMPT RETURNED

64-@@ trap - PIPE # SIGPIPE should result in killing sort ?????
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

=====

--
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

