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

gr-soapy: deactivate stream before closing #5772

Merged
merged 1 commit into from Apr 25, 2022

Conversation

willcode
Copy link
Member

@willcode willcode commented Apr 17, 2022

Pull Request Details

It was reported that, with the HackRF module, a flowgraph terminated
with a segfault. Most Soapy modules implement deactivateStream(), but
that function is not called from gr-soapy.

Problem reported by Gavin Jacobs on the mailing list.

Which blocks/areas does this affect?

gr-soapy

Checklist

@willcode willcode added Don't Merge Bug Fix Backport-3.9 Should be backported to 3.9 soapy Backport-3.10 Should be backported to 3.10 labels Apr 17, 2022
@willcode
Copy link
Member Author

This needs some testing with various SDR modules before merge. The RTLSDR module calls deactivateStream() from closeStream(). Most other modules look like they expect us to call deactivateStream().

It was reported that, with the HackRF module, a flowgraph terminated
with a segfault. Most Soapy modules implement deactivateStream(), but
that function is not called from gr-soapy.

Signed-off-by: Jeff Long <willcode4@gmail.com>
@willcode
Copy link
Member Author

willcode commented Apr 17, 2022

Tested with RTLSDR, HackRF and AirspyHF. The HackRF segv (return code -11) goes away with this patch. The other SDRs did not show any different behavior (which is good). So, I think this is safe and correct.

@willcode willcode removed the request for review from Yamakaja April 17, 2022 18:57
@willcode
Copy link
Member Author

@ncorgan Could you take a look at this? Thanks.

@ncorgan
Copy link
Contributor

ncorgan commented Apr 17, 2022

Looks good to me.

@willcode willcode linked an issue Apr 17, 2022 that may be closed by this pull request
@mormj mormj merged commit 5fa60c7 into gnuradio:main Apr 25, 2022
@willcode willcode deleted the soapy-deactivate-stream branch April 27, 2022 22:50
@willcode willcode added ported-to-3.10 Has been ported to 3.10 and removed Backport-3.10 Should be backported to 3.10 labels May 8, 2022
@willcode willcode added ported-to-3.9 Has been ported to 3.9 and removed Backport-3.9 Should be backported to 3.9 labels May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix ported-to-3.9 Has been ported to 3.9 ported-to-3.10 Has been ported to 3.10 soapy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gr-soapy mishandles hackrf on flowgraph exit
3 participants