-
Notifications
You must be signed in to change notification settings - Fork 7
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
Dead lock #11
Comments
@kirat68 - thanks for the nice words and for reporting this problem. I think you might have incorrectly cut&pasted the Python code in your example, because when I tried to run it here a minute ago, it failed with 'syntax error' (and looking at the actual code it seems that part of it was pasted twice, or something like that). Franco |
Oh sorry true !!!
Regards Tarik |
Thanks Tarik for the correction. I have to start working now, but I'll take a look at what happens after dinner tonight, and I'll let you know what I find out. Franco |
Obrigado !!! |
De nada Tarik! You were correct about the problem being with the What I did (see this commit: da33df3) is to add a couple of I just pushed the new code to the branch Please give it a try and let me know if it works for you too. Franco |
Bom dia Franco ! Thank you for your instantaneous reaction :-) Tarik |
@kirat68 - sorry for making you wait; I finally found some time tonight to test what happens in that scenario (pulling the USB cable while the RSP is streaming). I used this GRC flowchart (https://github.com/fventuri/gr-sdrplay3/blob/master/examples/FM-Receiver-SDRplay.grc)' in it I just replaced the source block with an RSPdx source block (because this is what I have connected to my PC right now). I started streaming, everything good, then after about 20 seconds, I pulled the USB cable while the RSPdx was streaming. Immediately after that, GRC printed the following error message in the console:
and it stopped streaming, as expected. The code I am using for Franco |
No problem! Thank you for this feed back. I am confused now because I cannot reproduce it anymore but getting at hard USB unplug a segmentation fault in GRC. I will check this issue closer and open a new one if I can get more information relate it to sdrplay3. But this is not related to the dead lock that I consider solved. Running a long long test right now but I am confident that you solved the issue. Thank you very much. |
@kirat68 - thanks for your feedback about the dead lock problem. I just merged those changes into the I am going to leave this issue open for a few days in case you notice more problems due to this change. Franco |
Hello there,
Thank you for providing this useful code!
I am experiencing a dead lock when the destructor of sdrplay3 is called and after the function "void rsp_impl::stream_callback" acquired the lock. In this situation the call of the API function "sdrplay_api_ReleaseDevice" get blocked and just an api server restart can remove it what is very problematic.
You can reproduce it try it in the python interpreter as follow:
The destructor will not return.
Removing "ring_buffer.overflow.wait(lock," solves apparently the problem.
If you could help to resolve this issue, it would be great.
Thank you for your attention !!!
The text was updated successfully, but these errors were encountered: