[squeak-dev] Release image format (was: "Future Directions" welcome workspace)

David T. Lewis lewis at mail.msen.com
Sun Jun 16 21:15:19 UTC 2013


On Sun, Jun 16, 2013 at 10:30:22PM +0200, Nicolas Cellier wrote:
> 
> 2013/6/16 Levente Uzonyi <leves at elte.hu>
> >
> > I think that's the normal behavior. Why should a primitive call "pollute"
> > the Smalltalk stack if it doesn't fail? The recently used primitives are
> > listed separately.
> >
> You said "if it doesn't fail", that's precisely the point, we got a
> crash.dmp so something presumably failed.
> I understand that we should distinguish if failure occured inside
> primitive, or in fallback code.
> But even if primitive was called recently, what tells me we were inside it
> when the VM crashed?

The first thing you see in the dump is this:

  Segmentation fault Wed May  8 14:03:37 2013

That is a C pointer dereferencing problem that almost certainly happened
within a primitive. The only other possibility would be if it happened during
execution of the interpreter, but we know that this error is associated with
large integer functions so it presumably is happening while executing a primitive.

> If you are right, then the dump is not informative enough.

The dump cannot really detect why a C pointer was invalid. All we can say
is that a primitive was treating some data as a C pointer, and it was assuming
that it was safe to do so. For some reason, that data did not represent a
valid address, and dereferencing it as a pointer caused a segmentation fault.

> >
> > All senders of #\\\ in my image have your initials. It's a bit suspicious
> > that Integer >> #reciprocalModulo: doesn't normalize v after the loop, but
> > it's possible that #- will do it anyway. In the other user - Integer >>
> > #slidingLeftRightRaisedTo:**modulo: - the result is normalized via
> > #normalize.
> >

Given that we have intermittent failures that seem to be associated with
data that a primitive is assuming to be safe to treat as a C pointer, it
might be worth adding #normalize to reciprocalModulo: and see if this makes
the problem go away.

Dave



More information about the Squeak-dev mailing list