-
Notifications
You must be signed in to change notification settings - Fork 209
Freezes and timeouts #65
Comments
My latest try:
|
The VM then rebooted and panicked after some time:
|
For the second log, you can add The first one is expected for newer iOS. I also don't have a solution for freezes when the GUI window is not focused yet, but macOS seems to throttle them down. |
Thanks I will play a bit more. |
I had the same throttling issue on a project a few years back but I never managed to fix it :/ |
I fixed the freezes and timeouts with: https://github.com/TrungNguyen1909/qemu-t8030/pull/68/files |
@dom-lgtm Hello, I get that removing mutex stuff can possibly work, but your PR looks very sketchy to me. Can you first add And then reproduce the hangs and then use gdb/lldb to attach to both the Linux VM and the iOS VM when they hang, do a Thanks. |
With all due respect, it's your use of mutexes I find sketchy. Are you sure you understand mutexes ?
/ cc @Siguza |
Hello @dom-lgtm, All the mutexes usage in
Yes, you can say that all other queue locks are useless (the reason they are there is historical). But I want all processing code to be inside iothread lock due to the fact that EHCI runs inside IOThread (implicitly through qemu_bh). And with all due respects, please send me the backtrace I requested so that we can figured this out. Thanks. |
@TrungNguyen1909 Do I understand correctly that if there is some data available to read on the socket, the iothread is basically never unlocked except for the few instructions during which another thread might, with lots of luck, manage to lock thread for its own use, which could explain the lockups and why my fix removes the lockups? |
@dom-lgtm, Well yes, assuming Ummm, but however, I figured that maybe we should remove all other locks accept for the IOThread and make sure that no deadlocks are possible, plus every processing bits is IOThread locked, then we can still be thread-safe. |
Sorry I was out for the weekend. Here is a BT from the linux VM (both linux and iOS hang).
|
Could this by chance be the case when the firmware is being transmitted and coincidently when the VMs most often lock ? |
I couldn't see anything strange here, Can you send me the bt for the iOS VM? |
I can't claim I know much about qemu or multi-threaded code, but I can't help wonder if spinning is the best choice here: qemu-t8030/hw/usb/dev-tcp-remote.c Line 630 in 4de8baf
|
@dom-lgtm, The QEMU USB stack does not accept USB_RET_NAK after a packet is USB_RET_ASYNC, So the solution is we have to wait for the other side to respond. |
This code is too complex for me. I'm going to work on my own fork so I don't mess the mutexes. |
Hey,
I have trouble restoring because of timeouts and freezes. Any advice ?
I also notice that the VMs (linux or iOS) often freeze for no reason until I focus the GUI window.
The text was updated successfully, but these errors were encountered: