[squeak-dev] How do I debug synchronization problems?

Johan Björk jbjoerk at gmail.com
Mon Apr 28 14:52:48 UTC 2008


Hi everyone,

First: sorry for the long email, I have no clue what is going on.

Some background information:
I'm running one client to a KomServices TcpService server in squeak
3.9 (MacOSX). I've been doing stresstesting on my server for a while,
but previously I never tried to use Squeak at the same time.
Today I started using the Process browser to debug another problem,
(thanks gokr!) , and noticed that if I opened the Process browser when
running a stresstest, I got the most obscure problems.

Now to the problems:
First off, I really have NO IDEA what is going on, nor how to debug
this. so I'll just plainly state what I see happening, and then
someone better then me might be able to explain this, and tell me what
more information you guys need:

Starting the process browser, MOST cases, instead of receiving a
process browser window, I get a "random" error.

"Random" a bit more specified:
Mostly I get Syntax error errors, such as:
------------------------------------------
grimReaperProcess
	"This is a process which waits for the death of a child OSProcess, and
	informs any dependents of the change. Use SIGCHLD events if possible,
	otherwise a Delay to poll for exiting child processes."

	| event processSynchronizationDelay |
	^ self canAccessSystem
		ifTrue:
			[event := (self canAccessSystem and: [self canForwardExternalSignals])
				ifTrue: [self sigChldSemaphore]
				ifFalse: [Delay forMilliseconds: 200].
			processSynchronizationDelay := Delay forMilliseconds: 20.
			grimReaper ifNil:
				[grimReaper Period or right bracket expected ->
------------------------------------------
parse: sourceStream class: class noPattern: noPattern context: ctxt
notifying: req ifFail: aBlock
        Unmatched comment quote ->"Answer a MethodNode for the
argument, sourceStream, that is the root of
        a parse tree. Parsing is done with respect to the argument,
class, to find
        instance, class, and pool variables; and with respect to the argument,
        ctxt, to find temporary variables. Errors in parsing are r
--------------------------------------------------------

I also sometimes receive messageNotUnderstood errors, (but I don't
have any stacktrace for that, it seems the current image didn't have
the HTML exporter installed, and I got other exceptions afterwards)
for example:
Parser>>parseError

I guess I'm accessing some operation which I'm not allowed to concurrently.
Since I don't know where I'm to look, I'll state some things I do and
hopefully someone can point me in the right direction:
Everything in my application is "singlethreaded" ie, it's only one
concurrent connection.
I'm NOT using Morphic
I'm accessing the #Smalltalk to convert Symbols to classes.
I'm using perform: on my own object
I'm using instVarNames and classVarNames on about every object in the system
I request sub and superclasses for about every object in the system
I request sourcecode for both class and instance methods for about
every object in the system (sourceCodeAt: #method)
I'm never writing or changing anything, all my operations are "read only".

Thanks in advance
/Johan



More information about the Squeak-dev mailing list