VirtualBox

Ticket #7796 (new defect)

Opened 3 years ago

Last modified 6 months ago

Iffy serial port cause >95% CPU usage in a VM

Reported by: jimoe Owned by:
Priority: major Component: uart
Version: VirtualBox 3.2.12 Keywords:
Cc: Guest type: other
Host type: Linux

Description

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

VBox.log Download (42.7 KB) - added by jimoe 3 years ago.
Log file of the VM that uses lots of CPU time doing nothing

Change History

Changed 3 years ago by jimoe

Log file of the VM that uses lots of CPU time doing nothing

comment:1 Changed 3 years ago by jimoe

Oops. The "Port/File Path" is "/dev/ttyACM0". (Shouldn't have trusted my memory.)

comment:2 Changed 3 years ago by frank

Do you know if this is a regression, have you ever tried an older version of VBox with the same setup?

comment:3 Changed 3 years ago by jimoe

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:4 Changed 3 years ago by jimoe

I have verified that this is NOT a problem in v3.2.10.

comment:5 Changed 3 years ago by jimoe

The problem persists in v4.0-4.0.0_69151_openSUSE113-1.x86_64.

comment:6 Changed 3 years ago by manfred99

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 Changed 3 years ago by manfred99

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 Changed 3 years ago by frank

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 Changed 3 years ago by GregH

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 Changed 3 years ago by manfred99

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 Changed 3 years ago by jimoe

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 Changed 6 months ago by manfredsch

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!

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use