robotastic / trunk-recorder

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

Repeated Segmentation Fault with P25 Phase 2 on Ubuntu 18.04 #376

Closed RossIV closed 3 years ago

RossIV commented 4 years ago

Background:
T-R version 3.2
Ubuntu 18.04 on Dell Optiplex 7040 Micro w/ i5-6600T, 16 GB RAM
Monitoring this system which has a mix of P25 Phase 1 and Phase 2 TGs.

Issue: It seems that every time a P25 Phase 2 TG comes up to be recorded, TR experiences a seg fault and crashes. Note that it does not crash if the TG is not marked to be recorded - it shows "Not recording because of priority" as expected. P25 Phase 1 records just fine with no issues.

Supporting Info: Last few lines of terminal output before the crash:

[2020-06-24 08:45:28.007883] (info)   [sog] TG:        352  Freq: 8.536250e+08  Ending Recorded Call - Last Update: 4s  Call Elapsed: 17
[2020-06-24 08:45:28.008011] (info)     - Stopping P25 Recorder Num [0] TG:        352  Freq: 8.536250e+08  TDMA: false Slot: 0
[2020-06-24 08:46:51.445318] (info)     - Starting P25 Recorder Num [0] TG:        351  Freq: 8.538500e+08  TDMA: false Slot: 0
[2020-06-24 08:46:51.445501] (info)   [sog] TG:        351  Freq: 8.538500e+08  Starting Recorder on Src: airspy
[2020-06-24 08:47:00.669471] (info)   [sog] TG:        208  Freq: 8.526250e+08  TG not in Talkgroup File
[2020-06-24 08:47:00.669618] (info)      P25 Recorder - Adjust Channel Resampled Rate: 24000 System Rate: 24000 ARB Rate: 1
Segmentation fault (core dumped)

That's all the CLI output I get, despite having it set to run in debug mode.

I see there have been seg fault issues with low signal before (this issue), but as best as I can tell my signal levels are fine. They're not amazing, but not horrible either. I'll run through some of the steps referenced in that issue to see if I can gather more data, but figured I'd go ahead and get this out there in case anyone else had other suggestions/comments. Any help is appreciated!

bctrainers commented 4 years ago

Could you upload both the core dump and the compiled recorder file to onedrive, dropbox,or some file hosting service?

The core dump will help diagnose where its faulting in the code.

RossIV commented 4 years ago

Done, here's the dump and the compiled recorder file https://drive.google.com/drive/folders/1PciJl3LN61Nia8Auo3em0k9JJ877ybVc?usp=sharing

loganwilliams commented 4 years ago

I am encountering this same issue with P25 Phase 2 on OS X 10.14.

bctrainers commented 4 years ago

Done, here's the dump and the compiled recorder file https://drive.google.com/drive/folders/1PciJl3LN61Nia8Auo3em0k9JJ877ybVc?usp=sharing

My apologies on the delay. Check the core dump now against the compiled recorder file. We shall see soon what is making it go belly up. :)

bctrainers commented 4 years ago

Hrm interesting. Appears that the segfault happens when a TDMA toggle occurs, and the recorder is possibly expecting phase 1 and not phase 2, but it's coming in with phase 2 data. ( @robotastic )

