From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: Signal thread
Date: Tue, 28 Jun 2011 21:52:01 +0200 [thread overview]
Message-ID: <87aad1u42m.fsf@pobox.com> (raw)
In-Reply-To: <87tyb9oqdp.fsf@inria.fr> ("Ludovic Courtès"'s message of "Tue, 28 Jun 2011 18:46:42 +0200")
Greets!
On Tue 28 Jun 2011 18:46, ludo@gnu.org (Ludovic Courtès) writes:
> 2007-10-20 Julian Graham <joolean@gmail.com>
>
> Add support for thread cancellation and user-defined thread
> cleanup handlers. Small rework by Ludovic Courtès.
Ah, right. I suppose it's disrespectful to have a moment of silence for
CVS, given that people still use it, but I don't miss its inability to
distinguish authors from committers.
> <http://lists.gnu.org/archive/html/guile-devel/2007-10/msg00029.html>:
>
> * If the signal delivery thread got launched a little bit too late, it
> could be holding its startup mutex and then attempt to grab the
> thread_admin_mutex, which could be held by a thread that was in the
> process of being canceled and which was trying to obtain the signal
> delivery thread's startup mutex. I've resolved this by forcing the
> signal delivery thread to start (if it hasn't already) during thread
> cancellation of any thread.
>
> At first sight it still holds.
>
> I checked on ‘stable-2.0’ by applying
> 3b971a59b55586a236c3621a55515d9272ee5c80 and then running threads.test
> under Helgrind, which didn’t report any lock order issue. It could mean
> that I was lucky, though.
Currently scm_cancel_thread is called without any locks held, so there
should be no issues there.
We might have other locking order problems -- do_thread_exit takes the
admin lock and then the lock of a fat mutex, whereas fat_mutex_lock does
the other way around. (Yuk, fat mutexes.) Perhaps not, though.
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-06-28 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1QZiQ3-0008H5-HJ@vcs-noshell.in.savannah.gnu.org>
2011-06-27 16:00 ` Signal thread Ludovic Courtès
2011-06-27 20:44 ` Andy Wingo
2011-06-28 16:46 ` Ludovic Courtès
2011-06-28 19:52 ` Andy Wingo [this message]
2011-06-29 15:51 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aad1u42m.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).