Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- BITX20
- Messages
Search
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
¿ªÔÆÌåÓýExcellent, Jody!! ?This is incredibly good detective work.A correction, I don¡¯t have a Z bit X, what I have is an SBitx and it seems thoroughly stable On May 15, 2025, at 20:27, Jody - K3JZD via groups.io <k3jzd.jody@...> wrote:
|
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
OK - I have it figured out.? ?It was not a traditional "Memory Leak".? However it was a 'Memory Eater" (a subtle difference)? ?It only ate Memory during sending CW.? It was not a CPU resource issue - there is plenty of CPU to run manual CW with the zBITX ( I can't speak for any other mode ).
?
I had been saying that I have been running my zBITX in Receive Mode.? If I had done exactly that, then mine would have run for hours and hours, much as Gordon's zBITX does.? ?In reality, I have been sending a little CW from time to time, just to check and see if it is still healthy and responsive.? So, for me, it has been maybe 90-95% listening and 5-10% sending CW.
?
Whenever you power up your zBITX, a script called start.sh automatically runs.? ?I'm no linux guru, so don't shoot me if I do not describe this properly.? As I understand it, that script then starts up the sBitx program in a new shell.? Anything that the sBitx program writes out to the console (stdio) is written to this new shell.? ?What was happening was that a program (? i2cbb.c? ) was madly writing error messages to this shell.? But it only did that whenever a CW key was being pressed.? ?So whenever sending CW, this shell kept growing and growing until it eventually ate all of the memory.? The sBitx program did not 'crash', it just eventually became totally unresponsive.? In fact the entire Pi Zero became so sluggish that it took it 15 minutes to produce a directory listing.
?
This ic2bb.c program was writing out messages when (1) it tried to get control of the I2C bus, but could not because the I2C bus was already busy, and (2) whenever it got so backed up with the rush of incoming requests for the I2C bus that it aborted and reconnected.? This? ic2bb.c? program was not changed during the upgrade from version 3.021 to 3.052.? But in version 3.052 it is being called 'a whole lot more'.?
?
I have made an initial fix.? I have tested my initial fix by running my zBITX for the last 4 hours, while periodically sending some CW, and watching the memory usage.? ?What was my initial fix?? ?I commented out all of the messages that I2cbb.c was writing out to this shell, causing it to grow to an astronomical size.
?
So why now in version 3.052 and not in version 3.021?? The root cause was adding in the Interrupts (IRQs) for the manual CW Mode.? ?I see two things that caused the? i2Cbb.c functions to become overwhelmed :? The new IRQs are now being generated on 'Key Contact Closed' and 'Key Contact Open'.? Only Key Contact Closed is needed.? ?And the IRQ processing function is is not debouncing the Key Contact Closed (or Key Contact Opened).? ?What you may think is one Contact Closure generating one Interrupt, is really one Contact Closure generating tens to hundreds of Interrupts. Even though I have inhibited the messages that were causing the memory eating problem, this massive influx of unnecessary interrupts is still occurring and is still overwhelming the functions handling the I2C bus, which is causing unnecessary instability in the device.? ?
?
So,? I will be going back into the version 3.052 sbitx_gtk.c, and making these IRC related changes.? Once I have finished that and have tested it, I will post my new i2cbb.c program and my new sbitx_gtk.c program.
?
If you are inclined to do a quick fix for your i2cbb.c program yourself, just go into it and comment out every? printf()? that is in there.? Then do a? ./build,? power down and power back up.
?
72,
Jody - K3JZD? ? ??
?
?
?? |
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
¿ªÔÆÌåÓý... I admire your tenacious perseverance.
My zBitx will remain off until there is a definitive, functioning
image.
I don't understand anything about programming...
?
73/55 , Jens / HB9JOI
?
+++
?
? From: Jody - K3JZD via groups.io
Sent: Thursday, May 15, 2025 5:56 PM
Subject: Re: [BITX20] zBITX Crashes - Suspect Memory Leak
#zbitx ?
Ron : I will have to spend some time with the code snippet that you
highlighted - I do not have any experience at all with the gtk library.
?
Gordon : I thought that mine had crashed with version 3.021.? But I
was doing so many things working with it then, any of those things that I was
doing could have caused my version 3.021 to crash.?? So, maybe what I
am remembering was self-induced.? This is good info though.? Always
suspect the last change that you made whenever problems surface is the golden
rule.
?
Today I got lucky.? I had my unit running beside me while I was doing
some other things.? Mostly it was just sitting there in Receive
Mode.?? But I was sending some Straight Key CW once in a while to make
sure that it was still responsive.?? I had a SSH login.? After
about 1.5 hours, my Receiver noise got sporadic.? Sending CW got very
choppy - it was totally unusable.?? My SSH login was sluggish. but
still usable.? I ran HTOP.
?
What I found supported my Memory Leak theory.? See the
attached.??? sbitx runs from the start.sh script.?? I
highlighted that line.? 73.8% of the memory consumed.?? Swap
Space maxed out.? Total Memory very close to being maxed out.? As the
system choked, my SSH connection became super sluggish.?? I got HTOP
to run again, but it took about 15 minutes to come up and rarely
updated.?? Memory consumption looked pretty much the same - I guess
the RasPi OS keeps some memory in reserve.?? So I guess the zBITX
RasPi is not totally crashing - it is just becoming very unresponsive and from
the outside it looks like it crashed.
?
So, I guess it is time to do Diffs on all of the changes made in the files
that were changed last month to create version 3.052.? Mostly it was adding
the input pin IRQs and changing the program control structure to give manual CW
priority.? But some changes were also made to support some problems that
had been reported whenever using FT8 and other digital modes.
?
While I have other stuff on my plate, this problem seems to keep grabbing
my attention.? So. I will try to fit in some more time to look at it.?
In the mean time, it you have version 3.052 installed, just power down / power
up your zBITX every 30 minutes or so.
?
72,
Jody - K3JZD???
?
?
|
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
Jody,
do you have an image of ver 3.021 that you can share?
I will like to try your sbitx_gtk.c file.? |
Re: Sbitx high swr on a 1 to 1 antenna
I would begin by checking? the antenna connection solder connections with both a magnifying glass and ohm meter. Compare with the schematic and check for faulty cracked connections or parts. If the solder is not shiny, but is dull, it is suspect. Check each band transmitting into a 50 ohm dummy load. If some bands are okay, with others not, you can narrow things down. On Thu, May 15, 2025, 1:34 PM W1WCI via <timothy.macdonald=[email protected]> wrote:
|
Re: Sbitx high swr on a 1 to 1 antenna
¿ªÔÆÌåÓýJust substituted my uBitX for the Sbitx, worked perfectly, both radio and the out board meter showing power and 1:1 match with the antenna. ?The Sbitx still shows high swr on the radio and the meter. This suggests to me that the issue is to be solved in the radio. Sent from me and my iPad On May 15, 2025, at 12:53?PM, Jim via groups.io <jlckansas@...> wrote:
|
Re: Sbitx high swr on a 1 to 1 antenna
How dry is it?? ?Could some moisture got into someplace from radio to antenna?
Has anything been undone before this happened or the coax itself been flexed too much?
Have you ran a continuity check for different parts that go from the simple on place on up to the whole as much as possible?
Does you antenna switch get used often? it might be wearing a bit.
?
Thank you
Jim
KE0VVU
? |
Sbitx high swr on a 1 to 1 antenna
Sbitx - antenna switch - swr/power coupler - antenna
?
Previously radio showed power and 1.0 swr on 15, 20, and 40 meters with similar readings on the off board meter.
As of this morning swr on the radio and the off board meter show high SFR 2 to 3:1.
Removed the radio from the antenna line and replaced it with an antenna analyzer, it shows a perfect 1:1.?
Another radio shows 1:1 on the radio and the off board meter.
?
Previously, maybe a month ago I had the same problem, spent time chasing down the antenna to no avail. Then one day all was well with no intervention at or in the radio.
?
All bands that were workable for the antenna show the same behavior today.
?
Trouble shooting help welcomed.
?
Tim
?
? |
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
Ron : I will have to spend some time with the code snippet that you highlighted - I do not have any experience at all with the gtk library.
?
Gordon : I thought that mine had crashed with version 3.021.? But I was doing so many things working with it then, any of those things that I was doing could have caused my version 3.021 to crash.? ?So, maybe what I am remembering was self-induced.? This is good info though.? Always suspect the last change that you made whenever problems surface is the golden rule.
?
Today I got lucky.? I had my unit running beside me while I was doing some other things.? Mostly it was just sitting there in Receive Mode.? ?But I was sending some Straight Key CW once in a while to make sure that it was still responsive.? ?I had a SSH login.? After about 1.5 hours, my Receiver noise got sporadic.? Sending CW got very choppy - it was totally unusable.? ?My SSH login was sluggish. but still usable.? I ran HTOP.?
?
What I found supported my Memory Leak theory.? See the attached.? ? sbitx runs from the start.sh script.? ?I highlighted that line.? 73.8% of the memory consumed.? ?Swap Space maxed out.? Total Memory very close to being maxed out.? As the system choked, my SSH connection became super sluggish.? ?I got HTOP to run again, but it took about 15 minutes to come up and rarely updated.? ?Memory consumption looked pretty much the same - I guess the RasPi OS keeps some memory in reserve.? ?So I guess the zBITX RasPi is not totally crashing - it is just becoming very unresponsive and from the outside it looks like it crashed.?
?
So, I guess it is time to do Diffs on all of the changes made in the files that were changed last month to create version 3.052.? Mostly it was adding the input pin IRQs and changing the program control structure to give manual CW priority.? But some changes were also made to support some problems that had been reported whenever using FT8 and other digital modes.?
?
While I have other stuff on my plate, this problem seems to keep grabbing my attention.? So. I will try to fit in some more time to look at it.? In the mean time, it you have version 3.052 installed, just power down / power up your zBITX every 30 minutes or so.
?
72,
Jody - K3JZD? ??
?
? |
Re: HELP! - FT8 - 25Khz drift between RX & TX frequency
RIT and SPLIT do not work with ZBitx. I think you should reinstall the memory card. I had no output, but this helped. Raj vu2zap via <rajendrakumargg=[email protected]> ezt ¨ªrta (id?pont: 2025. m¨¢j. 15., Cs 14:07):
|
Re: Sbitx DE running V4.4 Loss of spectrum display
On Tue, May 13, 2025 at 02:15 PM, Rick Beatty wrote:
You can try adjusting the scope size to see if it resolves the issue. It is in menu 2. ?
-JJ
|
Re: HELP! - FT8 - 25Khz drift between RX & TX frequency
¿ªÔÆÌåÓýFirst thing I spotted. You have a good eye Gyula. Raj On 15/05/2025 5:09 PM, HA3HZ via
groups.io wrote:
|
Re: HELP! - FT8 - 25Khz drift between RX & TX frequency
On Thu, May 15, 2025 at 12:20 PM, BigJonn - G8DVB wrote:
you should turn the RIT button off!
That's why there is some difference between the transmit and receive frequencies. RIT shifts the receive frequency in the + or - direction. --
Gyula HA3HZ |
Re: HELP! - FT8 - 25Khz drift between RX & TX frequency
Subsequently with research I think I need to look at at Split configuration on FT8.
I am away from the shack and will need to investigate when connecting a External KVM.
?
I occured to me that the display showed RX and not denoting the VFO in use. I cannot see the Split indicator or toggle so will need to investigate on the full screen.
?
73,
Jonn, G8DVB
?
?
?
|
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
¿ªÔÆÌåÓýMy sBitx can be left for hour after hour & never crashes. ?So NEW CODE for the ZBitx might be the hunting ground & display code probably changed¡Gordon kx4z? On May 14, 2025, at 21:59, Ron Carr via groups.io <rcarr@...> wrote:
|
Re: zBITX Crashes - Suspect Memory Leak
#zbitx
What causes a crash??? Typically pointers to zero, buffer overruns, memory leaks, pointers to auto class variables.? Others?
My C skills are very rusty but this function looks suspicious to me as it seems to return a pointer to an auto class.? It is in sbitx_gtk.c
?
static struct font_style * set_style(cairo_t *gfx, int font_entry){ ? ? struct font_style *s ?= font_table + font_entry; ? ? ? cairo_set_source_rgb( gfx, s->r, s->g, s->b); ? ? cairo_select_font_face(gfx, s->name, s->type, s->weight); ? ? cairo_set_font_size(gfx, s->height); ? ? return s; } |
to navigate to use esc to dismiss