Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial broken on Windows #498

Closed
HoRnEyDvL opened this issue Oct 14, 2021 · 15 comments
Closed

Serial broken on Windows #498

HoRnEyDvL opened this issue Oct 14, 2021 · 15 comments
Labels
bug Something isn't working

Comments

@HoRnEyDvL
Copy link

HoRnEyDvL commented Oct 14, 2021

Bug Description

Xemu freezes (Not Responding) when WinDbg is open & listening to COM ports

Unable to debug any Kernels

Steps:
Install Virtual Com Ports I used (https://www.virtual-serial-port.org/) 14 day trial

Open VSPD & create a new pair in my case COM1 & COM 2

Open WinDbg & Connect to COM Port 2

  • Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
  • Copyright (c) Microsoft Corporation. All rights reserved.
  • Opened \.\com2
  • Waiting to reconnect...

Launch Xemu Using D:\Xemu\xemu.exe -device lpc47m157 -serial COM1

Pop up appears for COM port settings but Xemu locks up.

image

Expected Behavior

Xemu Should output Kernel debug to WindDbg Via Com Port specified

image

xemu Version

Version: 0.6.1-22-g5622af4981
Branch: master
Commit: 5622af4
Date: Wed Oct 13 23:54:07 UTC 2021

System Information

Win 10
AMD 5950X
GTX 980

Additional Context

No response

@HoRnEyDvL HoRnEyDvL added the bug Something isn't working label Oct 14, 2021
@HoRnEyDvL HoRnEyDvL changed the title Serial & WindDBg Issues Serial & WindDBg Issues (Not Working) Causes lock ups. Oct 14, 2021
@HoRnEyDvL
Copy link
Author

Just did further testing & can confirm that this also causes crash when using Putty.

This eliminates WinDbg been the issue.

@GXTX
Copy link
Contributor

GXTX commented Oct 14, 2021

This is a known issue. See: #86. I believe it's an issue with QEMU itself.

You should keep this issue open for documentation. And rename to "Serial broken on Windows".

@HoRnEyDvL HoRnEyDvL changed the title Serial & WindDBg Issues (Not Working) Causes lock ups. Serial broken on Windows Oct 14, 2021
@HoRnEyDvL
Copy link
Author

This is a known issue. See: #86. I believe it's an issue with QEMU itself.

You should keep this issue open for documentation. And rename to "Serial broken on Windows".

Renamed.

Thanks

@mborgerson
Copy link
Member

mborgerson commented Oct 15, 2021

Does it hang when you use a physical COM port? Have you tried other chardev backends, tcp/stdio for instance? Is it only when you're using this virtual COM port that xemu hangs? Does QEMU work with your virtual COM port?

Can you help investigate the issue

@GXTX
Copy link
Contributor

GXTX commented Oct 15, 2021

It does hang with physical COM ports, I have a Digi Edgeport/4 (USB 4 port) and motherboard. I don't remember if I ever tried to attach WinDBG to a Windows guest in QEMU.

@HoRnEyDvL
Copy link
Author

HoRnEyDvL commented Oct 15, 2021

Does it hang when you use a physical COM port? Have you tried other chardev backends, tcp/stdio for instance? Is it only when you're using this virtual COM port that xemu hangs? Does QEMU work with your virtual COM port?

Can you help investigate the issue

I haven't been able to get it to output to TCP.

Using Virtual Com Output to Putty I can sometimes get it to output this before it crashes (-device lpc47m157 -serial COM1)
▒▒▒▒▒▒▒▒▒0▒▒▒▒▒▒k)▒▒▒▒▒
image

Using Stdio to output to console works however Kernel output is gibberish (-device lpc47m157 -serial stdio) Some applications do output readable text such as evox.

