jketterl / openwebrx

Open source, multi-user SDR receiver software with a web interface
https://www.openwebrx.de
GNU Affero General Public License v3.0
1.03k stars 147 forks source link

Large FFT size causes segfault #292

Closed jwt27 closed 2 years ago

jwt27 commented 2 years ago

Describe the bug Setting the FFT size above 32k crashes OpenWebRX with a SIGSEGV. This problem appeared after upgrading from some old version (pre-1.0), where I used 64k.

To Reproduce Set FFT size to 65536.

Expected behavior FFT sizes above 32k should just work.

Installation method Manually installed.

Versions Current git develop branch.

Log messages Nothing specific, only this:

Mar 03 22:58:54 server openwebrx.py[3111642]: control connection ended
Mar 03 22:58:54 server openwebrx.py[3111642]: closing client socket
Mar 03 22:58:54 server systemd[1]: openwebrx.service: Main process exited, code=killed, status=11/SEGV
Mar 03 22:58:54 server openwebrx.py[3111642]: received signal: 15
Mar 03 22:58:54 server systemd[1]: openwebrx.service: Failed with result 'signal'.
Mar 03 22:58:54 server systemd[1]: openwebrx.service: Consumed 10min 53.361s CPU time.
Mar 03 22:58:54 server systemd[1]: openwebrx.service: Scheduled restart job, restart counter is at 2.
Mar 03 22:58:54 server systemd[1]: Stopped OpenWebRX WebSDR receiver.
Mar 03 22:58:54 server systemd[1]: openwebrx.service: Consumed 10min 53.361s CPU time.
Mar 03 22:58:54 server systemd[1]: Starting OpenWebRX WebSDR receiver...
Mar 03 22:58:54 server systemd[1]: Started OpenWebRX WebSDR receiver.

Additional context N/A

jketterl commented 2 years ago

Indeed, you have hit the limit of uint16_t in pycsdr here.

I have changed it to a uint32_t now, the new limit should now be INT_MAX (which is platform-dependent, most likely 2147483647) since that's what goes into the FFTW3 library call.

I have tried the 65536 value, and while it does not crash OpenWebRX any more, it is still not rendered by the browser. See https://github.com/jketterl/openwebrx/pull/176 for more details.

jwt27 commented 2 years ago

Somehow I missed the notification for this. Works for me now, with the patches from #176. Thanks!