This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sort utility goes berzerk (x86_64)


On Wed, 29 Nov 2017 15:39:45, Brian Inglis 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?

Brian and Achim, thanks for the interest in this peculiar problems.

Currently my Windows 7 is not much of a tool to me. I have ripped out about
everything in an attempt to find the cause of the weird behaviour of sort.

Ripped out everything? Visual Studio (and anything related to it), Firefox,
F-Secure (virusscanner), etc., etc., etc. ...

However, sort still behaves in the same weird manner.

That is, NOT if invoked as follows (in a script):

#!/bin/bash
trap "" PIPE # make sort ignore the SIGPIPE signal
export LC_COLLATE=en_US.UTF-8
exec /usr/bin/sort ${1+"$@"} 2> /dev/null

.. meaning if SIGPIPE is ignored by sort (which would kill it otherwise),
it will notice the broken pipe while writing, and terminate itself.

What also amazes me, is the stack dump of the 'sort thread', which I got
using the Process Explorer by Mark R.

ntoskrnl.exe!memset+0x61a
ntoskrnl.exe!KeWaitForMultipleObjects+0xd52
ntoskrnl.exe!KeWaitForSingleObject+0x19f
ntoskrnl.exe!PoStartNextPowerIrp+0xbd0 <==== ?????
ntoskrnl.exe!PoStartNextPowerIrp+0x186d <==== ?????
cygwin1.dll!reent_data+0x5f0
cygwin1.dll!acl_get_perm+0x9aa1
cygwin1.dll!_getreent+0x1097
sort.exe+0x5319
sort.exe+0x103e0
cygwin1.dll!cygwin_dll_init+0x11c2
cygwin1.dll!setprogname+0x35c3
cygwin1.dll!setprogname+0x3674

This is the stack dump of sort when it occupies the core completely, and
has become unresponsive.

I do not know anything about the internals of Windows, but it amazes me
to see 'a power related function call' on the stack of sort.

> Have you checked for permissions problems on $TMPDIR if set, or /tmp?

Yes, all these things have been checked by me ...

Henri

(message sent from Fedora, as I cannot currently use Windows 7)

=====


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]