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.

1.5.4 crashes....

Started by Bas ON5HB, Sep 09, 2024, 09:29 PM

Previous topic - Next topic

Bas ON5HB

Just had a crash, did happen a few times before.

traps: spectrumserver[141947] general protection fault ip:55880a042f60 sp:7f0655cba6c0 error:0 in spectrumserver[558809f7e000+db000]

I found that error:0 implies a devide by zero in the code.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

I have looked in the code you changed....and I found this....can this be the problem?

float peak_sample = max();

            float desired_gain = std::min(desired_level / (peak_sample + 1e-15f), max_gain);

Not sure, but if the (peak_sample + 1e-15f) part becomes 0 it could happen.

No idea if it helps. Found it in utils/audioprocessing.cpp
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

magicint1337

The + 1e-15f is only there to make it never divide through zero :)
Maintainer and Developer of PhantomSDR-Plus

Bas ON5HB

Why not check if peaksample is 0? If so make it the value 1e-15f.

Then it can never be 0. The way you do it now can cause 0 because of rounding.

Small chance it does, but I do believe it happens from time to time and causing the spectrumserver to crash.

You're way it can become 0 when peak_sample is -1e-15f, counted together they become 0.

Just a thought, I normally don't program with floating because of these problems.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

magicint1337

Very rare edge case, may happen but you cant just dont code with floating point because of that. Especially not in DSP

In future version will be changed.
Maintainer and Developer of PhantomSDR-Plus

Bas ON5HB

I code in drivers, like the Airspy_tcp or the RSP_tcp, they do not need floating to output 8bit ;)
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

That didn't take long, it crashed again, took less then 10 minutes:

[30847.925132] traps: spectrumserver[141947] general protection fault ip:55880a042f60 sp:7f0655cba6c0 error:0 in spectrumserver[558809f7e000+db000]

Location is the same....so it must be happening elsewhere....
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

And again....it's happening faster now...every few minutes...

That is good...
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

I have noticed that when it happens the RX888 is having messages in dmesg...

It may not be related but the USB ports where on auto-powersafe (=default!)...so I turned them ON all the time in my start-script.

# Turn USB on all the time.
echo on | sudo tee /sys/bus/usb/devices/*/power/control > /dev/null
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Powered by EzPortal