robotastic / trunk-recorder

Records calls from a Trunked Radio System (P25 & SmartNet)
GNU General Public License v3.0
827 stars 191 forks source link

Segmentation fault on rates higher than 10 MHz #934

Open srs4511351 opened 3 months ago

srs4511351 commented 3 months ago

I have a Raspberry Pi 4 with Debian Bookworm. I have trunk-recorder working on my HackRF up to 10 MHz sample rate, but if I set it higher, I get the Segmentation fault and these errors in the terminal.

...
[2024-03-10 01:06:50.924596] (info)   [MPSCS]   Started with Control Channel: 853.250000 MHz
[2024-03-10 01:06:50.925459] (info)      P25 Trunking two-stage decimator - Initial decimated rate: 96000 Second decimated rate: 24000 FA: 6250 FB: 12000 System Rate: 12000000
[2024-03-10 01:06:50.943820] (info)      P25 Trunking ARB - Initial Rate: 12000000 Resampled Rate: 24000 Initial Decimation: 125 System Rate: 24000 ARB Rate: 1
Segmentation fault

Here is my config file:

{
    "ver": 2,

    "sources":   [{
        "center": 856150000,
        "rate": 12000000,
        "error": 300,
        "ppm": 0,
        "gain": 0,
        "rfGain": 0,
    "ifGain": 40,
    "bbGain": 18,
        "digitalRecorders": 2,
        "driver": "osmosdr",
    "device": "hackrf"
    }],
    "systems": [{
        "control_channels": [853250000, 855087500, 855287500],
        "type": "p25",
    "talkgroupsFile": "michigan_talkgroups.csv",
    "recordUnknown": true,
        "shortName": "MPSCS",
    "hideUnknownTalkgroups": false,
        "modulation": "qpsk",
        "audioArchive": false,
        "transmissionArchive": false
    }],
    "plugins": [
    {
          "name": "rdioscanner_uploader",
          "library": "librdioscanner_uploader.so",
          "server": "http://127.0.0.1:3000",
          "systems": [{
                  "shortName": "MPSCS",
                  "apiKey": "9e5cf154-7456-42d8-8bb5-8ba38a2c3034",
                  "systemId": 796
          }]
    }
    ],
"broadcastSignals": false
}

In issue #920, it looks like someone was able to do it.

Does anyone know why this is happening?

robotastic commented 3 months ago

What version of Trunk Recorder are you using? Is it the Master branch off of GitHub? Can you try capturing the Core dump and running GDB to figure out where it is crashing?

srs4511351 commented 3 months ago

Trunk-Recorder: Version: 4.7.1 The branch is 'origin/master'

On my system ulimit -c prints 0, which is the maximum size of core files created.

I have attached the output from gdb. Please let me know if this is good enough.

gdb.txt

srs4511351 commented 3 months ago

The above process ended in:

Thread 18 "hackrf_source_c" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fdfffec40 (LWP 2491)]
0x0000007ff6dd1f78 in hackrf_source_c::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) ()
   from /usr/local/lib/aarch64-linux-gnu/libgnuradio-osmosdr.so.0.2.0

To get the debug info, I typed thread apply all bt

adeweever91 commented 1 month ago

were you able to resolve this? I have a similar issue when running in docker. i saw some posts that seemed to indicate it can help to change the hackrf firmware but havent tried any different versions yet

srs4511351 commented 3 weeks ago

I have not been able to get HackRF working on sample rates higher than 10 MHz with trunk-recorder.

I do keep my firmware up to date, but it works with SDRglut, gqrx and other SDR software at the full 20 MHz, so that isolates the problem to trunk-recorder.

srs4511351 commented 3 weeks ago

Have you tried 20 MHz with the soapy device? I haven't tried that yet.