[Vm-dev] Reproducible Cog crash from image startup

stephane ducasse stephane.ducasse at gmail.com
Mon Feb 27 08:31:04 UTC 2012

> Any ideas?
> The image overflows the weakRoots table in scanning stack pages.  The weakRoots table registers weak objects for scanning at the end of a GC.  It is, unfortunately, fixed size (~2600 entries), and there are lots of WeakMessageSends and WeakAnnouncementSubscriptions on the stack.  
> I found this using aDebug VM with assert enabled (i.e. compiled with NDEBUG /not/ defined).  I increased the table size to 3000 then 6000 before finding it no longer crashed with a weakRoots  table size of 12000.
> a) Looks like weakRoots' size should be configurable either via a start-up flag or an image header constant (with e.g. vmParameter accessors).
> b) overflowing the weakRoots table (and possibly other tables) should probably cause the VM to abort with a useful error message.


do you think that it can be due to heavy use of weak announcements that are not garbage collected?


More information about the Vm-dev mailing list