unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: "Andy Wingo" <wingo@pobox.com>, "Ludovic Courtès" <ludo@gnu.org>
Cc: "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: Re: allocation within critical sections
Date: Thu, 16 Feb 2012 18:46:02 -0800 (PST)	[thread overview]
Message-ID: <1329446762.84665.YahooMailNeo@web37906.mail.mud.yahoo.com> (raw)
In-Reply-To: <874nuqpg6k.fsf@pobox.com>

> From: Andy Wingo <wingo@pobox.com>

>>  Can you explain what happens here?  Is it a deadlock?  What’s at
>>  ports.c:575?
> 
> It was a deadlock, but I fixed it.  It was something that locked all
> weak sets, but while doing so allocated memory.  Allocating memory ran
> finalizers which tried to manipulate the port set, but that lock was
> already taken: deadlock.
> 
> The solution will be to run finalizers in a separate thread, as the JVM
> does.

As an aside, I can get a similar sort of deadlock during garbage
collection of SMOBs if my smob_free function calls a scheme function.
But the manual does note that you should not call any functions in 
SMOB GC finalizers, so that wouldn't happen if I actually followed the
instructions.

-Mike



  reply	other threads:[~2012-02-17  2:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 19:15 allocation within critical sections Andy Wingo
2012-02-13 10:38 ` Andy Wingo
2012-02-13 15:29   ` Andy Wingo
2012-02-16 21:30 ` Ludovic Courtès
2012-02-16 22:27   ` Andy Wingo
2012-02-17  2:46     ` Mike Gran [this message]
2012-02-17  8:16       ` Andy Wingo
2012-02-17 10:32         ` Mike Gran
2012-02-17 15:20           ` Andy Wingo
2012-02-17 22:59             ` Ludovic Courtès
2012-02-19  9:42               ` Andy Wingo
2012-02-19 20:56                 ` Ludovic Courtès
2012-02-19 21:29                   ` Andy Wingo
2012-02-24 15:04               ` Andy Wingo

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=1329446762.84665.YahooMailNeo@web37906.mail.mud.yahoo.com \
    --to=spk121@yahoo.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.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).