VirtualBox

6 年 前 建立

2 年 前 結束

#18671 closed defect (fixed)

Cannot get real data from serial interface

回報者: hykwok 負責人:
元件: uart 版本: VirtualBox 6.0.8
關鍵字: serial 副本:
Guest type: Linux Host type: Windows

描述

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

附加檔案 (3)

vboxserialportlog.txt (108.9 KB ) - 5 年 前, 由 hykwok 新增
Testing log for development revision 135764
Ubuntu1804-2020-02-05-20-37-53.log (180.1 KB ) - 5 年 前, 由 hykwok 新增
Vbox.log for VirtualBox VM 6.1.2 r135662
Ubuntu1804-2020-02-05-20-58-42.log (21.1 KB ) - 5 年 前, 由 hykwok 新增
VboxHardening.log for Version 6.1.3 r135953

下載所有附檔: .zip

更動歷史 (8)

comment:1 5 年 前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.

5 年 前hykwok 編輯

附檔: 新增 vboxserialportlog.txt

Testing log for development revision 135764

comment:2 5 年 前hykwok 編輯

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

comment:3 5 年 前aeichner 編輯

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

5 年 前hykwok 編輯

Vbox.log for VirtualBox VM 6.1.2 r135662

5 年 前hykwok 編輯

VboxHardening.log for Version 6.1.3 r135953

comment:4 5 年 前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.

comment:5 2 年 前aeichner 編輯

狀態: newclosed
處理結果: fixed
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette