FAQ : Platform Support (Linux, Windows) : Q: How to interrupt the VM and dump all running Smalltalk processes stacks?
Q: How to interrupt the VM and dump all running Smalltalk processes stacks?
Problem
When my Smalltalk image becomes unresponsive, .it would be helpful not only to terminate it but also to learn about where it is hung up.
Solution
When you open a VAST Platform development image (without the "-no_break" argument), a button labeled "Break" appears on the bottom right of the screen. Clicking the button attempts to interrupt the running Smalltalk process and bring a Debugger with the stack of that process at the point it was interrupted. This is very useful for when the image looks "hung" or not responding. However, sometimes, depending on what is going on, it may not be possible to interrupt the process from that button. The reason is that this interruption is being tried from Smalltalk image side rather than the Virtual Machine side.
New with VAST 10.0.0, there is a new way in which the Virtual Machine can be directly interrupted (without going through Smalltalk). This allows interrupting any kind of "hung". The result is that the VM gets interrupted, the stacks of all running Smalltalk processes are dumped into the VM standard output and then the VM just resumes and keeps running.
The way to trigger this interruption is different in Windows and Linux.
Linux: from the command line, execute "sudo kill -SIGQUIT XXX" where XXX is the main VM process. On Linux, VAST launches like 3 processes...be sure to be sending the kill to the correct PID... this is easy because its the one shown in the console when starting the image or because it's the parent of the other 2.
Windows: First, you must start VAST from a CMD console (either manually or by specifying -lCON argument at startup). Second, you must have Mouse/Keyboard focus on that CMD console (not in VAST) and hit Ctrl+Break keys. You don't have a Break key in your keyboard? Don't worry: you can use a "On-Screen Keyboard". In this case, you may not even have a "Break" button either in there but "Pause" will work (be sure NumLock is not enabled)... So...with NumLock disabled, holding Ctrl + "Pause" should do it.
Last modified date: 02/27/2021