GNU bug report logs - #14327
sort: random hangs executing coreutils 8.21

Previous Next

Package: coreutils;

Reported by: Kevin Wills <kevinmwills <at> hotmail.com>

Date: Wed, 1 May 2013 15:47:01 UTC

Severity: normal

Tags: moreinfo

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chen Guo <chen.guo.0625 <at> gmail.com>
To: Kevin Wills <kevinmwills <at> hotmail.com>
Cc: 14327 <at> debbugs.gnu.org
Subject: bug#14327: I am getting random hangs executing coreutils 8.21 sort.
Date: Sat, 4 May 2013 23:08:02 -0700
Hi Kevin,
On Wed, May 1, 2013 at 7:02 AM, Kevin Wills <kevinmwills <at> hotmail.com> wrote:
> THREAD #1
>
> (gdb) bt 20
> #0  0x0000003675c07ba5 in pthread_join () from /lib64/libpthread.so.0
> #1  0x0000000000406d92 in sortlines (lines=0x2af4898c1b50, nthreads=1, total_lines=3913269, node=0x1dbf37b0, queue=0x7fffb16a4b80, tfp=0x1dbf32a0,
>     temp_output=0x1dbf323d "/tmp/TEST.20100129.1367347586.5d6b2b011bb90cc1/sortrg8yHh") at src/sort.c:3587
> #2  0x0000000000406d83 in sortlines (lines=0x2af48b69ccf0, nthreads=2, total_lines=3913269, node=0x1dbf35b0, queue=0x7fffb16a4b80, tfp=0x1dbf32a0,
>     temp_output=0x1dbf323d "/tmp/TEST.20100129.1367347586.5d6b2b011bb90cc1/sortrg8yHh") at src/sort.c:3585
> #3  0x0000000000407191 in sort (files=0x6185b8, nfiles=0, output_file=0x0, nthreads=4) at src/sort.c:3917
> #4  0x00000000004093a6 in main (argc=10, argv=0x7fffb16a5238) at src/sort.c:4702
>

Took a quick look, noticed the above call stack is suspicious. The last call
to sortlines before the pthread_join() is invoked with nthreads = 1, while
in code sortlines would only call pthread_join() if nthreads > 1.

I confirmed this in the disassembly as well to rule out the unlikely
possibility this was the result of some compiler optimization (I used -O2).

Did you compile this yourself or was it distributed with your system?




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

Previous Next


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