[Vm-dev] Re: [squeak-dev] OSCog updated

David T. Lewis lewis at mail.msen.com
Sun Jun 27 14:07:25 UTC 2010

On Sun, Jun 27, 2010 at 06:05:48AM -0700, Eliot Miranda wrote:
> On Sat, Jun 26, 2010 at 10:48 PM, Lukas Renggli <renggli at gmail.com> wrote:
> >
> > How can I further debug this? I cannot reproduce it with the tests. It
> > only happens (randomly) when using Seaside through the webbrowser.
> >
> I suspect this will be the nanosleep in the heartbeat (there are
> perror("nanosleep")'s in platforms/unix/vm/sqUnixHeartbeat.c and in
> platforms/unix/vm-display/sqUnixXdnd.c.  First step is to add a line number
> to perror, e.g.
>     perror("nanosleep" " " __stringifyNum(__LINE__))
> (__stringifyNum is in platforms/Cross/vm/sqAssert.h)
> Then drill down further.  The above is very interesting.  I also see this
> occasionally but only on linux.  Any and all unix experts please feel free
> to look over my code in platforms/unix/vm/sqUnixHeartbeat.c and see if I've
> done anything stupid.

Second step: Compile with gcc optimization turned off completely and see
if the problem goes away.

I don't see anything obviously wrong, but the problem is likely related
to the mix of pthreads and signal scheduling. Is tickCheckInProgress
really thread safe after gcc is done optimizing it?

Note to self: The #forkSqueak mechanism in OSProcess turns off timer
signals before the fork and reenables them afterwards in both parent
and child. This presumably will need to be done differently for Cog.


More information about the Vm-dev mailing list