VM crash

David T. Lewis lewis at mail.msen.com
Sun Jun 4 13:48:11 UTC 2006


On Sun, Jun 04, 2006 at 01:12:12PM +0100, Bob.Cowdery at CGI-Europe.com wrote:
> Hi all,
> 
> I do hope someone can help me out here because it's a real stopper for my
> app. I was getting sporadic VM crashes when calling my plugin, which I have
> now got down to a very small subset of code to reproduce the problem. The
> crash dump never has a stack trace and sometimes it fails so bad no dump is
> produced. Essentially what I have is a 'C' method that returns and array of
> 4096 float values. I have taken away all the application C code and simply
> load and return an array, so I am quite sure it's not the C code that's
> breaking but somewhere in the C/Squeak interface. Here is what I have
> (stripped to minimum for clarity). For testing I am running this flat out in
> a loop. If I run 100,000 iterations I will usually but not always get a
> crash. Is there anything I can do to isolate this a bit further?

Run your VM in a debugger if possible. I have not tried this on Windows,
but there is a gdb debugger in the cygwin tools that should work for this.
If you can get the VM to crash while running under a debugger you should
get some clues as to what was going on.

I'm not too familiar with the SmartSyntaxInterpreterPlugin, but I don't
see anything obviously wrong with what you are doing. As a general
rule though, intermittent memory-related crashes can be the result of
the Squeak garbage collector moving object pointers while your primitive
is running. Double check all of your primitive code to make sure that
it is not doing anything that allocates new objects (such as allocating
an array object in the primitive itself). If you are doing anything like
this, you need to protect any object pointers that you are using with
#pushRemappableOop: and #popRemappableOop.

I don't see this in the code that you supplied, but I mention it because
it's a common cause of intermittent problems in primitives.

Dave




More information about the Squeak-dev mailing list