chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Problem with finalizers?


From: felix winkelmann
Subject: Re: [Chicken-users] Problem with finalizers?
Date: Mon, 2 May 2005 23:36:25 -0700

Hi!

As John pointed out, you should try a newer version (darcs repo
or the latest snapshot).

There still seems to be a problem when finalizers are created
faster than they can be processed. Try setting 
C_MAX_PENDING_FINALIZERS in chicken.h to a higher value (and touch
runtime.c and library.c) - I will make this a runtime parameter in
the future.


cheers,
felix


On 5/1/05, Alejandro Forero Cuervo <address@hidden> wrote:
> 
> Are finalizers actually getting called?
> 
> One of my applications recently started crashing.  After a few days of
> debugging it (it misteriously crashes at random points after it has
> been running for 40 minutes), I noticed that if I removed its use of
> the iconv egg, it wouldn't crash.  Unable to find any bugs in the
> iconv egg, I made it print the addresses of the pointers it mallocs.
> Voila: they go up and up and up until around 0xbf000000 (yes, and
> my process has a virtual memory space of around 3G) and then malloc
> starts returning small addresses and the process crashes quickly.
> 
> This crash is easy to reproduce: after use'ing srfi-1 and iconv,
> evaluate the following expression repeatedly in CSI:
> 
>   (for-each (lambda a (iconv-open "us-ascii" "us-ascii")) (iota 10000))
> 
> Watch memory usage grow up and up...
> 
> Interestingly, the following expression does not trigger the problem:
> 
>   (do () (#f) (iconv-open "us-ascii" "us-ascii"))
> 
> As a sideline, would it be too difficult to have Chicken print an "out
> of memory" message instead of crashing when no more memory is
> available?
> 
> I'm using Chicken 1.89, but I think 1.66 is affected as well (I
> upgraded to 1.89 after my application started crashing).
> 
> Thanks!
> 
> Alejo.
> http://bachue.com/alejo
> 
> ---=(  Comunidad de Usuarios de Software Libre en Colombia  )=---
> ---=(  http://bachue.com/colibri )=--=( address@hidden  )=---
> 
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>




reply via email to

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