This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
RE: pthread_cond_wait() hangs when cancelled (sometimes)
- From: Simon Falsig <simon at newtec dot dk>
- To: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- Cc: libc-help at sourceware dot org
- Date: Fri, 22 Mar 2013 08:27:38 +0100
- Subject: RE: pthread_cond_wait() hangs when cancelled (sometimes)
- References: <3f3c3faa90f09efadc04e477a887d3b9 at mail dot gmail dot com> <CAAHN_R0QhMrfkGFrDcZXE8XV5zY7w-ew7mqzLPqmUF2_38SbuA at mail dot gmail dot com>
> 19 March 2013 14:30, Simon Falsig <simon@newtec.dk> wrote:
> > My system:
> > An embedded AMD-Fusion platform (dual-core) Linux 3.2.9-rt16 kernel
> > OSELAS cross toolchain 2011.11.3
> > (platform-i686-unknown-linux-gnu-gcc-4.6.2-glibc-2.14.1-binutils-2.21.
> > 1a)
> > - with the "Fix exception table for i386 pthread_cond_wait" patch
> > applied
> > (http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=55a051c985c3e79
> > 65a2
> > f5dd5f762ac2737adae01)
>
> IIRC the patch was only for cases where you have PRIO_INHERIT. If
you're
> using vanilla conditiona wait/broadcast the you won't need it.
I know - I was the one who reported the bug that lead to the fix last year
;) And while the mutexes and condition variables that gave me problems
this time were vanilla ones, we still have PRIO_INHERIT mutexes other
places in our application - so the fix is still necessary.
>
> > I'm currently about to try out a newer version of the toolchain, but
> > in the meantime, if anyone has any idea about what might be going on,
> > I'd be very happy to hear it. Thanks in advance!
>
> I'd do that too - build and test your program against the latest glibc
in git and
> see if you're able to reproduce the problem. If you can reproduce the
> problem, then please file a bug report so that it doesn't just get
buried in the
> archives.
I just spent the last few days getting our toolchain upgraded, and as a
few of our packages didn't want to compile on the new compiler, I ended up
just upgrading the complete system. We're now running:
Ptxdist 2013.03.0
Linux 3.4.33-rt47
OSELAS toolchain 2012.12.1 (gcc-4.7.2-glibc-2.16.0-binutils-2.22) (still
with the exception table fix applied)
Everything seems to be working, and I haven't been able to reproduce the
hanging threads since.
So thank you for your answer - and I apologize for the false alarm;)
Best regards,
Simon Falsig