caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Baelde <david.baelde@gmail.com>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: Caml Mailing List <caml-list@yquem.inria.fr>,
	"Savonet's developpers list" <savonet-devl@lists.sourceforge.net>
Subject: Re: [Caml-list] Re: Random segfaults / out of memory
Date: Tue, 30 Mar 2010 01:14:32 -0600	[thread overview]
Message-ID: <53c655921003300014s2c7b05eax24b91edbb0d0d9ec@mail.gmail.com> (raw)
In-Reply-To: <874okd2907.fsf@frosties.localdomain>

On Thu, Mar 18, 2010 at 4:56 AM, Goswin von Brederlow <goswin-v-b@web.de> wrote:
> This is a tricky situation. The md5_update_bigarray() on its own is a
> "noalloc" function. But due to the caml_enter_blocking_section() another
> thread can alloc and trigger a GC run in parallel. So I guess that makes
> the function actually not "noalloc".

Thanks for reporting about your experience! This made me suspect
noalloc in a bug of mine, and indeed removing a bunch of noalloc did
the trick. Now I'd like to understand.

Unlike in your example, global roots were registered for the bigarrays
in "my" functions. This should avoid that they are freed when the
global lock is released. Still, noalloc seems wrong with those
functions.

I'm not sure yet which function is problematic in my case, but they
all follow the same scheme, see for example
<http://savonet.rastageeks.org/browser/trunk/liquidsoap/src/stream/rgb_c.c#L563>.

So, is it really forbidden to release the global lock in a noalloc function?

Cheers,
-- 
David


  reply	other threads:[~2010-03-30  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17  8:27 Rewriting the Digest module causes linking errors Goswin von Brederlow
2010-03-17  8:39 ` [Caml-list] " Mark Shinwell
2010-03-17  9:53   ` Goswin von Brederlow
2010-03-17 16:39     ` Random segfaults / out of memory [Was: Re: [Caml-list] Rewriting the Digest module causes linking errors] Goswin von Brederlow
2010-03-18 10:56       ` Random segfaults / out of memory Goswin von Brederlow
2010-03-30  7:14         ` David Baelde [this message]
2010-03-30 15:57           ` [Caml-list] " Xavier Leroy
2010-03-30 16:19             ` Markus Mottl

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53c655921003300014s2c7b05eax24b91edbb0d0d9ec@mail.gmail.com \
    --to=david.baelde@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=david.baelde@ens-lyon.org \
    --cc=goswin-v-b@web.de \
    --cc=savonet-devl@lists.sourceforge.net \
    /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 NNTP newsgroup(s).