Host: Windows XP, 2GB RAM, Virtualbox 4.1.8 with extensions 4.1.8 installed
Guest: Ubuntu 10.04.3, 1GB RAM with guest additions installed
Problem summary: Guest won't shut down normally when serial COM port is actively receiving data
A microprocessor-based device is attached to the host COM1 port via RS-232.
My application (a C-language program) is running on the guest OS which has the virtualized serial port (via Port 1, Enabled, Port number COM1, Port mode Host Device, Port/File Path: COM1:) open at the time I want to shut the system down. The application program is started via /etc/init.d/rc.local and is run in NOHUP (that is, nohup sh (some script)). My program does not have any provision to monitor for signals (to shutdown gracefully via external signal). There is no adverse consequence to my application environment for an uncontrolled shutdown.
The application program sends a poll message about once a minute, after an initial delay of about a minute.
The external microprocessor-based device sends a response multiple times per second, regardless of whether a poll is received or not. This means once my program starts and opens the serial port, it will immediately be receiving data from the external device, regardless of when my program sends a poll.
When the external device is disconnected (so that the polls are being sent, but no responses are being received), the Ubuntu 10.04.3 guest can be shutdown (via the shutdown button on the Ubuntu menu bar) repeatably without difficulty.
When the external device is connected (so that responses are being received), the Ubuntu 10.04.3 guest USUALLY (but not absolutely always) will not shutdown using the same (shutdown button) procedure. When it fails to shutdown, I try to close the Guest window with the windows close button, but that does not respond (I don't see a Virtualbox dialog box offering ACPI shutdown, power-off, etc.) I can only force the window to close with the Windows taskmanager, and it only closes after a short (maybe 30 second) delay. I get another dialog box offering to send a problem report to microsoft (I dismiss that dialog.)
As I wish to provide my application and virtual machine to a colleague for field demo, this shutdown issue is of consequence.
Two log files (each with a single session) are attached, one reflecting the failed shutdown process (serial device attached/sending), the other reflecting a normal shutdown process (serial device unattached).
Thank you for any advice or pointer to which forum area would be more appropriate