"Segmentation Fault" Error with DSD 1.4.1 Ubunto

Status
Not open for further replies.

fdnybuff18

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
13
Reaction score
4
Location
NY
Getting a Segmentation Fault error after the program monitoring a channel with TRBO Data/Signal for about 5 minutes? Program then stops running. I noticed this only on TRBO Channels that are running constant data.

Any thoughts?
 

n4yek

Member
Joined
Apr 20, 2004
Messages
2,523
Reaction score
8
Location
Cosby, Tennessee
If you come up or get a solution, please post it. I asked this same question a few months ago with no solution.
 

mtindor

FMP24 PRO USER
Database Admin
Joined
Dec 5, 2006
Messages
11,713
Reaction score
2,989
Location
Carroll Co OH / EN90LN
If you come up or get a solution, please post it. I asked this same question a few months ago with no solution.

I _think_ that when I ran it using a few switches, it didn't happen -- but if I ran it without any switches it did happen. I'll test again today and let you guys know what specific switches I am using when it does _not_ crash.

Mike
 

mtindor

FMP24 PRO USER
Database Admin
Joined
Dec 5, 2006
Messages
11,713
Reaction score
2,989
Location
Carroll Co OH / EN90LN
I _think_ that when I ran it using a few switches, it didn't happen -- but if I ran it without any switches it did happen. I'll test again today and let you guys know what specific switches I am using when it does _not_ crash.

Mike

I was wrong. Switches or no switches, it still bails. It only does that on control channels spewing constant info. I never have it crap out on a voice transmission. Just long term constant CC info.

Mike
 

troffasky

Member
Joined
Apr 19, 2012
Messages
27
Reaction score
2
You will probably need to run it with a debugger and post the output here when it segfaults, unless you can work out exactly what input is causing it to segfault.
 

mtindor

FMP24 PRO USER
Database Admin
Joined
Dec 5, 2006
Messages
11,713
Reaction score
2,989
Location
Carroll Co OH / EN90LN
You can set up a batch file to restart it by creating a batch file in your dsd working directory:

* dmr.bat is the name of the batch file I run
* my working directory is c;\dsd -f yours is something else change cd\dsd
* the switches are specific to TRBO (with -xr because I need to switch invertedness on my particular audio card)
* I renamed my dsd.exe [from woodpecker, with filter] to dsd_filter.exe

Code:
echo off
set /a i=0

:loop
if %i%==1000 GOTO END
echo This is iteration %i%
cd\dsd
dsd_filter -ff -mg -xr -i /dev/dsp -o /dev/dsp
set /a i=%i%+1
GOTO loop

:end
echo That's It!

- this will restart it 1000 times (modify 1000 to set number of times you want it to restart)
- doesn't matter what you echo - you don't even need echo
- after all, you'll never see what's echoed during restarts most of the time

Mike
 

slicerwizard

Member
Joined
Sep 19, 2002
Messages
7,799
Reaction score
2,183
Location
Toronto, Ontario
The error is fairly obvious; the DSD authors allocate a 1,000,000 element array and point dibit_buf at its first entry; they then use the pointer dibit_buf_p to walk through the array, storing dibit values as they're generated by getDibit() or getFrameSync(); this is done so that they can step backwards to the start of a DMR frame when they find a DMR sync pattern (which is always located in the middle of a DMR frame)

Under most circumstances, frame decoding (of any supported protocol) stops when a channel drops (RF carrier goes away) and this leads to the noCarrier() function being called, where dibit_buf_p is reset to point back near the start of the array.

When monitoring DMR channels that don't go away (e.g. control channels), dibit_buf_p eventually walks off the end of the 1,000,000 allocated storage elements and starts clobbering whatever lays in its path. Before long, you get a segfault.
 

fdnybuff18

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
13
Reaction score
4
Location
NY
You can set up a batch file to restart it by creating a batch file in your dsd working directory:

* dmr.bat is the name of the batch file I run
* my working directory is c;\dsd -f yours is something else change cd\dsd
* the switches are specific to TRBO (with -xr because I need to switch invertedness on my particular audio card)
* I renamed my dsd.exe [from woodpecker, with filter] to dsd_filter.exe

Code:
echo off
set /a i=0

:loop
if %i%==1000 GOTO END
echo This is iteration %i%
cd\dsd
dsd_filter -ff -mg -xr -i /dev/dsp -o /dev/dsp
set /a i=%i%+1
GOTO loop

:end
echo That's It!

- this will restart it 1000 times (modify 1000 to set number of times you want it to restart)
- doesn't matter what you echo - you don't even need echo
- after all, you'll never see what's echoed during restarts most of the time

Mike

Mike,

This worked awesome.....

Thank you
 

mtindor

FMP24 PRO USER
Database Admin
Joined
Dec 5, 2006
Messages
11,713
Reaction score
2,989
Location
Carroll Co OH / EN90LN
Mike,

This worked awesome.....

Thank you

You're welcome. I'm glad it was of use to someone else :) In case anyone wondered, I just stole an example windows batch file loop that I found on the internet and modified things so that it restart my DSD.

Mike
 

krokus

Member
Premium Subscriber
Joined
Jun 9, 2006
Messages
6,238
Reaction score
1,695
Location
Southeastern Michigan
The error is fairly obvious; the DSD authors allocate a 1,000,000 element array and point dibit_buf at its first entry; they then use the pointer dibit_buf_p to walk through the array, storing dibit values as they're generated by getDibit() or getFrameSync(); this is done so that they can step backwards to the start of a DMR frame when they find a DMR sync pattern (which is always located in the middle of a DMR frame)

Under most circumstances, frame decoding (of any supported protocol) stops when a channel drops (RF carrier goes away) and this leads to the noCarrier() function being called, where dibit_buf_p is reset to point back near the start of the array.

When monitoring DMR channels that don't go away (e.g. control channels), dibit_buf_p eventually walks off the end of the 1,000,000 allocated storage elements and starts clobbering whatever lays in its path. Before long, you get a segfault.

They are using an array, instead of a bi-directional linklist?
 
Status
Not open for further replies.
Top