Todd,
A relatively long time ago, I was doing some MIDI/Morphic experiments, and deliberately avoided stepping for a few reasons. High on the list was that separate threads were a better model for what I would ultimately want to do with Squeak, and IMHO were easier to understand given that multiple things were happening on their own time scales.
Making a long story short, I managed to hang Morphic in a big way, and needed a tool to debug it. I approached it with a variant of a trick I use in Dolphin, specifically for deployed executables, where I hook control-break to export call stacks on all non-dead threads. Squeak is different because the VM is (in my experience at least) interactive even if Morphic hangs. Dolphin deployed executables will hang if the message loop stops [*], leaving control-break as the escape valve. In Squeak, it appears that hacking the debug menu is sufficient. I simply replaced the dump of the active thread with all non-dead threads, IIRC, putting the active one on top. I also cleaned up the new lines a little to make the output look better. If there is interest, I can try to gather up a change set for it. It was invaluable to me in finding the problem I had, and suspect it would be useful to others.
Bill
[*] Please do not conclude that this is common, but I have encountered when COM based things failed to respond, when I managed to deadlock the GUI thread, etc. The control-break trick saved my hide a few times.
Todd Blanchard: As a point of technique - how do I do this with the UI being unresponsive?
On Oct 27, 2006, at 10:40 AM, Andreas Raab wrote:
If you see it happen you should immediately make a snapshot of the processes you have running and see if any of them might do the equivalent of what you see above. It might also be triggered by overrides in packages you use.
Cheers,
- Andreas
Wilhelm K. Schwab, Ph.D. University of Florida Department of Anesthesiology PO Box 100254 Gainesville, FL 32610-0254
Email: bills@anest4.anest.ufl.edu Tel: (352) 846-1285 FAX: (352) 392-7029
On Oct 27, 2006, at 2:09 PM, Bill Schwab wrote:
Making a long story short, I managed to hang Morphic in a big way, and needed a tool to debug it. I approached it with a variant of a trick I use in Dolphin, specifically for deployed executables, where I hook control-break to export call stacks on all non-dead threads. Squeak is different because the VM is (in my experience at least) interactive even if Morphic hangs. Dolphin deployed executables will hang if
The way to do this in Squeak without hacking the VM is to run it under gdb, trigger the slow redraw, then interrupt it from gdb. Then you can print the stack for all active threads with "call (int) printAllStacks()".
Admittedly though, this is a pretty inconvenient technique to use on something that's not easily reproducible. I find that with the debugger fix from 3.9, I can go weeks without encountering a slow redraw.
Colin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Is there any aggregated fix or changeset for 3.8/3.8.1?
Thanks in advance.
Colin Putney wrote:
Admittedly though, this is a pretty inconvenient technique to use on something that's not easily reproducible. I find that with the debugger fix from 3.9, I can go weeks without encountering a slow redraw.
Colin
squeak-dev@lists.squeakfoundation.org