-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
USBIPd lockup about once a month #729
Comments
https://github.com/dorssel/usbipd-win/wiki/Troubleshooting also shows how you can create captures (PCAPs). That's the most detailed logging available. You can also capture on the Linux side (usbmon), but it's a bit harder to set up. syslog messages are also helpful. |
4.0.0 has been released which fixes a (very small) memory leak. This could explain your issue. Can you confirm? |
Thanks for the update. |
Any news on this? |
Hi, |
Are you monitoring the memory usage of the |
Hi, |
Update on a likely unrelated occurrence. On 2024-02-29 at 20:28 the PM-Monitor stopped working. Memory usage looks to increase from 10MB to about 11MB at the moment the issue occurred (2024-02-29 20:26:48 CET). Because I didn't have to restart usbipd.exe for this occurrence I assume it to be a different issue than for which I opened the ticket. PM-Monitor restart scriptsstartUSBipD.bat
usbipd_start.py
LoggingWSLError messages in journalctl:
similar in dmesg:
Win11 event logs(sometimes with a few events before the issue, and more after the issue): |
Thanks for the elaborate report. Memory usage seems correct. The memory bug that I fixed earlier leaked 40 bytes per URB + a kernel event handle. I could see it in memory consumption clearly after about 100.000 URBs. I guess in your case it was the kernel handles that caused the original crash. I went up to 1 million URBs, but couldn't actually reproduce the crash. Can you guestimate your URB-rate? If that is indeed > 1 million per month it could explain the original crash. With the current behavior, I think we can safely say the original problem is fixed. |
Is it only in one direct this issue was present? My stab at guestimate the URB-rate:
|
Usually, for each URB there is one USBIP request and one USBIP reply. It also makes sense that a single "poll" from your software consists of several URBs. Of course, when either the request or the reply doesn't fit in the MTU there will be several TCP fragments. But as a "guestimate", the 4 million makes sense. |
To comment on your last update: |
Unfortunately there was another similar occurrence as on 2024-02-29. On 2024-03-07 11:04 the PM-Monitor stopped working in a similar way as on 2024-02-29 at 20:28.
Memory usage was the same as after last week issue, 12MB until I restarted USBIPd.exe. I hope the capture isn't growing too fast, but from the 'guestimate' it probably will... |
I'm using usbipd between Windows-11 and WSL2-Ubuntu to connect a serial device to WSL2.
For the most part it works great, but about once a month it locks up.
I have a Python program running that obtains data from the USB connected device every 5 seconds.
To recover from this lockup I have to detach/attach (usbipd wsl detach --busid 1-4 / usbipd wsl attach --busid 1-4).
And than, after a restart of my program it works again.
There is no need to powercycle the device with USB (serial) port.
Dates seen a lockup so far (so often far apart):
I looked at
https://github.com/dorssel/usbipd-win/wiki/Troubleshooting
and this time I started with trace level logging.
I see that the logging is without timestamps, so I wonder if this logging would be helpful for my issue?
Any additional advice how I could debug this issue?
Version details:
Windows:
WSL2:
USB device/driver:
A particulate matter meter (fijnstof meter).
https://github.com/msillano/tuyaDAEMON/wiki/custom-device-'PM-detector':-case-study
The text was updated successfully, but these errors were encountered: