4.3.1 How to Interrupt Execution?

It may happens that Pharo seems to freeze. A typical example is when the system goes into a infinitive loop. In such and similar cases, you may want to stop the current execution. There is a combination of keys for such interruption:

Operating systemKeys

By pressing this key it will interrupt execution in the UI process, and will bring up a Debugger at the current point of execution.

If the interrupt key doesn't work, then the VM may have frozen (rare), or possibly a higher-level Pharo process is running and won't let you interrupt it. If you can repeat the problem, sometimes opening a Process Browser and turning on the CPUWatcher (right click, "start CPUWatcher" ) may help to track things down.

User Contributed Notes

andreas.brodbeck (18 February 2015, 7:01 am)

If you have a saved image, where the UI is frozen, this trick helped me out:


(It happened to my image, where there was a Semaphore deadlock within an UI-Process with another non-UI process (seaside), while resolving a network name. The image was saved periodically from a background job, so the frozen UI got saved to disk).


Solution: Before starting the VM remove the PharoV10.sources file, then on startup pharo will check the existence of that file and will prompt an error dialog. Then the UI is reactive again and I could open a Process Browser and terminated some processes and gave a "signal semaphore" on the deadlocked process.

peter.h.meadows (31 January 2013, 11:55 am)

Send kill signal: If your image hangs and you are lucky, the interruption key will help you. If you are not, then you have a different way to know what was happening. You can KILL the VM by sending a special signal and the VM will print the Smalltalk stacktrace of the current processes in the OS console (stdout) or in a .dump file (located in the image path). This is a good last resort when nothing else is working. For this trick, you have to be using latest Cog VM since it is quite new I think. Example:


kill -s SIGUSR1 4943


Where 4943 is the PID of the VM you want to kill.


(from: http://marianopeck.wordpress.com/2012/05/19/pharo-tips-and-tricks/)

Add a Note

Licensed under Creative Commons BY-NC-SA | Published using Pier |