☺Ç        Φ‼¶ÇÇ‼≡☼  ♦►☺╠ëE°╔Φ⌠↨ä└►► é+☺ ►►`@Ç☺Çl√♦Çÿ√♦Ç♥\√♦Çk)♥éT√♦Ç►xboxkrnl.exe¬0000┼ÇÇe110♠☺╜♦Ç    k)♥Ç  

image

@GXTX are you able to try this one out please, (Does QEMU work with your virtual COM port?)

@mborgerson
Copy link
Member

Using Stdio to output to console works however Kernel output is gibberish

What were you expecting to see? This is binary data from the debug stub that your desktop debugger would consume

@HoRnEyDvL
Copy link
Author

HoRnEyDvL commented Oct 15, 2021

Using Stdio to output to console works however Kernel output is gibberish

What were you expecting to see? This is binary data from the debug stub that your desktop debugger would consume

That is what was expected using STDIO, its matches the output i get when using real hardware with a superio & putty.

But when using XEMU & putty the output is different to that when using real hardware. Perhaps what XEMU is outputting to COM is causing it to lock up as Putty / WINDBG do not know how to respond to it?

@GXTX
Copy link
Contributor

GXTX commented Oct 15, 2021

It's an issue with QEMU. Real ports. Someone should report upstream, been an issue for a while, at least 3 years or something.

image

@HoRnEyDvL
Copy link
Author

It's an issue with QEMU. Real ports. Someone should report upstream, been an issue for a while, at least 3 years or something.

image

I wouldnt know how to do that :( hopefully someone can do it on behalf of this ticket. Unless its something that can be fixed just for xemu ?

@GXTX
Copy link
Contributor

GXTX commented Oct 18, 2021

Got bored so I reported it. Seems they allow reports on GitLab now instead of a ML thankfully. Could go +1 it if you want, not sure it matters at all. Like I said it's been an issue for quite some time so not sure anyone really cares, doesn't really seem like something too out there to try to do?

https://gitlab.com/qemu-project/qemu/-/issues/675

@HoRnEyDvL
Copy link
Author

Got bored so I reported it. Seems they allow reports on GitLab now instead of a ML thankfully. Could go +1 it if you want, not sure it matters at all. Like I said it's been an issue for quite some time so not sure anyone really cares, doesn't really seem like something too out there to try to do?

https://gitlab.com/qemu-project/qemu/-/issues/675

Thank you so much. Much appreciated.

@GXTX
Copy link
Contributor

GXTX commented Oct 22, 2021

  • Using pipe hangs before even attaching.
  • Using tcp causes any version of WinDbg to report The client is not using the same version of the remoting protocol as the server, tried with ~10 different versions.
  • kd has a similar issue with remote DebugConnect failed, HRESULT 0x80010110 The version of OLE on the client and server machines does not match..

ngl I've said all of these things in XboxDev (probably also on IRC?) with XQEMU years ago, too much noise tho and little interest. I did try briefly to debug it with gdb but couldn't get it to break once it was hung, and attaching after it's hung I couldn't figure out how to get any useful info from the backtrace (not my cup of tea). It's very unlikely this will be fixed upstream anytime soon.

You could perhaps use windpl.pl found in espes' original fork of XQEMU, but iirc this doesn't have many features?

@HoRnEyDvL
Copy link
Author

  • Using pipe hangs before even attaching.
  • Using tcp causes any version of WinDbg to report The client is not using the same version of the remoting protocol as the server, tried with ~10 different versions.
  • kd has a similar issue with remote DebugConnect failed, HRESULT 0x80010110 The version of OLE on the client and server machines does not match..

ngl I've said all of these things in XboxDev (probably also on IRC?) with XQEMU years ago, too much noise tho and little interest. I did try briefly to debug it with gdb but couldn't get it to break once it was hung, and attaching after it's hung I couldn't figure out how to get any useful info from the backtrace (not my cup of tea). It's very unlikely this will be fixed upstream anytime soon.

You could perhaps use windpl.pl found in espes' original fork of XQEMU, but iirc this doesn't have many features?

It's a shame as could desperately use it right about now. My superio simply refuses to work on my 1.0 and 1.1

@mborgerson
Copy link
Member

Should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants