+vm-dev
Hi Eliot,
On Mac and Linux one can get a stack trace from a busy VM with the USR1 signal. Is there an analog on Windows?
Ryan
Alas I don't know a mechanism to deliver an interrupt. If there's a mechanism I can implement the stack trace. Anyone have any suggestions?
Eliot (phone)
On Aug 31, 2014, at 11:15 AM, Ryan Macnak rmacnak@gmail.com wrote:
+vm-dev
Hi Eliot,
On Mac and Linux one can get a stack trace from a busy VM with the USR1 signal. Is there an analog on Windows?
Ryan
On Sun, Aug 31, 2014 at 7:16 PM, Ben Coman btc@openinworld.com wrote:
Ben Coman wrote:
Eliot Miranda wrote:
Alas I don't know a mechanism to deliver an interrupt. If there's a mechanism I can implement the stack trace. Anyone have any suggestions? Eliot (phone)
Does the cygwin `kill` command work with USR1 when run from a cmd.exe prompt? Could that executable just be included with distributions in the same folder as the VM?
AFAIR no.
Just for reference, Apache simulates USR1 with its own program ([1] search for 'equivalent')
That jives with what David said. So looks like we need to buld above SendNotifyMessage. Thanks for your searches Ben!
I'm not very familiar with this area, but I poked around for interest and
summarize a few findings. Sorry I'm not set up to experiment with them myself.
The UNIX Application Migration Guide [2] provides some alternatives (click 'Signals and Signal Handling') Someone provides an alternative at [3] - but I don't follow it. There is some discussion at [4], which references [5] as a possible option. Another alternative a [6].
[1] http://httpd.apache.org/docs/current/platform/windows.html [2] http://www.zemris.fer.hr/predmeti/os1/misc/Unix2Win.htm [3] https://www.allegro.cc/forums/thread/602466 [4] http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-a... [5] http://www.latenighthacking.com/projects/2003/sendSignal/ [6] http://stackoverflow.com/questions/16826097/equivalent-to-sigint-posix-signa...
cheers -ben
On Aug 31, 2014, at 11:15 AM, Ryan Macnak rmacnak@gmail.com rmacnak@gmail.com wrote:
+vm-dev
Hi Eliot,
On Mac and Linux one can get a stack trace from a busy VM with the USR1 signal. Is there an analog on Windows?
Ryan
On Sun, Aug 31, 2014 at 03:19:05PM -0700, Eliot Miranda wrote:
Alas I don't know a mechanism to deliver an interrupt. If there's a mechanism I can implement the stack trace. Anyone have any suggestions?
Windows does not have a direct equivalent to SIGUSR1. I have no direct experience, but I gather that the recommended approach for that sort of notification would be to use SendMessage or SendNotifyMessage. Presumably this would involve writing some sort of small stand alone program to send a message to the VM, as well as a handler in the VM to accept the message.
This is based on some notes half way through this post (see "Table 4"): http://www.zemris.fer.hr/predmeti/os1/misc/Unix2Win.htm
And also the overview here: http://technet.microsoft.com/en-us/library/bb496993.aspx
Dave
Eliot (phone)
On Aug 31, 2014, at 11:15 AM, Ryan Macnak rmacnak@gmail.com wrote:
+vm-dev
Hi Eliot,
On Mac and Linux one can get a stack trace from a busy VM with the USR1 signal. Is there an analog on Windows?
Ryan
It looks like the Java VMs (IBM's at least, and probably others) handle this on Windows thus:
http://www.latenighthacking.com/projects/2003/sendsignal/
If you google "sendsignal.exe" you will find more.
This sounds like a reasonable approach to me, because sendsignal already exists in both source and binary form, and it is widely used for tech support of Java VMs. It might come from "latenighthacking.com", but I figure that if it's good enough for IBM, it's probably good enough for us too ;-)
I'm not entirely sure how the CTRL+Break would be caught on the VM side, but there may be some sample code in the link above or elsewhere.
HTH, Dave
Alas I don't know a mechanism to deliver an interrupt. If there's a mechanism I can implement the stack trace. Anyone have any suggestions?
Eliot (phone)
On Aug 31, 2014, at 11:15 AM, Ryan Macnak rmacnak@gmail.com wrote:
+vm-dev
Hi Eliot,
On Mac and Linux one can get a stack trace from a busy VM with the USR1 signal. Is there an analog on Windows?
Ryan
vm-dev@lists.squeakfoundation.org