Skip to content

Mystery segmentation fault: Raspberry Pi 5 #997

@connervieira

Description

@connervieira

I'm running the latest version of Trunk Recorder as of the time of writing, installed via the documentation at https://trunkrecorder.com/docs/Install/INSTALL-PI

I'm using a Raspberry Pi 5 (6.6.74+rpt-rpi-2712) with two RTL-SDR v4.

I'm using a known-good configuration file from a previous installation (which worked reliably for weeks at a time). Here's the configuration contents:

{
    "ver": 2,
    "sources": [{
        "center": 855059375,
        "rate": 2400000,
        "error": 2000,
        "gain": 50,
        "debugRecorders": 0,
        "digitalRecorders": 4,
        "driver": "osmosdr",
        "device": "rtl=0"
    }, { 
        "center": 861350000,
        "rate": 2400000,
        "error": 2000,
        "gain": 50,
        "debugRecorders": 0,
        "digitalRecorders": 4,
        "driver": "osmosdr",
        "device": "rtl=1"
    }],
    "systems": [{
        "control_channels": [855212500, 856037500, 860787500, 860912500],
        "type": "p25",
        "shortName": "OhioMARCS",
        "talkgroupsFile": "./talkgroup.csv",
        "modulation": "qpsk"
    }]
}

trunk-record starts just fine, and begins scanning the configured frequencies, but it will abruptly seg-fault anywhere from 10 seconds to a couple minutes after starting. Here's an example of the console output during such a scenario:

[2025-01-31 23:28:47.020475] (info)   	 - System Source 0 - Min Freq: 853.909375 MHz Max Freq: 856.209375 MHz
[2025-01-31 23:28:47.406096] (info)   	 Xlating Channelizer decimator - freq_xlating taps: 91 Decim: 4 Resampled Rate: 24000 Lowpass Taps: 83
fix_cc :warning: Block (fix_cc0) max output buffer set to 10240 instead of requested 8192
fix_cc :warning: Block (fix_cc1) max output buffer set to 8192 instead of requested 10240
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
[2025-01-31 23:28:47.485722] (error)   [OhioMARCS]	 Control Channel Message Decode Rate: 0/sec, count:  1
[2025-01-31 23:28:50.020621] (error)   [OhioMARCS] Retuning to Control Channel: 856.037500 MHz
[2025-01-31 23:28:50.020728] (info)   	 - System Source 0 - Min Freq: 853.909375 MHz Max Freq: 856.209375 MHz
[2025-01-31 23:28:50.020838] (error)   [OhioMARCS]	 Control Channel Message Decode Rate: 0/sec, count:  1
[2025-01-31 23:28:53.018477] (error)   [OhioMARCS] Retuning to Control Channel: 860.787500 MHz
[2025-01-31 23:28:53.018606] (info)   	 - System Source 1 - Min Freq: 860.200000 MHz Max Freq: 862.500000 MHz
[2025-01-31 23:28:53.421444] (info)   	 Xlating Channelizer decimator - freq_xlating taps: 91 Decim: 4 Resampled Rate: 24000 Lowpass Taps: 83
fix_cc :warning: Block (fix_cc0) max output buffer set to 8192 instead of requested 10240
fix_cc :warning: Block (fix_cc1) max output buffer set to 10240 instead of requested 8192
Allocating 15 zero-copy buffers
Allocating 15 zero-copy buffers
[2025-01-31 23:28:53.505357] (error)   [OhioMARCS]	 Control Channel Message Decode Rate: 0/sec, count:  1
[2025-01-31 23:28:56.020145] (error)   [OhioMARCS] Retuning to Control Channel: 860.912500 MHz
[2025-01-31 23:28:56.020241] (info)   	 - System Source 1 - Min Freq: 860.200000 MHz Max Freq: 862.500000 MHz
[2025-01-31 23:28:56.020298] (error)   [OhioMARCS]	 Control Channel Message Decode Rate: 0/sec, count:  1
[2025-01-31 23:28:59.017980] (error)   [OhioMARCS] Retuning to Control Channel: 855.212500 MHz
[2025-01-31 23:28:59.018096] (info)   	 - System Source 0 - Min Freq: 853.909375 MHz Max Freq: 856.209375 MHz
[2025-01-31 23:28:59.029961] (info)   	 Xlating Channelizer decimator - freq_xlating taps: 91 Decim: 4 Resampled Rate: 24000 Lowpass Taps: 83
fix_cc :warning: Block (fix_cc0) max output buffer set to 10240 instead of requested 8192
fix_cc :warning: Block (fix_cc1) max output buffer set to 8192 instead of requested 10240
Segmentation fault

I followed the steps at https://trunkrecorder.com/docs/DEBUG in hopes of diagnosing the issue. Here's the output of gdb trunk-recorder core:

Reading symbols from trunk-recorder...

warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing

warning: Can't open file /dev/bus/usb/001/004 during file-backed mapping note processing

warning: exec file is newer than core file.
[New LWP 1975]
[New LWP 1840]
[New LWP 1843]
[New LWP 1842]
[New LWP 1841]
[New LWP 1846]
[New LWP 1845]
[New LWP 1860]
[New LWP 1849]
[New LWP 1844]
[New LWP 1848]
[New LWP 1847]
[New LWP 1977]
[New LWP 1857]
[New LWP 1858]
[New LWP 1850]
Core was generated by `trunk-recorder --config=./config.json'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ffeec702e4c in ?? ()
[Current thread is 1 (LWP 1975)]
(gdb) exit

I've tried re-compiling as well as several restarts. The OS is a clean install, and the only changes are those explained in the documentation. Any idea on what my next steps should be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions