Login  Register

Re: Pharo 8 Image blows up after restart

Posted by Eliot Miranda-2 on Dec 09, 2020; 5:35am
URL: https://forum.world.st/Pharo-8-Image-blows-up-after-restart-tp5125193p5125202.html

Hi Sabine,

> On Dec 8, 2020, at 10:49 AM, Sabine Manaa <[hidden email]> wrote:
>
> Hi,
>
> I have the following problem:
>
> sometimes, after restarting my Pharo 8 image on mac, it is not responsive
> and it blows up the memory.
>
> I tried with  commandline handler  
> eval "self halt"
> and with
> Smalltalk addToStartUpList:
>
> but both is too late - the Image starts and blows up and is not responsive.
>
> I can not interrupt it and it grows to several GB memory (eg after 20
> seconds 10 GigaByte! ) and I have to kill it.
>
> Anyone having an idea what I can do to find the reason for this?

Run the system under a low level debugger (lldb, gdb).
Put a break point on the function sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto, which is called when the heap must grow to allocate new objects.
When the system hits the breakpoint for the second or third time call the function
printCallStack()
and be patient; it will print a lot of stack.

There is also a command line argument to limit the maximum size of the heap. So an alternative might be to restrict the heap to a few megabytes above the image size and see if you get a crash.dmp file when the vm exits when the system runs out of memory.

HTH