From: "Linas Vepstas" <linasvepstas@gmail.com>
To: "Neil Jerram" <neiljerram@googlemail.com>
Cc: bug-guile@gnu.org
Subject: Re: [PATCH] Final: thread lock nesting debugging
Date: Thu, 20 Nov 2008 12:33:34 -0600 [thread overview]
Message-ID: <3ae3aa420811201033g173ffbe6r6b5b0bad6171d9c3@mail.gmail.com> (raw)
In-Reply-To: <3ae3aa420811200803u485a8fa7ia486c281da54497a@mail.gmail.com>
2008/11/20 Linas Vepstas <linasvepstas@gmail.com>:
> -- The reason for dropping the heap_mutex before grabbing
> the other lock (for example scm_i_port_table_mutex),
> is somewhat obscure, but at one point I decided that this
> was OK, and arguably correct. As I write this, I've
> forgotten why. However, this should be a focus of attention,
> and re-thought-out.
Well, a quick look reminds me of the situation: in many/most
cases, locked sections might trigger garbage collection.
Thus, the heap_mutex *must* be dropped before the lock
is taken.
My gut impression is that this is a poor design point; and
that the correct thing to do would be make locks fine-grained,
so that there is never a need to run GC while a lock is held.
This would require extensive auditing of the guile code.
--linas
prev parent reply other threads:[~2008-11-20 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 4:42 [PATCH] Final: thread lock nesting debugging Linas Vepstas
2008-11-17 13:21 ` Han-Wen Nienhuys
2008-11-18 13:26 ` Ludovic Courtès
2008-11-19 23:14 ` Neil Jerram
2008-11-19 23:21 ` Neil Jerram
2008-11-20 0:22 ` Neil Jerram
2008-11-20 16:03 ` Linas Vepstas
2008-11-20 18:33 ` Linas Vepstas [this message]
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=3ae3aa420811201033g173ffbe6r6b5b0bad6171d9c3@mail.gmail.com \
--to=linasvepstas@gmail.com \
--cc=bug-guile@gnu.org \
--cc=neiljerram@googlemail.com \
/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).