Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Dec 1999 17:19:16 -0800
From:      Jason Evans <jasone@canonware.com>
To:        "Richard Seaman, Jr." <dick@tar.com>
Cc:        hackers@freebsd.org
Subject:   Re: Cancellation points in Linuxthreads
Message-ID:  <19991228171916.T39990@sturm.canonware.com>
In-Reply-To: <19991228180153.B290@tar.com>; from dick@tar.com on Tue, Dec 28, 1999 at 06:01:53PM -0600
References:  <19991228180153.B290@tar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 28, 1999 at 06:01:53PM -0600, Richard Seaman, Jr. wrote:
> The new version of linuxthreads now seems extend cancellation points
> into libc.  However, it does so in a manner that threads can get
> cancelled within libc with libc holding internal locks, resulting
> in deadlock.
> 
> I think the following example program demonstrates this.  It works
> under libc_r, because libc_r carefully unwinds any internal locks
> created within libc.  Linuxthreads does not have this capability,
> and the sample program deadlocks (at least it does here).

It probably isn't currently reasonable to do cancellation points correctly,
partially correctly, or even partially, without causing the deadlocks that
you point out.  I knew that the cancellation points were extended into
libc, but it didn't occur to me that it would cause the deadlocks.  I'm
inclined to completely remove the cancellation points from the linuxthreads
port until we have better support available in libc.  Any objections?

It's clear that we need to add additional entry points to libc in order to
support cancellation points, as well as to allow creation of a real
libpthread, rather than libc_r.  This is getting close to the top of my
priority list now, but my experience in such things is limited, so it will
be quite a learning experience.  In other words, it could take me a long
while, and if any more knowledgeable person would like to take this job, I
wouldn't complain. =)

Jason


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991228171916.T39990>