dl5di / OpenDV

Open Digital Voice software for Amateur Radio based on Jonathan Naylor's (G4KLX) "ircDDBGateway" and "PCRepeaterController" for D-Star
GNU General Public License v2.0
106 stars 63 forks source link

ircDDBGateway stops working when disconnecting from DPlus #47

Open F4FXL opened 8 years ago

F4FXL commented 8 years ago

ircDDBGateway stops working when connected to a DExtra reflector and than gets connected to a DPLus reflector.

Detailed repro
  1. Connected the gateway to a DPlus reflector through radio
  2. Send DPlus disconnection command over radio without
  3. ircDDBGateway stops
g4klx commented 8 years ago

It used to work, someone must have broken it.

  From: Geoffrey Merck <notifications@github.com>

To: dl5di/OpenDV OpenDV@noreply.github.com Sent: Sunday, 10 January 2016, 15:33 Subject: [OpenDV] ircDDBGateway stops working when disconnecting from DExtra and connecting to DPlus (#47)

ircDDBGateway stops working when connected to a DExtra reflector and than gets connected to a DPLus reflector Detailed repro 1 Connected the gateway to a Dextra reflector through radio 2 Send DPlus connection command over radio without prior disconnecting 3 ircDDBGateway stops— Reply to this email directly or view it on GitHub.

F4FXL commented 8 years ago

Yep, maybe during the wx3.0 upgrade, I will put my hands on it !

F4FXL commented 8 years ago

BTW how can I set an assignee to the issue ?

F4FXL commented 8 years ago

Cannot reproduce on my test system, only seem to appear on my production gateway ....

F4FXL commented 8 years ago

Actually it crashes whenever a DPlus reflector gets disconnected. Only on my production system. I have to debug using gdb as I do not have X on this machine ....

* Error in `/root/OpenDV/ircDDBGateway/ircDDBGateway/ircddbgatewayd': free(): invalid next size (fast): 0x00000000007c2f10 *

Program received signal SIGABRT, Aborted.
0x00007ffff5e8d657 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff5e8d657 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff5e8ea2a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff5ecbbb3 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff5ed100e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff5ed17eb in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x000000000041a9c8 in wxString::~wxString (this=0x80ccc0, __in_chrg=<optimized out>) at   /usr/include/wx-3.0/wx/string.h:393
#6  0x000000000046ed79 in CDPlusHandler::~CDPlusHandler (this=0x80cc90, __in_chrg=<optimized out>) at DPlusHandler.cpp:112
#7  0x000000000046f8a4 in CDPlusHandler::process (connect=...) at DPlusHandler.cpp:296
#8  0x00000000004258dd in CIRCDDBGatewayThread::processDPlus (this=0x7c5cf0) at IRCDDBGatewayThread.cpp:944
#9  0x00000000004216c7 in CIRCDDBGatewayThread::run (this=0x7c5cf0) at IRCDDBGatewayThread.cpp:353
#10 0x000000000040ebc4 in CIRCDDBGatewayAppD::run (this=0x7c1730) at IRCDDBGatewayAppD.cpp:207
#11 0x000000000040deb5 in main (argc=1, argv=0x7fffffffebe8) at IRCDDBGatewayAppD.cpp:140
F4FXL commented 8 years ago

This thing was driving me mad all night.... I think I finally got it sorted out....

It all starts in the DPlusHandler constructor where band char is added to m_callsign. If m_callssign is smaller than LONG_CALLSIGN_LENGTH the band char gets added "somewhere" (overrun ?) SetChar does not complain about a char being set outside the string boundaries. In the end when the DPlushandler gets deleted its internal members gets deleted also and we get an error from wxString destructor about freeing the wrong size. What I did to solve the issue :

I have no clue why it was only crashing on my production system....

F4FXL commented 8 years ago

I made a pull request, and will do some further testing during the day.

SpudGunMan commented 8 years ago

using the current build jan11-9PM-PST my time (this includes your patch)

I have tested this as follows with full operations no crashing

via RF issued the commands to do the following connected to REFxxx connected to XRFxxx connected to REFxxx sent unlink

so it seems like all is well - here (using arm-pi hardware)

F4FXL commented 8 years ago

Thank you for the feedback !

-------- Message d'origine -------- De : SpudGunMan notifications@github.com Date : 12/01/2016 06:29 (GMT+01:00) À : dl5di/OpenDV OpenDV@noreply.github.com Cc : Geoffrey Merck f4fxl@planetemax.com Objet : Re: [OpenDV] ircDDBGateway stops working when disconnecting from DPlus (#47)

using the current build jan11-9PM-PST my time (this includes your patch)

I have tested this as follows with full operations no crashing

via RF issued the commands to do the following

connected to REFxxx

connected to XRFxxx

connected to REFxxx

sent unlink

so it seems like all is well - here (using arm-pi hardware)

— Reply to this email directly or view it on GitHub.

ph0dv commented 8 years ago

I have this issue when i want to switch from a REF to a XRF. I can reproduce it 100%. It happens when i receive a station and at the same time i want to switch over to XRF. I work with Dummy repeater and a blue Dongle. Restart Dummy repeater is not enough. I need to restart ircddbgateway also. What happens that i get no respons messages any more like "Linked to XRF..."

ph0dv commented 8 years ago

here is a part of the log:

M: 2016-02-07 10:06:58: Opened hw:1,0 hw:0,0 Rate 48000 M: 2016-02-07 10:06:58: Starting ALSA reader thread M: 2016-02-07 10:06:58: Starting ALSA writer thread M: 2016-02-07 10:06:58: Header decoded - My: LA2QAA /DVAP Your: CQCQCQ Rpt1: PH0DV G Rpt2: PH0DV D E: 2016-02-07 10:07:03: Unknown DV Dongle header: 42 A0 M: 2016-02-07 10:07:03: Re-synchronising with the DV-Dongle E: 2016-02-07 10:07:03: Unknown DV Dongle header: 42 A0 M: 2016-02-07 10:07:03: Re-synchronising with the DV-Dongle E: 2016-02-07 10:07:03: Unknown DV Dongle header: 42 A0 M: 2016-02-07 10:07:03: Re-synchronising with the DV-Dongle E: 2016-02-07 10:07:03: Unknown DV Dongle header: 42 A0 M: 2016-02-07 10:07:03: Re-synchronising with the DV-Dongle E: 2016-02-07 10:07:03: Unknown DV Dongle header: 42 A0

F4FXL commented 8 years ago

Hi,

Which version are you using. Which os? which platform?

ph0dv commented 8 years ago

Hello,

I'm running debian jessie on a latitude | 2100 (small Laptop). De Dummyrepeater is from GITHUB OpenDV.... frome here... and is up to date with the latest Git Pull.

kind regards,

PH0DV Dick

F4FXL commented 8 years ago

Hi  Can you please try with ircddbgateway from git?

-------- Message d'origine -------- De : ph0dv notifications@github.com Date : 09/02/2016 13:37 (GMT+01:00) À : dl5di/OpenDV OpenDV@noreply.github.com Cc : Geoffrey Merck f4fxl@planetemax.com Objet : Re: [OpenDV] ircDDBGateway stops working when disconnecting from DPlus (#47)

Hello,

I'm running debian jessie on a latitude | 2100 (small Laptop). De Dummyrepeater is from GITHUB OpenDV.... frome here... and is up to date with the latest Git Pull.

kind regards,

PH0DV

Dick

— Reply to this email directly or view it on GitHub.

ph0dv commented 8 years ago

Sorry i don't think i understand you. I downloaded the complete package from here: dl5di/OpenDV . Also de ircddbgateway. On both GUI's (Dummy and Irccdb) is DEBUG in the header. Or do you mean from anoter location on GITHUB?

Kind regards,

Dick

F4FXL commented 8 years ago

Hi Dick,

ph0dv commented 8 years ago

Hello,

I'm working with the lastest GITHUB OpenDV with a DVDongle (Blue Dongle). On the PC is a microphone and a external spealer connected. No RF components.

I work with DUMMYREPEATER i.c.w. IRCDDBGATEWAY.

In the syslog i get a error "mutter-WARNING". I think this is because the "DUMMYREPEATER" is a little to big for this screen. But i'm not sure this is the reason. I'm not sure if this warning is related to the problem i have with crashing "DUMMYREPEATER". If i stop "DUMMYREPEATER" i also needs to stop "IRCDDBGATEWAY" to stop the error.

SYSLOG: Feb 10 23:25:34 apollo gnome-session[1105]: (gnome-shell:1245): mutter-WARNING _: STACK_OP_RAISE_ABOVE: window 0x5b01200016 not in stack Feb 10 23:25:34 apollo gnome-session[1105]: (gnome-shell:1245): mutter-WARNING _: STACK_OP_RAISEABOVE: window 0x5b01200016 not in stack Feb 10 23:25:34 apollo gnome-session[1105]: (gnome-shell:1245): mutter-WARNING *: STACK_OP_RAISEABOVE: window 0x5b01200016 not in stack Feb 10 23:25:34 apollo gnome-session[1105]: (gnome-shell:1245): mutter-WARNING *: STACK_OP_RAISE_ABOVE: window 0x5b01200016 not in stack Feb 10 23:25:34 apollo gnome-session[1105]: (gnome-shell:1245): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x5b01200016 not in stack

This is my system information:

ph0dv@apollo:~$ cat /proc/meminfo MemTotal: 1022452 kB

ph0dv@apollo:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 28 model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz stepping : 2 microcode : 0x212 cpu MHz : 1600.000 cache size : 512 KB

Display Display size 10.1 inches Resolution 1024 x 576 pixels External Monitor Interface Integrated Vertical Resolution 576

The problem is that when i connect to REF001C (example) and if there is a conversation going on and during this conversation i connect to XRF204B (example) my dongle crash.

This is 100% reproducable. This is also happening when i'm doubling with another station.

Then i get in the dummyrepeater log:

M: 2016-02-10 22:44:34: Re-synchronising with the DV-Dongle E: 2016-02-10 22:44:35: Unknown DV Dongle header: 32 81 M: 2016-02-10 22:44:35: Re-synchronising with the DV-Dongle E: 2016-02-10 22:44:35: Unknown DV Dongle header: 32 81 M: 2016-02-10 22:44:35: Re-synchronising with the DV-Dongle E: 2016-02-10 22:44:35: Unknown DV Dongle header: 32 81 M: 2016-02-10 22:44:35: Re-synchronising with the DV-Dongle

So you are running everything from latest github ?

Yes

root@apollo:~/OpenDV# git pull Already up-to-date.

Are both programs crashing ( Dummy and IRcddb) ?

Sometimes i only need to restart DummyRepeater and sometimes both.

What are you using Dummy for ?

For the DVDongle.

Please describe your setup very detailed

I did above.

Kind regards,

Dick

F4FXL commented 8 years ago

The bug this issue is about was actually that ircddbgateway dtopped working when disconnecting from a REF reflector. Can you try to disconnect from a REF without connection to anything else ?

SpudGunMan commented 8 years ago

I have no issues I can't replicate this.

Sent from a mobile device.

On Feb 13, 2016, at 3:17 AM, Geoffrey Merck notifications@github.com wrote:

The bug this issue is about was actually that ircddbgateway dtopped working when disconnecting from a REF reflector. Can you try to disconnect from a REF without connection to anything else ?

— Reply to this email directly or view it on GitHub.

F4FXL commented 8 years ago

@SpudGunMan I solved this issue a couple of weeks ago. I think this one has to deal with the ramining issues we have with DVAP ....

ph0dv commented 8 years ago

Disconnect during a conversation with the command REF001CU gives the same issue. I can see that ircddbgateway is stil responding on the next connecting commands. but no audio and no respons with the message "linked to R E F ...." Also no text in dummy repeater in the "Current".Restart Dummy repeater is enough to solve the issue.

ph0dv commented 8 years ago

When i use the ircddbremote app on my iphone i have no issue. then i can switch over to another reflector during a conversation. But then i still have the issue that dummyrepeater crashed at the moment i hit the transmitting button during a conversation. When i'm doubling.

n8ohu commented 8 years ago

You don't need to use the REF001C part; just put 7 spaces and U, to unlink.

ph0dv commented 8 years ago

That gives the same Issue. it's something with the webgui of dummyrepeater on my system. When i switch with the remote app there is no issue. I don't know how to fix the "mutter-WARNING" but i think there is a relation. I'm now looking for a way to activate the PTT via a external switch so that i don't need to touch the GUI of dummyrepeater.