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

USB Errors in sdrtrunk v.0.5.1-beta1 #1419

Closed
bhall7 opened this issue Jan 17, 2023 · 2 comments · Fixed by #1420
Closed

USB Errors in sdrtrunk v.0.5.1-beta1 #1419

bhall7 opened this issue Jan 17, 2023 · 2 comments · Fixed by #1420

Comments

@bhall7
Copy link

bhall7 commented Jan 17, 2023

Hello,

After running sdrtrunk for a couple of days on a P25 Phase II system, I noticed the following errors:

2023-01-16 00:06:38.818 INFO i.g.d.d.f.c.ComplexPolyphaseChannelizerM2 - Sample Rate [10000000.0] providing [400] channels at [25000.0] Hz each [128MB/176MB 73%]
2023-01-16 00:23:49.224 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [1] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [227MB/560MB 40%]
2023-01-16 00:23:49.225 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [227MB/560MB 40%]
2023-01-16 00:25:42.622 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [2] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [315MB/560MB 56%]
2023-01-16 00:25:42.623 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [316MB/560MB 56%]
2023-01-16 01:17:36.420 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [3] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [253MB/560MB 45%]
2023-01-16 01:17:36.421 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [253MB/560MB 45%]
2023-01-16 03:41:15.021 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [4] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [814MB/936MB 86%]
2023-01-16 03:41:15.023 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [814MB/936MB 86%]
2023-01-16 03:43:00.623 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [5] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [694MB/936MB 74%]
2023-01-16 03:43:00.624 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [694MB/936MB 74%]
2023-01-16 04:14:43.624 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [6] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [937MB/1GB 88%]
2023-01-16 04:14:43.625 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [937MB/1GB 88%]
2023-01-16 05:50:40.220 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [7] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [1GB/1GB 93%]
2023-01-16 05:50:40.221 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [1GB/1GB 93%]
2023-01-16 05:50:46.221 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [8] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [1GB/1GB 93%]
2023-01-16 05:50:46.222 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [1GB/1GB 93%]
2023-01-16 06:34:00.622 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [9] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [608MB/1GB 52%]
2023-01-16 06:34:00.623 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [608MB/1GB 52%]
2023-01-16 07:15:00.421 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [10] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [822MB/1GB 71%]
2023-01-16 07:15:00.422 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [822MB/1GB 71%]
2023-01-16 07:38:07.823 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [11] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [274MB/1GB 23%]
2023-01-16 07:38:07.823 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [274MB/1GB 23%]
2023-01-16 07:54:23.021 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [12] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [547MB/1GB 47%]
2023-01-16 07:54:23.022 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [547MB/1GB 47%]
2023-01-16 07:56:05.821 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [13] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [665MB/1GB 57%]
2023-01-16 07:56:05.822 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [665MB/1GB 57%]
2023-01-16 08:30:22.421 ERROR i.g.d.s.t.u.USBTunerController - Attempt to submit USB transfer buffer failed with status [LIBUSB_ERROR_BUSY] - this may be temporary and it has happened [14] time(s) so far. Transfer buffer status (error queue/total available) [1/8] [646MB/1GB 56%]
2023-01-16 08:30:22.422 ERROR i.g.d.s.t.u.USBTunerController - Successfully resubmitted previous error USB transfer buffer. Current transfer buffer status (error queue/total available) [0/8] [646MB/1GB 56%]

@DSheirer
Copy link
Owner

It looks like the recent changes are working correctly. sdrtrunk uses 8x data transfer buffers in round-robin fashion to transfer data from the SDR over the USB bus. Sometimes when re-submitting an emptied buffer to libusb to fill, it gets rejected and so we have to put that rejected transfer buffer into a holding queue. Immediately after the next successful buffer resubmission, we attempt to resubmit the previous failed buffer.

This all appears to be working ... albeit with a bit of excessive logging.

The important piece is how many buffers are sitting in the error/holding queue. Once/if that reaches 8/8, then data transfer for the sdr will automatically stop because libusb has rejected all of the data transfer buffers and we can no longer get data from the SDR.

I may be able to silence these loggers if it looks like this will be normal operation.

DSheirer pushed a commit that referenced this issue Jan 18, 2023
DSheirer added a commit that referenced this issue Jan 18, 2023
…ransfer buffer resubmits. (#1420)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
@bhall7
Copy link
Author

bhall7 commented Jan 18, 2023

Thanks, Denny!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants