#7796 closed defect (fixed)
Iffy serial port cause >95% CPU usage in a VM
Reported by: | James Moe | Owned by: | |
---|---|---|---|
Component: | uart | Version: | VirtualBox 3.2.12 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | Linux |
Description (last modified by )
opensuse v11.3
linux 2.6.34.7-0.5-desktop x86_64
USRobotics FAX/modem 5637
The serial port is enabled and set for COM1. The "Port Mode" is set to "Host Device" and the "Port/File Path" is USBACM0.
When the VM starts up, it complains that the COM port is "iffy" (paraphrase) and may not work. It does in fact work and quite well. However, the VM is spinning in a loop somewhere because the CPU usage for one core (of a quad processor) averages about 95%. Good thing it's a quad core CPU. The actual core in use switches around but at any one time a core is running close to maximum. The CPU usage within the VM guest itself is normal, less than 5%.
If I disable the serial port, the VM's CPU usage drops back to normal (5 - 10%).
Attachments (1)
Change History (23)
by , 14 years ago
comment:1 by , 14 years ago
Oops. The "Port/File Path" is "/dev/ttyACM0". (Shouldn't have trusted my memory.)
comment:2 by , 14 years ago
Do you know if this is a regression, have you ever tried an older version of VBox with the same setup?
comment:3 by , 14 years ago
Do you know if this is a regression? ...
No, I do not know. I could find no other report that mentioned this particular problem.
It is a recent change of modems. Previously we were using an actual serial port connected to a modem with a serial cable. The serial ports are an add-on card. I got tired of having to recompile the port driver every time the kernel was updated; usually I had to hack to the code to adapt it to changes in the kernel. It's enough hassle rebuilding for VBox.
...have you ever tried an older version of VBox with the same setup?
I do not think it was a problem on 3.2.10. I cannot get to the computer that is running that VM at the moment. It will have to wait until this evening to test it.
comment:6 by , 14 years ago
Same issue here: exactly the same modem, same problem. What jimoe not explicitely stressed: it is a USB modem which is provided to the guest as serial device.
I also tried another USB modem, 100% CPU, too. With a real serial modem (attached to the host serial port), things are fine. So there must be some issue with polling of these USB devices.
For me it is not a regression, 3.2.12 was bad, too. I did not try even older versions, though. Issue persisting in 4.0.6.
Is there a possibility to influence the polling rate? Modems aren't really high-speed devices, so less frequent polling would be fine, too.
comment:7 by , 14 years ago
OK, I re-read the post of jimoe from 2010-12-07, which tells that version 3.2.10 is OK.
I now installed 3.2.10 and indeed, ~1% CPU load when idle. So my installation goes from 1% to 100% CPU when upgrading from 3.2.10 to 3.2.12.
comment:8 by , 14 years ago
Ok, it is quite clear which code introduced that problem for you. Unfortunately this code was added to prevent hangs on other systems. We have to investigate how we can fix both problems.
comment:9 by , 14 years ago
I have the same issue on a Linux host with both 4.0.4 and 4.0.10. This issue is related to #8724, I believe.
In my case, having serial in VirtualBox enabled, isn't itself an issue, it's which Host Device I use that changes things.
When using the internal RS-232 port, as ttyS0, CPU usage is normal. But, when I use an USB->RS-232 converter, as ttyUSB0, CPU usage on the host is 100% for one of my two cores.
Linux kernel 2.6.27.7 / Guest OS Windows XP
comment:10 by , 13 years ago
Any news on this?
Version 4.1.2 is still bad, and the bug already is 9 months old! I'm constantly polluting the environment since months, as my CPU consumes additional ~40W this way...
comment:11 by , 13 years ago
I got tired of waiting for this to be fixed. Since I already had some old FAX modems, I purchased a CP Technologies USB-to-Serial Adapter which is natively supported in linux. And retired the USRobotics USB modem.
The system detected the adapter and created a /dev/ttyUSB0 device. I then set the VM to use that device for its COM1 connection and all is good again.
comment:12 by , 11 years ago
Ping !?
I just tried Virtualbox 4.3, still the same issue: Everything works fine, but the COM-Port causes the VM to consume 100% CPU.
The report is 3 years old now, and Frank told in comment 8 that the cause is clear, 2 years ago ...
Could someone look at this issue again? Thanks!
comment:13 by , 11 years ago
Still the same issue with Virtualbox 4.3.14 (with "USB: performance fixes"):
Constant 100% CPU when guest COM-Port is connected to the USB Modem (attached via linux usb-serial driver). This is with Linux 3.11.10 as host.
comment:14 by , 11 years ago
Description: | modified (diff) |
---|
A guest COM port has nothing to do with the USB emulation.
comment:15 by , 8 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
Please reopen if still relevant with a recent VirtualBox release.
comment:16 by , 8 years ago
Resolution: | obsolete |
---|---|
Status: | closed → reopened |
Still the very same issue, CPU is constantly at 100%
I'm at the moment on Linux 3.12.62 as host, using VirtualBox 5.0.26
comment:17 by , 8 years ago
This will hopefully be fixed for good in the next maintenance release, please try a test build from here.
comment:18 by , 8 years ago
To support manfredsch, I can confirm this is still a bug on VB 5.0.14 on kernel 4.4.13. I'll test the next maintenance release.
comment:19 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fix is part of VBox 5.1.6.
follow-up: 22 comment:20 by , 8 years ago
OK, I installed 5.0.28 now (I'm on opensuse 13.1 still), and things are fixed, indeed.
I have about 10% CPU usage now, so ~5-7 percent points CPU overhead due to the modem.
Thanks a lot!
comment:22 by , 8 years ago
I've just upgraded to 5.0.28 as well (linux kernel 4.4.14). The CPU usage problem is finally gone! I've been working around this for 5 years, so I'm very happy.
Replying to manfredsch:
OK, I installed 5.0.28 now (I'm on opensuse 13.1 still), and things are fixed, indeed.
I have about 10% CPU usage now, so ~5-7 percent points CPU overhead due to the modem.
Thanks a lot!
Log file of the VM that uses lots of CPU time doing nothing