[BUG] Something locks up when trying to print

Henrik Gedenryd h.gedenryd at open.ac.uk
Wed Dec 5 11:14:41 UTC 2001


Henrik Gedenryd wrote:

> Since 3.2 seems imminent, I have a bug to report which is pretty serious in
> my view.
> 
> Sometimes when my code tries to write to the Transcript, nothing will
> happen. IIRC, when pressing cmd-. to interrupt, from the text in the
> debugger window it turns out that there is a Weak-soemthing-or-other or a
> semaphore (or something to that effect, my memory is not very clear on this)
> that is holding a lock on some entity and that prevents things from
> happening.
> 
> The bad part is that now you are in trouble. This thingy will at this point
> hold a lock to stop many things, including the shutdown cycle, which means
> that the only way to exit Squeak is to force-terminate it from the OS.
> 

Now I can reproduce this problem (warning: this will cause Squeak to
eventually hang): In something recent, open a file list, look at a text
file, and make a small change to it. Now accept it (cmd-s), but choose
cancel when asked whether to overwrite or not.

You are now in trouble ;-) From this point, to quit Squeak you will have to
terminate the VM from the outside.

Press cmd-. to get a walkback, the system has locked when trying to write
into SqueakDebug.log -- which also means that I don't have a stack trace to
provide here. It is however stuck in Semaphore>> critical:ifError: due to a
lock on some WeakRegistry object it is trying to print into the log file.

At this point the FileStream's collection (string) holds 'a
Dictionary(#Registry->a WeakRegistry(              '.

I'm won't try to provide more info here as the bug causes all sorts of
debugging problems--it's better to generate the condition and dig from
there.

I get this as early as in 4461, but not in 4411, where you get a nice 'close
this to abort' notifier instead. It seems that the new logError
functionality might be a likely candidate.

Henrik





More information about the Squeak-dev mailing list