GNU bug report logs - #7489
[coreutils] over aggressive threads in sort

Previous Next

Package: coreutils;

Reported by: DJ Lucas <dj <at> linuxfromscratch.org>

Date: Fri, 26 Nov 2010 19:40:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #119 received at 7489 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Chen Guo <chen.guo.0625 <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, DJ Lucas <dj <at> linuxfromscratch.org>,
	7489 <at> debbugs.gnu.org, coreutils <at> gnu.org
Subject: Re: bug#7489: [coreutils] over aggressive threads in sort
Date: Tue, 07 Dec 2010 12:24:57 +0100
Chen Guo wrote:
> Hi Professor Eggert,
> On Sun, Dec 5, 2010 at 11:01 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
>> On 12/05/2010 09:16 PM, Chen Guo wrote:
>>> Before saying anything else, I should note that for mutexes, on 4
>>> threads 20% of the time there's a segfault on a seemingly innocuous
>>> line in queue_insert ():
>>>   node->queued = true
>>
>> It does sound like mutexes are the way to go, and that this bug
>> needs to be fixed.  I assume that this is the call to queue_insert
>> from queue_check_insert_parent?  What's the backtrace?  (And
>> what patch are you using, to get mutexes?)
>>
>
>     I've attached the patch (inlined at the bottom). Here's the GDB
> crash, with backtrace. I also printed node->queued in GDB, so it's
> evident that its accessible.
>
> (gdb) run --parallel 2 rec_1M > /dev/null
> Starting program: /data/chen/Coding/Coreutils/test/sort-mutex
> --parallel 2 rec_1M > /dev/null

Hi Chen,

Thanks.  What does your input file look like?
I've been unable to reproduce the failure using the output of
seq 1000000.  I've tried a few different -S ... options, in case
the amount of available memory is a factor:

  seq 1000000 > in-1M
  for i in $(seq 1000); do \
    printf '%03d\r' $i; src/sort --parallel=2 -S 1M in-1M > /dev/null; done




This bug report was last modified 6 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.