chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Heap size calculation in rereclaim2


From: Peter Bex
Subject: Re: [Chicken-hackers] Heap size calculation in rereclaim2
Date: Sat, 24 Oct 2015 21:19:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Oct 17, 2015 at 04:58:06PM +0200, Peter Bex wrote:
> Well, here's a bunch of patches to fix this issue (#1221) as well as a
> handful of memory-related issues.  I still haven't managed to pinpoint
> the crashes we're seeing on Salmonella, but this is a separate issue
> which seems to be fixed by one of the attached patches.

OK, I've been doing some more digging, and I think I managed to figure
out why the crashes are happening.  It's extremely obscure and happens
so rarely because it relies a *lot* on the particular call pattern, and
even on timing because it gets triggered in handle_interrupt, which is
time-driven.

The strange "state vector" which we sometimes(?) use for capturing a
thread's continuation will be abused as an argvector by passing a
pointer straight into the middle of it.  This means that due to the
argvector re-use, this state vector may inadvertently mutated during
the execution of the program, but only if the "right" (wrong?) functions
are called in sequence.

Please, apply the other patches (which this mail is a reply to) first,
as I think they're pretty important as well.  Then apply the attached
patch.  It applies to both master and chicken-5.

Cheers,
Peter

Attachment: 0001-Copy-thread-state-vector-to-a-fresh-argvector-before.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

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