VirtualBox

Ticket #18671 (new defect)

Opened 11 months ago

Last modified 2 months ago

Cannot get real data from serial interface

Reported by: hykwok Owned by:
Component: uart Version: VirtualBox 6.0.8
Keywords: serial Cc:
Guest type: Linux Host type: Windows

Description

I encounter serial port problem in VirtualBox 6.0.8.
It is my testing procedure:

Setup Host environment:

  1. The host system is Windows 7 64 bits.

1.1 Download Virtual COM Port Driver (Standard Demo version) from here:  https://www.eltima.com/products/vspdxp/
1.2 Install Virtual COM Port Driver and create a pair of Virtual COM Port (In my case, they are COM2 and COM4)
1.3 Downlaod Putty (Windows version) from here:  https://putty.org/

  1. Create Ubuntu 18.04 with Virtual Box 6.0.8

2.1 Create a virtual machine that uses Ubuntu 18.04.
2.2 Enable serial port 1 for this virtual machine and set the "port mode" to "Host Device" and the "path/Address" to one of the above virtual COM port (in my case it is COM2)
2.3 Install putty package:

sudo aptitude install putty
sudo aptitude install putty-tools

  1. Start putty (windows side)and connect to COM4
  1. Start Ubuntu 18.04 and then start putty (Linux side):

sudo putty

  1. Sends 256 bytes data from Windows host to Linux guest by putty application

Now, you should get the data what you have inputted instantly

  1. Close the Linux side's putty but DO NOT close the windows side's putty.
  1. Sends another 256 bytes from Windows host to Linux guest.
  1. Start the Linux side's putty again (sudo putty)
  1. Sends data from Windows host to Linux guest.

Now, you CANNOT get the data what you have inputted instantly.

I find that virtualBox stores 221 bytes old data in the cache. Thus, I have to shutdown the Linux guest (not reboot) to fix the problem.

P.S. This bugs may be realted to #18539

Attachments

vboxserialportlog.txt Download (108.9 KB) - added by hykwok 2 months ago.
Testing log for development revision 135764
Ubuntu1804-2020-02-05-20-37-53.log Download (180.1 KB) - added by hykwok 2 months ago.
Vbox.log for VirtualBox VM 6.1.2 r135662
Ubuntu1804-2020-02-05-20-58-42.log Download (21.1 KB) - added by hykwok 2 months ago.
VboxHardening.log for Version 6.1.3 r135953

Change History

comment:1 Changed 3 months ago by aeichner

As I wasn't able to reproduce the issue so far we need some special logs from the serial port emulation. I prepared a testbuild which can be downloaded from here, look for the latest development testbuild (6.1.2+ state). In order to activate the tracing the VM needs some special config which can be added with

VBoxManage setextradata <VM name> "VBoxInternal/PDM/DriverTransformations/SerialTrace/AboveDriver"                         "Host Serial"
VBoxManage setextradata <VM name> "VBoxInternal/PDM/DriverTransformations/SerialTrace/AttachedDriver/Config/TraceFilePath" "<trace/log/file/path>"
VBoxManage setextradata <VM name> "VBoxInternal/PDM/DriverTransformations/SerialTrace/AttachedDriver/Driver"               "IfTrace"

<trace/log/file/path> needs to be substituted with a file path the user as write access to. <VM name> needs to be substituted with the VM name being traced. The current setup doesn't work if you have multiple serial ports configured which are using a host serial port device, so be sure to either disable all but one or leave them disconnected. Depending on the size the resulting logs can either be attached to this defect (they don't contain any data being transfered but only metadata about timings and parameters of certain function calls) or can be sent directly to Alexander (dot) Eichner (at) oracle (dot) com.

Changed 2 months ago by hykwok

Testing log for development revision 135764

comment:2 Changed 2 months ago by hykwok

I was using the version "development revision 135764" for testing.

comment:3 Changed 2 months ago by aeichner

Please try with the latest development snapshot available here, it should fix your issue hopefully.

Changed 2 months ago by hykwok

Vbox.log for VirtualBox VM 6.1.2 r135662

Changed 2 months ago by hykwok

VboxHardening.log for Version 6.1.3 r135953

comment:4 Changed 2 months ago by hykwok

I tried to use virtualbox Version 6.1.3 r135953 for testing but the virtual linux system could not be started. The host system is Win 10.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use