Core was generated by `./recorder --config=config-sog.json'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055e95904cbdc in p25_recorder::switch_tdma(bool) ()
[Current thread is 1 (LWP 2916)]
#0  0x000055e95904cbdc in p25_recorder::switch_tdma(bool) ()
#1  0x000055e95904d9cb in p25_recorder::start(Call*) ()
#2  0x000055e958f769c7 in start_recorder(Call*, TrunkMessage, System*) ()
#3  0x000055e958f78af7 in handle_call(TrunkMessage, System*) ()
#4  0x000055e958f7a1b8 in handle_message(std::vector<TrunkMessage, std::allocator<TrunkMessage> >, System*) ()
#5  0x000055e958f7a6e2 in monitor_messages() ()
#6  0x000055e958f71988 in main ()
#0  0x000055e95904cbdc in p25_recorder::switch_tdma(bool) ()
No symbol table info available.
#1  0x000055e95904d9cb in p25_recorder::start(Call*) ()
No symbol table info available.
#2  0x000055e958f769c7 in start_recorder(Call*, TrunkMessage, System*) ()
No symbol table info available.
#3  0x000055e958f78af7 in handle_call(TrunkMessage, System*) ()
No symbol table info available.
#4  0x000055e958f7a1b8 in handle_message(std::vector<TrunkMessage, std::allocator<TrunkMessage> >, System*) ()
No symbol table info available.
#5  0x000055e958f7a6e2 in monitor_messages() ()
No symbol table info available.
#6  0x000055e958f71988 in main ()
No symbol table info available.
loganwilliams commented 4 years ago

Is there enough information from RossIV's core dump to debug this issue? Or would it be helpful to have another sample?

bctrainers commented 4 years ago

Is there enough information from RossIV's core dump to debug this issue? Or would it be helpful to have another sample?

More the merrier.

For those wishing to debug it locally, apt install gdb then gdb dumpfile.core recorder when it runs, bt and then bt full - one just shows more details than the other on the backtrace. :)

robotastic commented 4 years ago

It looks like it is crashing in this function. It could be that some of the variables in here are being set incorrectly somewhere else. There isn't anything too complex happening here though... weird! https://github.com/robotastic/trunk-recorder/blob/master/trunk-recorder/recorders/p25_recorder.cc#L340

loganwilliams commented 4 years ago

In my case I incorrectly had "modulation": "fsk4" instead of qpsk in my config.json.

For me, the function was segfaulting when costas_clock->update_omega(omega); is called, because costas_clock is only defined in initialize_qpsk, not in initialize_fsk4.

Kingscup20 commented 4 years ago

I am very new to all this but I am also receiving a segfault. On a RPi 4 with SDRplay. It works with lower sample rates (2000000 and lower) but not higher rates. It is for conventional analog.

Program terminated with signal SIGSEGV, Segmentation fault.

0 0xb6fb842c in ?? ()

[Current thread is 1 (LWP 26338)]

RossIV commented 4 years ago

Looks like @loganwilliams may have my solution. I changed to qpsk and things appear stable now. Been running for over an hour compared to just a few minutes before.

Dygear commented 4 years ago

Not sure if this is the same issue, but I'm also getting a seg fault. I am actually using qpsk and that's not helping. First time this has happened. Once my one line change was merged, I download the entire thing all over again and checked to see if it's working well. Compiled and rebuilt my SCPD receive site that's been having issues with the new 3.3 build. I got it to capture some traffic, but now it's seg faulting very quickly. After maybe 3 calls to the start_recorder() function

(By the way, fsk4 doesn't capture the control channel at all. It NEEDS qpsk in order to start decoding anything.)

pi@MimoSDR-MSU1:~/trunk-recorder $ gdb ./recorder 
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./recorder...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/pi/trunk-recorder/recorder 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[2020-10-18 18:04:42.851614] (info)   Using Config file: ./config.json

[2020-10-18 18:04:42.852756] (info)   
-------------------------------------
     Trunk Recorder
-------------------------------------

[2020-10-18 18:04:42.852823] (info)   
-------------------------------------
SYSTEMS
-------------------------------------

[2020-10-18 18:04:42.852943] (info)   

System Number: 1
-------------------------------------

[2020-10-18 18:04:42.852996] (info)   Short Name: SCPD
[2020-10-18 18:04:42.853027] (info)   System Type: p25
[2020-10-18 18:04:42.853060] (info)   Control Channels: 
[2020-10-18 18:04:42.853100] (info)     851.162500 MHz
[2020-10-18 18:04:42.853197] (info)     852.425000 MHz
[2020-10-18 18:04:42.853248] (info)     852.675000 MHz
[2020-10-18 18:04:42.853295] (info)     852.737500 MHz
[2020-10-18 18:04:42.853349] (info)   Modulation: qpsk
[2020-10-18 18:04:42.853378] (info)   Analog Recorder Maximum Deviation: 4000
[2020-10-18 18:04:42.853409] (info)   Filter Width: 1
[2020-10-18 18:04:42.853441] (info)   Squelch: 0
[2020-10-18 18:04:42.853474] (info)   API Key: 
[2020-10-18 18:04:42.853503] (info)   Broadcastify API Key: 
[2020-10-18 18:04:42.853532] (info)   Broadcastify Calls System ID: 0
[2020-10-18 18:04:42.853562] (info)   Upload Script: 
[2020-10-18 18:04:42.853591] (info)   Call Log: true
[2020-10-18 18:04:42.853630] (info)   Audio Archive: true
[2020-10-18 18:04:42.853660] (info)   Loading Talkgroups...
[2020-10-18 18:04:42.854358] (info)   Read 69 talkgroups.
[2020-10-18 18:04:42.854406] (info)   Talkgroups File: SCPD.csv
[2020-10-18 18:04:42.854437] (info)   Loading Unit Tags...
[2020-10-18 18:04:42.854465] (info)   Unit Tags File: 
[2020-10-18 18:04:42.854493] (info)   Record Unknown Talkgroups: true
[2020-10-18 18:04:42.854523] (info)   Decode MDC: false
[2020-10-18 18:04:42.854551] (info)   Decode FSync: false
[2020-10-18 18:04:42.854579] (info)   Decode Star: false
[2020-10-18 18:04:42.854608] (info)   Decode TPS: false
[2020-10-18 18:04:42.854639] (info)   Talkgroup Display Format: tag_id
[2020-10-18 18:04:42.854673] (info)   Hide Encrypted Talkgroups: false
[2020-10-18 18:04:42.854702] (info)   Hide Unknown Talkgroups: false
[2020-10-18 18:04:42.854740] (info)   Minimum Call Duration (in seconds): 1
[2020-10-18 18:04:42.854775] (info)   
[2020-10-18 18:04:42.854810] (info)   

-------------------------------------
SOURCES
-------------------------------------

[2020-10-18 18:04:42.854898] (info)   Driver: osmosdr
[2020-10-18 18:04:42.854928] (info)   Center: 852.306250 MHz
[2020-10-18 18:04:42.854980] (info)   Rate: 3200000
[2020-10-18 18:04:42.855025] (info)   Error: 0
[2020-10-18 18:04:42.855062] (info)   PPM Error: 0
[2020-10-18 18:04:42.855092] (info)   Auto gain control: false
[2020-10-18 18:04:42.855121] (info)   Gain: 28
[2020-10-18 18:04:42.855158] (info)   IF Gain: 0
[2020-10-18 18:04:42.855189] (info)   BB Gain: 0
[2020-10-18 18:04:42.855220] (info)   LNA Gain: 0
[2020-10-18 18:04:42.855251] (info)   PGA Gain: 0
[2020-10-18 18:04:42.855282] (info)   TIA Gain: 0
[2020-10-18 18:04:42.855312] (info)   MIX Gain: 0
[2020-10-18 18:04:42.855343] (info)   VGA1 Gain: 0
[2020-10-18 18:04:42.855373] (info)   VGA2 Gain: 0
[2020-10-18 18:04:42.855404] (info)   Idle Silence: false
[2020-10-18 18:04:42.855432] (info)   Digital Recorders: 4
[2020-10-18 18:04:42.855467] (info)   Debug Recorder: false
[2020-10-18 18:04:42.855522] (info)   SigMF Recorders: 0
[2020-10-18 18:04:42.855551] (info)   Analog Recorders: 0
[2020-10-18 18:04:42.855650] (info)   Source Device: rtl=MSU1
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.13.4
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp 
[New Thread 0xb2538dd0 (LWP 1596)]
[Thread 0xb2538dd0 (LWP 1596) exited]
[New Thread 0xb2538dd0 (LWP 1597)]
[Thread 0xb2538dd0 (LWP 1597) exited]
[New Thread 0xb2538dd0 (LWP 1598)]
[Thread 0xb2538dd0 (LWP 1598) exited]
[New Thread 0xb2538dd0 (LWP 1599)]
Using device #1[Thread 0xb2538dd0 (LWP 1599) exited]
[New Thread 0xb2538dd0 (LWP 1600)]
 MimoCAD MimoSDR SN: MSU1
[Thread 0xb2538dd0 (LWP 1600) exited]
[New Thread 0xb2538dd0 (LWP 1601)]
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[2020-10-18 18:04:43.470822] (info)   SOURCE TYPE OSMOSDR (osmosdr)
[2020-10-18 18:04:43.470953] (info)   Setting sample rate to: 3200000
[R82XX] PLL not locked!
[2020-10-18 18:04:43.588541] (info)   Actual sample rate: 3200000
[2020-10-18 18:04:43.588698] (info)   Tuning to 852.306250 MHz
[2020-10-18 18:04:43.640459] (info)   Gain Stage: LNA supported values: 0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48 49.6 
[2020-10-18 18:04:43.640586] (info)   Max Frequency: 853.842250 MHz
[2020-10-18 18:04:43.640701] (info)   Min Frequency: 850.770250 MHz
[2020-10-18 18:04:43.666421] (info)   Gain set to: 28
[2020-10-18 18:04:43.666575] (info)   Auto gain control is OFF
[2020-10-18 18:04:43.666681] (info)   Setting antenna to [RX]
Decim: 32 Decim2:  4
[2020-10-18 18:04:43.668766] (info)      P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 6250 FB: 12500 System Rate: 3200000
[2020-10-18 18:04:43.712094] (info)      P25 Recorder ARB - Initial Rate: 3200000 Resampled Rate: 25000 Initial Decimation: 32 System Rate: 24000 ARB Rate: 0.96
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
Decim: 32 Decim2:  4
[2020-10-18 18:04:43.736448] (info)      P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 6250 FB: 12500 System Rate: 3200000
[2020-10-18 18:04:43.773769] (info)      P25 Recorder ARB - Initial Rate: 3200000 Resampled Rate: 25000 Initial Decimation: 32 System Rate: 24000 ARB Rate: 0.96
Decim: 32 Decim2:  4
[2020-10-18 18:04:43.783119] (info)      P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 6250 FB: 12500 System Rate: 3200000
[2020-10-18 18:04:43.798978] (info)      P25 Recorder ARB - Initial Rate: 3200000 Resampled Rate: 25000 Initial Decimation: 32 System Rate: 24000 ARB Rate: 0.96
Decim: 32 Decim2:  4
[2020-10-18 18:04:43.816347] (info)      P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 6250 FB: 12500 System Rate: 3200000
[2020-10-18 18:04:43.832144] (info)      P25 Recorder ARB - Initial Rate: 3200000 Resampled Rate: 25000 Initial Decimation: 32 System Rate: 24000 ARB Rate: 0.96
[2020-10-18 18:04:43.842426] (info)   
-------------------------------------

[2020-10-18 18:04:43.842506] (info)   

-------------------------------------
INSTANCE
-------------------------------------

[2020-10-18 18:04:43.842600] (info)   Capture Directory: ./audio
[2020-10-18 18:04:43.842636] (info)   Upload Server: 
[2020-10-18 18:04:43.842667] (info)   Broadcastify Calls Server: 
[2020-10-18 18:04:43.842699] (info)   Status Server: 
[2020-10-18 18:04:43.842729] (info)   Instance Key: 
[2020-10-18 18:04:43.842758] (info)   Instance Id: 
[2020-10-18 18:04:43.842789] (info)   Broadcast Signals: false
[2020-10-18 18:04:43.842820] (info)   Default Mode: digital
[2020-10-18 18:04:43.842848] (info)   Call Timeout (seconds): 3
[2020-10-18 18:04:43.842904] (info)   Log to File: true
[2020-10-18 18:04:43.842936] (info)   Control channel warning rate: 10
[2020-10-18 18:04:43.842967] (info)   Control channel retune limit: 0
[2020-10-18 18:04:43.842995] (info)   Frequency format: 1
[2020-10-18 18:04:43.843023] (info)   Status as String: true
[2020-10-18 18:04:43.843053] (info)   Log Level: info
[2020-10-18 18:04:43.843258] (info)   [SCPD]    Started with Control Channel: 851.162500 MHz
Decim: 32 Decim2:  4
[2020-10-18 18:04:43.844072] (info)      P25 Trunking two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 6250 FB: 12500 System Rate: 3200000
[2020-10-18 18:04:43.860738] (info)      P25 Trunking ARB - Initial Rate: 3200000 Resampled Rate: 25000 Initial Decimation: 32 System Rate: 24000 ARB Rate: 0.96
[New Thread 0xb0906dd0 (LWP 1602)]
[New Thread 0xb0105dd0 (LWP 1603)]
[New Thread 0xaf5fedd0 (LWP 1604)]
[New Thread 0xaedfddd0 (LWP 1605)]
[New Thread 0xae3fedd0 (LWP 1606)]
[New Thread 0xad9fedd0 (LWP 1607)]
[New Thread 0xacffedd0 (LWP 1608)]
[New Thread 0xac7fddd0 (LWP 1609)]
Allocating 15 zero-copy buffers
[New Thread 0xabdfedd0 (LWP 1610)]
[New Thread 0xab5fddd0 (LWP 1611)]
[New Thread 0xaadfcdd0 (LWP 1612)]
[New Thread 0xaa5fbdd0 (LWP 1613)]
[New Thread 0xa9dfadd0 (LWP 1614)]
[New Thread 0xa95f9dd0 (LWP 1615)]
[New Thread 0xa8df8dd0 (LWP 1616)]
[New Thread 0xa85f7dd0 (LWP 1617)]
[New Thread 0xa7df6dd0 (LWP 1618)]
[New Thread 0xa75f5dd0 (LWP 1619)]
[New Thread 0xa6df4dd0 (LWP 1620)]
[New Thread 0xa65f3dd0 (LWP 1621)]
[New Thread 0xa5df2dd0 (LWP 1622)]
[New Thread 0xa55f1dd0 (LWP 1623)]
[New Thread 0xa4df0dd0 (LWP 1624)]
[New Thread 0xa45efdd0 (LWP 1625)]
[New Thread 0xa3deedd0 (LWP 1626)]
[New Thread 0xa35eddd0 (LWP 1627)]
[New Thread 0xa2decdd0 (LWP 1628)]
[New Thread 0xa25ebdd0 (LWP 1629)]
[New Thread 0xa1deadd0 (LWP 1630)]
[New Thread 0xa15e9dd0 (LWP 1631)]
[New Thread 0xa0de8dd0 (LWP 1632)]
[New Thread 0xa05e7dd0 (LWP 1633)]
[New Thread 0x9fde6dd0 (LWP 1634)]
[New Thread 0x9f5a5dd0 (LWP 1635)]
[New Thread 0x9eda4dd0 (LWP 1636)]
[New Thread 0x9e563dd0 (LWP 1637)]
[New Thread 0x9dd62dd0 (LWP 1638)]
[New Thread 0x9d561dd0 (LWP 1639)]
[New Thread 0x9cd20dd0 (LWP 1640)]
[New Thread 0x9c51fdd0 (LWP 1641)]
[New Thread 0x9bd1edd0 (LWP 1642)]
[New Thread 0x9b51ddd0 (LWP 1643)]
[New Thread 0x9ad1cdd0 (LWP 1644)]
[New Thread 0x9a51bdd0 (LWP 1645)]
[New Thread 0x99d1add0 (LWP 1646)]
[New Thread 0x99519dd0 (LWP 1647)]
[New Thread 0x98d18dd0 (LWP 1648)]
[New Thread 0x98517dd0 (LWP 1649)]
[New Thread 0x97d16dd0 (LWP 1650)]
[New Thread 0x97515dd0 (LWP 1651)]
[New Thread 0x96d14dd0 (LWP 1652)]
[New Thread 0x96513dd0 (LWP 1653)]
[New Thread 0x95d12dd0 (LWP 1654)]
[New Thread 0x95511dd0 (LWP 1655)]
[New Thread 0x94d10dd0 (LWP 1656)]
[New Thread 0x9450fdd0 (LWP 1657)]
[New Thread 0x93d0edd0 (LWP 1658)]
[New Thread 0x9350ddd0 (LWP 1659)]
[New Thread 0x92d0cdd0 (LWP 1660)]
[New Thread 0x9250bdd0 (LWP 1661)]
[New Thread 0x91d0add0 (LWP 1662)]
[New Thread 0x91509dd0 (LWP 1663)]
[New Thread 0x90d08dd0 (LWP 1664)]
[New Thread 0x90507dd0 (LWP 1665)]
[New Thread 0x8fd06dd0 (LWP 1666)]
[New Thread 0x8f505dd0 (LWP 1667)]
[New Thread 0x8ed04dd0 (LWP 1668)]
[New Thread 0x8e503dd0 (LWP 1669)]
[New Thread 0x8dd02dd0 (LWP 1670)]
[New Thread 0x8d501dd0 (LWP 1671)]
[New Thread 0x8cd00dd0 (LWP 1672)]
[New Thread 0x8c4ffdd0 (LWP 1673)]
[New Thread 0x8bcfedd0 (LWP 1674)]
[New Thread 0x8b4fddd0 (LWP 1675)]
[New Thread 0x8acfcdd0 (LWP 1676)]
[New Thread 0x8a4fbdd0 (LWP 1677)]
[New Thread 0x89cfadd0 (LWP 1678)]
[New Thread 0x894f9dd0 (LWP 1679)]
[New Thread 0x88cf8dd0 (LWP 1680)]
[New Thread 0x884f7dd0 (LWP 1681)]
[New Thread 0x87cf6dd0 (LWP 1682)]
[New Thread 0x874f5dd0 (LWP 1683)]
[New Thread 0x86cf4dd0 (LWP 1684)]
[New Thread 0x864f3dd0 (LWP 1685)]
[New Thread 0x85cf2dd0 (LWP 1686)]
[New Thread 0x854f1dd0 (LWP 1687)]
[New Thread 0x84cf0dd0 (LWP 1688)]
[New Thread 0x844efdd0 (LWP 1689)]
[New Thread 0x83ceedd0 (LWP 1690)]
[New Thread 0x834eddd0 (LWP 1691)]
[New Thread 0x82cecdd0 (LWP 1692)]
[New Thread 0x824ebdd0 (LWP 1693)]
[New Thread 0x81ceadd0 (LWP 1694)]
[New Thread 0x814e9dd0 (LWP 1695)]
[New Thread 0x80ce8dd0 (LWP 1696)]
[New Thread 0x804e7dd0 (LWP 1697)]
[New Thread 0x7fce6dd0 (LWP 1698)]
[New Thread 0x7f4e5dd0 (LWP 1699)]
[New Thread 0x7ece4dd0 (LWP 1700)]
[New Thread 0x7e4e3dd0 (LWP 1701)]
[New Thread 0x7dce2dd0 (LWP 1702)]
[New Thread 0x7d4e1dd0 (LWP 1703)]
[New Thread 0x7cce0dd0 (LWP 1704)]
[New Thread 0x7c4dfdd0 (LWP 1705)]
[New Thread 0x7bcdedd0 (LWP 1706)]
[New Thread 0x7b4dddd0 (LWP 1707)]
[New Thread 0x7acdcdd0 (LWP 1708)]
[New Thread 0x7a4dbdd0 (LWP 1709)]
[New Thread 0x79cdadd0 (LWP 1710)]
[New Thread 0x794d9dd0 (LWP 1711)]
[New Thread 0x78cd8dd0 (LWP 1712)]
[New Thread 0x784d7dd0 (LWP 1713)]
[New Thread 0x77cd6dd0 (LWP 1714)]
[New Thread 0x774d5dd0 (LWP 1715)]
[New Thread 0x76cd4dd0 (LWP 1716)]
[New Thread 0x764d3dd0 (LWP 1717)]
[New Thread 0x75cd2dd0 (LWP 1718)]
[New Thread 0x754d1dd0 (LWP 1719)]
[New Thread 0x74cd0dd0 (LWP 1720)]
[New Thread 0x744cfdd0 (LWP 1721)]
[New Thread 0x73ccedd0 (LWP 1722)]
[New Thread 0x734cddd0 (LWP 1723)]
[New Thread 0x72cccdd0 (LWP 1724)]
[New Thread 0x724cbdd0 (LWP 1725)]
[New Thread 0x71ccadd0 (LWP 1726)]
[New Thread 0x714c9dd0 (LWP 1727)]
[New Thread 0x70cc8dd0 (LWP 1728)]
[New Thread 0x704c7dd0 (LWP 1729)]
[New Thread 0x6fcc6dd0 (LWP 1730)]
[2020-10-18 18:04:46.001811] (error)   [SCPD] Retuning to Control Channel: 852.425000 MHz
[2020-10-18 18:04:46.002112] (info)      - System Source 0 - Min Freq: 850.770250 MHz Max Freq: 853.842250 MHz
[2020-10-18 18:04:46.002453] (error)   [SCPD]    Control Channel Message Decode Rate: 0.666667/sec, count:  2
[2020-10-18 18:04:49.007724] (error)   [SCPD] Retuning to Control Channel: 852.675000 MHz
[2020-10-18 18:04:49.011225] (info)      - System Source 0 - Min Freq: 850.770250 MHz Max Freq: 853.842250 MHz
[2020-10-18 18:04:49.011610] (error)   [SCPD]    Control Channel Message Decode Rate: 1/sec, count:  3
[2020-10-18 18:04:52.010044] (error)   [SCPD]    Control Channel Message Decode Rate: 3.33333/sec, count:  10
[2020-10-18 18:05:01.007426] (error)   [SCPD] Retuning to Control Channel: 852.737500 MHz
[2020-10-18 18:05:01.007743] (info)      - System Source 0 - Min Freq: 850.770250 MHz Max Freq: 853.842250 MHz
[2020-10-18 18:05:01.008871] (error)   [SCPD]    Control Channel Message Decode Rate: 1/sec, count:  3
[2020-10-18 18:05:01.958681] (info)   [SCPD]    TG:            SCPD 4th Pct (      3411)    Freq:   0.000000 MHz    Not Recording: no source covering Freq
[2020-10-18 18:05:02.566263] (info)   [SCPD]    TG:            SUNY PD CH 3 (        91)    Freq:   0.000000 MHz    Not Recording: no source covering Freq
[2020-10-18 18:05:02.940772] (info)   [SCPD]    TG:            SCPD 1st Pct (      3111)    Freq:   0.000000 MHz    Not Recording: no source covering Freq
[2020-10-18 18:05:03.517166] (info)   [SCPD]    Decoding System ID 3CE WACN: BEE00 NAC: 3C4
[2020-10-18 18:05:05.023183] (info)     - Starting P25 Recorder Num [0] TG:             MEDCOM East (       151)    Freq: 851.087500 MHz    TDMA: false Slot: 0 Mod: true
[2020-10-18 18:05:05.023618] (info)   [SCPD]    TG:             MEDCOM East (       151)    Freq: 851.087500 MHz    Starting Recorder on Src: rtl=MSU1

Thread 1 "recorder" received signal SIGSEGV, Segmentation fault.
0x0003e59c in start_recorder(Call*, TrunkMessage, System*) ()
(gdb) bt
#0  0x0003e59c in start_recorder(Call*, TrunkMessage, System*) ()
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
bctrainers commented 4 years ago

I assume bt full isn't showing anything more than what the generic bt command has dumped in gdb?

robotastic commented 4 years ago

@Dygear I think I just fixed the crash you had. It looks like the PR you submitted didn't check to make sure there was a Talkgroup found for that TG number, so it sometimes checked for encryption on a NULL talkgroup. I just pushed a fix, give that a try.

Dygear commented 4 years ago

@Dygear I think I just fixed the crash you had. It looks like the PR you submitted didn't check to make sure there was a Talkgroup found for that TG number, so it sometimes checked for encryption on a NULL talkgroup. I just pushed a fix, give that a try.

Clearly when I wrote

The only other place this is checked is for A as in analog, so it shouldn't break anything else.

What I actually meant was, I was going to break EVERYTHING. Lol, sorry about that. That didn't happen at all in my NCPD system and I'm pretty sure I'm not covering all of the talk groups in the talkgroup.csv file there. It did happen in the SCPD system tho. So that's interesting.

(And yes, that did fix the crash! Thank you @robotastic)

robotastic commented 3 years ago

No Worries!! This program has gotten so complicated that there is no longer just a simple change. I keep having to relearn this with every change I make. It was a great idea - I will go add in a note in the docs.