-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Segmentation Fault in UDP Source Block #6485
Comments
@pamin98 I replicated the crash when a throttle is used. It shouldn't crash, but you do not want to use a throttle here because the UDP Source passes only data it receives, i.e., whatever is sending the UDP packets is acting as throttle. @argilo Something in the new buffering scheme isn't handling overruns right. |
Even without a throttle block, the segmentation fault seems to persist though. |
I think it's any time the buffer in the UDP Source fills. Is your packet source really fast? It could be that the file sink backs up due to disk speed, then the UDP Source backs up. It's still a bug. I'm just hoping there's something else you can do until it's fixed. Still, I'm glad you stress tested the block and found the bug! |
I haven't been having much luck with my own advice above, so this block may be broken for the moment. Let's see what @argilo thinks. |
It looks like the bug is with the overrun calculation here: gnuradio/gr-network/lib/udp_source_impl.cc Line 274 in 5d4076d
|
Changing the type of |
Cool! I'll hold up 3.10.5.1 to get that fix in. Will that work on Windows? |
|
It should work even if long is 32 bits, but I'll have to think about whether it would result in Undefined Behaviour. I won't be able to make a pull request until tonight. Feel free to make your own if you'd like to get things moving sooner. |
What do you think of this ... casting
and it doesn't crash. |
@argilo Thanks for tracking down the problem! |
Thank you for resolving the issue! |
What happened?
The UDP Source block produces a segmentation fault when any UDP packets are received on the specified port.
GDB Logs and steps to reproduce are included in the ticket.
System Information
OS: Ubuntu 20.04.02 LTS
GR Installation Method: native distro packages - apt
GNU Radio Version
3.10 (maint-3.10)
Specific Version
3.10.5.0
Steps to Reproduce the Problem
Create a chain consisting of a UDP Source, a Throttle block and a File Sink. Relevant configurations:
UDP Source
Input Type: byte
Port: 30000
Header: None (or any other)
UDP Packet data size: 1472
Notify missed frames: No
Src 0s: No
IPv6: No
Vector Len: 1
Throttle
Type: byte
The rest as default
File Sink:
File: /home/user/somefile.bin
Type: byte
The rest as default.
Execute the flow graph and send some UDP packets to port 30000.
The execution crashes with return code 11.
Relevant log output
The text was updated successfully, but these errors were encountered: