Please do not post questions in the shout-box as it will be lost in a few days. Open your own topic in the appropriate section. Thank you.

Recent posts

#61
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 06, 2025, 06:21 AM
It tried to restart, but failed.
Changed some more parameters, test some more, if they work I post them.

As for putting IP-tables in cron, that is not a good idea.
They only need to be inserted once after a reboot, else they keep growing to no purpose.

See here to make them stick: https://linuxconfig.org/how-to-make-iptables-rules-persistent-after-reboot-on-linux

I just did a quick blocking as I have no other rules. ;)
#62
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by 9a7aof - Jul 05, 2025, 05:39 PM
Hi Bas,

I testing new new version script for start phantom websdr  :)

Quoteroot@Siemens:/home/websdr# service websdr status
● websdr.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/websdr.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-07-05 17:07:08 CEST; 11min ago
   Main PID: 694 (start-websdr.sh)
      Tasks: 11 (limit: 9253)
     Memory: 231.0M
        CPU: 25min 28.976s
     CGroup: /system.slice/websdr.service
             ├─694 /bin/bash /home/websdr/PhantomSDR-Plus/start-websdr.sh
             └─697 build/spectrumserver --config config-rx888mk2.toml

Quoteroot@Siemens:/home/websdr# service receiver status
● receiver.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/receiver.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-07-05 17:07:08 CEST; 31min ago
   Main PID: 630 (start-receiver.)
      Tasks: 4 (limit: 9253)
     Memory: 7.8M
        CPU: 3min 51.355s
     CGroup: /system.slice/receiver.service
             ├─630 /bin/bash /home/websdr/PhantomSDR-Plus/start-receiver.sh
             └─698 ./rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 44000000 -g 30 -m high -a 13 -d --pga -o -

srp 05 17:07:06 Siemens systemd[1]: Starting receiver.service - PhantomSDRPlus WebSDR...
srp 05 17:07:08 Siemens systemd[1]: Started receiver.service - PhantomSDRPlus WebSDR.
srp 05 17:07:13 Siemens start-receiver.sh[698]: Attenuation: 13
srp 05 17:07:13 Siemens start-receiver.sh[698]: Gain: 158

I run iptables from cron.

Best regards,
Darko,9a7aof
#63
PhantomSDR Bugs / Re: SDR-list bug...
Last post by 9a7aof - Jul 05, 2025, 05:31 PM
Hello everyone,

and especially to the author of sdr-list.

I'm not a programmer, just a happy Linux user since 1996.

I am interested in whether it is somehow possible to ban several sections of one ip number running the server on one port in the list.

So, add a filter so that a server can only be seen once if it has only one active PhantomSDR+ port.

These phantom phantoms seem "a little" frivolous.

Best regards,
Darko, 9a7aof
#64
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 05, 2025, 01:53 PM
Nope, not working either and again bad alloc stuff....

So I took receiver and spectrum apart as service....hopefully this works.

websdr.service

