-
Notifications
You must be signed in to change notification settings - Fork 347
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
usbip: error: failed to record. out queue full #20
Comments
I'm pretty sure this is the same bug as #16 . Can you give us more info: Windows version and can you be more specific on your USB disk. |
@Oxalin |
I have the same issue. |
Please, somebody has any solution for this issue? |
@perlland @ttuibk : Default out queue length is 256. In normal case it is a sufficient number. But a usb disk with many files sometimes incurs queue full. So could you try with an empty USB disk? If you success, increasing a queue length may help as shown in #14 (comment). Of course, current implementation should be improved to support dynamic queue length. 😢 |
Exactly yes @cantops .. But queue full will occur due to too many outgoing requests or an outgoing request is not processed timely or ignored on server side. Later case implys that a client may request in an unexpected way. So increasing a queue length such as my previous comment is just a workaround. |
|
@cantops :
I had suspected that your server did not respond while a client pushed usbip requests.
Well, it looks weird that record_outq_seqnum() resides in get_xfer_len(). If get_xfer_len() is called twice, record_outq_seqnum() is also called two times. So more inspections should be needed. Could you add more debugging logs for get_xfer_len()? |
I track the "usbip: error: failed to record. out queue full" because I need USBIP on my server farm (so thanks for nice solution :) ). The problem is that for some seqnums the record_outq_seqnum is called twice and is_outq_seqnum is not called at all. Patch (with log entries) and log.txt attached. |
Thanks @koudis & @cantops . As you pointed out, record_outq_seqnum() can be called multiple times. This means that the same seq numbers are marked at out queue and result in queue full. I create patch_out_queue_full_fix.txt to resolve this issue. This patch is just a work-around, which avoids marking seq number if it is duplicated in record_outq_seqnum(). More desirable solution will be a hash table for bookkeeping outbound messages. I have checked that a patched usbip works good for my usb bluetooth dongle. If anyone confirms, I'll merge the patch into master branch. |
testI tested it on my Flash Storage. It seems to work without problems. (from Debian Stretch to Windows 10 Home) Hash TableIs there any Hash table implementation in the project? (I cannot find any useful for this purpose). |
@koudis :
Good. I'll merge the patch.
Hash table should be implemented first. Well, it would be better that simple one is imported into this project. |
@cezuni If Yes the solution below is not good :D. Is there any reason why is the Queue 256 items long? Can we decrease the number of Queue item to 128 (at least)? |
@koudis :
I remembered that queue implementation and 256 queue length were determined by old repository. Optimal queue length is hard to guess. We just hope that 256 is sufficiently large enough. Smaller number than 256 would be fine in a normal case.
Multiple queue is interesting!! But every queue should be checked when a response message arrives. Besides previously addressed implementations, linked list may be a good candidate. |
This error occurs when attach usb disk scrolls, but does not affect actual use。
![image](https://user-images.githubusercontent.com/178909/54008392-7893c100-41a1-11e9-8fb2-d834420fd454.png)
#16 does not solve the problem
The text was updated successfully, but these errors were encountered: