[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Final: thread lock nesting debugging

From: Linas Vepstas
Subject: Re: [PATCH] Final: thread lock nesting debugging
Date: Thu, 20 Nov 2008 12:33:34 -0600

2008/11/20 Linas Vepstas <address@hidden>:

> -- 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]