[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target receiver.service
After=receiver.service

[Service]
PIDFile=/run/websdr.pid
ExecStart=/opt/PhantomSDR-Plus/start-websdr.sh
Type=exec
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=websdr.service

receiver.service

[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target
Before=websdr.service

[Service]
PIDFile=/run/receiver.pid
ExecStart=/opt/PhantomSDR-Plus/start-receiver.sh
Type=exec
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=receiver.service

start-websdr.sh

#!/bin/bash
cd /opt/PhantomSDR-Plus/

## Files to load
FIFO=fifo.fifo
TOML=config-rx888mk2.toml

[ ! -e "$FIFO" ] && mkfifo $FIFO

build/spectrumserver --config $TOML < $FIFO

#exit

start-receiver.sh

#!/bin/bash
cd /opt/PhantomSDR-Plus/

## Files to load
FIFO=fifo.fifo
TOML=config-rx888mk2.toml

[ ! -e "$FIFO" ] && mkfifo $FIFO

#Without PGA
rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -g 40 -a 0 -m low -o - > $FIFO

#exit

And we are testing again....pfffff....
#65
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 05, 2025, 09:03 AM
Doesn't matter still crashes with longjumps.
So I changed it again..... :o

systemd websdr.service :

[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target

[Service]
PIDFile=/run/websdr.pid
ExecStart=/opt/PhantomSDR-Plus/start-websdr.sh
Type=simple
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=websdr.service

start-websdr.sh

#!/bin/bash
cd /opt/PhantomSDR-Plus/

### STOP CRASH Injections!!!!
##If no other rules apply, flushing is easier

iptables -D INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -D INPUT -m string --algo kmp --string "device.rsp" -j DROP

iptables -A INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -A INPUT -m string --algo kmp --string "device.rsp" -j DROP

./rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -g 30 -m low -o - | ./build/spectrumserver --config config-rx888mk2.toml

exit

Let's hope this works, maybe it's systemd causing to restart spectrum on the same port, causing it....

Fingers crossed.



#66
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by 9a7aof - Jul 04, 2025, 07:11 PM
Hi Bas,

please fix the line:
Quoterx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > >

It has to be like this and then it works (for me):
rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > $FIFO &
Best regards,
Darko, 9a7aof


#67
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 04, 2025, 05:29 PM
Ok, that all didn't work.

So I took out some compiler options and let it run with -O0, no optimize....that costed a lot of CPU 68% normal to 97% ;D
However it didn't longjump anymore.

So I removed in install.sh the --optimisze=3, just took it out.

And changed meson.build:

project(
    'spectrumdistributor',
    'cpp',
    default_options : [
        'optimization=0',
        #'b_sanitize=address'
    ]
)

add_project_arguments('-march=native', language: 'cpp')
add_project_arguments('-ggdb3', language: 'cpp')
add_project_arguments(['-std=c++23','-Ofast','-Wall','-Wextra','-Wpedantic'], language: 'cpp')

I removed Mason optimize....many say it does nothing, or something....whatever.
And I changed the optimize to be done by the compiler directly.

At the same time checking the memory-usage over time via: 'watch service websdr status' and run 'top' to see if RES number keeps going up for spectrumserver. RX888 doesn't seem to change once started.

I found that longjumps are memory leaks or memory-allocation that is in trouble because of some string or so going out of bounds.
Whatever it means  ;D

Fingers crossed, I know '-O0' seems to be fine.....but code is SLOW...real slow :o

I found several articles that Meson has memory leaks, and I did notice while running memory-consumption keeps going up.

Current memory consumption is between 625~640MB.....it changes with number of users.
#68
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 04, 2025, 02:32 PM
More progress, it seems the program is running out of memory....so I changed the systemd start-script:

[Unit]
Description=PhantomSDRPlus WebSDR
Wants=network-online.target
After=network-online.target

[Service]
PIDFile=/run/websdr.pid
ExecStart=/bin/bash /opt/PhantomSDR-Plus/start-websdr.sh
ExecStop=/bin/bash /opt/PhantomSDR-Plus/stop-websdr.sh
Restart=always
RestartSec=5
Type=Exec
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Alias=websdr.service


start-websdr.sh (stop is about the same, just killing stream and spectrum)

#!/bin/bash
cd /opt/PhantomSDR-Plus/

### STOP CRASH Injections!!!!
##If no other rules apply, flushing is easier

iptables -D INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -D INPUT -m string --algo kmp --string "device.rsp" -j DROP

iptables -A INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -A INPUT -m string --algo kmp --string "device.rsp" -j DROP

## Files to load
FIFO=fifo.fifo
TOML=config-rx888mk2.toml

[ ! -e "$FIFO" ] && mkfifo $FIFO

#Without PGA
rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > >

sleep 2

build/spectrumserver --config $TOML < $FIFO &

#exit


Maybe it keeps running now ;)
#69
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 03, 2025, 05:49 PM
Had another again, this time the RX888STREAM, with longjumps and I couldn't start it again.

So I ran install.sh again, after it would start again.

Maybe I messed with the RX888 driver too much 8)
#70
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 01, 2025, 04:24 PM
And another one....this time plocate was running.
I do not need this tool.

So I removed it: apt purge plocate

It makes an index of all the files in the filesystem, and it was running when the errors started.

Maybe it has problems with the fifo-files?

So much useless junk in Ubuntu :'(
Powered by EzPortal