[Vm-dev] [COG] Random crash with markAndTrace

Eliot Miranda eliot.miranda at gmail.com
Tue Dec 14 17:28:40 UTC 2010

Hi Mariano,

On Tue, Dec 14, 2010 at 3:10 AM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

> Hi folks. I have a crash in Cog, and I am not sure if it is "my fault" or
> not. Basically, it crashes while during the markAndTrace of an
> incrementalGC.

The approach to take in cases like these is to try and construct a
reproducible test case, ideally one that doesn't require user operations
like selecting text and clicking mouse buttons, but one that can be run from
the command line.  I like to try and write them as doits that save an image
and then evaluate an expression.  e.g.

    Smalltalk saveAs.

constructs an image that will reliably raise the divide-by-zero exception.
 So try and narrow down what causes the crash and then construct some doits.
 Once the doits seem to be reliably crashing teh system then try the
Smalltalk saveAs.  self doSomethingEvil approach.

Once you have a reproducible case the process of apportioning blame can
commence ;)


> In my case, it always fails in the method #startObj , here:
> startObj
>     "Start tracing the object 'child' and answer the next action.
>      The object may be anywhere in the middle of being swept
>      itself. See comment in markAndTrace for explanation of
>      tracer state variables, and aComment for gory details."
>     | header lastFieldOffset |
>     <inline: true>
>     statMarkCountLocal := statMarkCountLocal + 1.
>     ((self oop: child isLessThan: youngStartLocal) "old object; skip it"
>      or: [((header := self longAt: child) bitAnd: MarkBit) ~= 0]) "already
> marked; skip it"
> when it does the if..
> In C is:
> if (((((usqInt) child)) < (((usqInt) youngStartLocal)))
>              || ((((header1 = longAt(child))) & MarkBit) != 0)) {
> child is 1887948912
> youngStartLocal is 466502688
> I attach a screenshot with the XCode GDB.
> Thanks for any help in advance
> Mariano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101214/f0ee610c/attachment.htm

More information about the Vm-dev mailing list