chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] The odd case of the channel egg's tests failures


From: Felix
Subject: Re: [Chicken-users] The odd case of the channel egg's tests failures
Date: Tue, 29 Jan 2013 21:16:01 +0100 (CET)

> I'm turning to you because I have no idea how to continue with analyzing
> a very odd behavior of my channel egg's test cases. Basically, they have
> been failing on Salmonella from the very beginning with this error:
> 
>   [panic] out of memory - heap full while resizing - execution terminated

This usually means an inconsistent heap: some random data is interpreted as 
a proper Scheme object and the header contains some huge size indicator.

> 
> The first run can be witnessed here:
> 
>   
> http://tests.call-cc.org/master/linux/x86/2012/04/04/salmonella-report/test/channel.html
> 
> AFAIK this has happened ever since. I didn't look into it much because I
> could never reproduce it. However, now that I've upgraded to Chicken
> 4.8.0.1 it started appearing on my machine, too. I've tried again with
> 4.8.0 and 4.7.0.6 and both still work fine. Then I noticed that
> Salmonella runs on x86 while I run on x86_64 locally which might explain
> the difference.
> 
> So I started experimenting to nail down the cause. This lead me to the
> insight that passing -:hs with a value > 178 makes the tests pass
> without a hitch. Passing anything lower than that makes them panic
> again. Unfortunately, I have no idea what to do with this
> information. Does anyone have a hint where to look or what to try next?

Any change in heap-size or even memory usage patterns will have influence
on the time the bug occurs. It's very difficult to track down the source
to these kind of errors (that's not much of a help, of course).

Have you tried valgrind? 

An inconsistent heap is often caused by broken foreign code that
modifies Scheme data-structures. Check your ffi bindings or wrap them
in something that logs what goes in and out.

> 
> Knowing that finalizers can cause trouble I also tried experimenting
> with the -:f option. This lead to even stranger results:
> 
>   * passing -:f100000 delays the panic until the very end of the test run
>   * passing -:f1000 makes it fail a bit earlier
>   * passing -:f10000 makes it fail even earlier (although the number is 
> higher!)
> 
> I really don't know what to make from this either.

Practically everything you do changes the usage pattern of the heap. Do you
use finalizers a lot in in this case?


cheers,
felix



reply via email to

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