×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Possible Memory Leak in Kstars

  • Posts: 16
  • Thank you received: 0
Hi Jasem,

When Imaging last night, I have ran into what seems like a memory leak issue with kstars. My imaging sequence stopped with an out of memory error. I am on a Raspberry Pi 4 4GB model, with zram installed. KStars is version 3.3.5, runnning on Raspbian, compiled from code. I had to stop just a couple minutes ago, because it almost ran out of memory again, also as seen on the attached pictures I have closed kstars, and the ram consumption is basically the same. My log is full because of the other issue discussed earlier with the qhy camera, it's over 2gb for 2 hours of imaging. Can the QHY camera cause this issue maybe? If not, is it possible I messed up something when compiling.? Also can I do something, so that my log doesn't get spammed this much with QHY entries other than disabling verbose logging?

Also I am running on Raspbian, because however hard I try with Ubuntu, after starting Ekos, the whole system crashes, for no apparent reason exactly 3 minutes after connection to my real hardware, with no log entries. It doesn't do this when connecting simulators, and I could replicate it on 4 different Ubuntu installs. I am guessing it's either the QHY driver or my QHY camera. Lets see if you maybe have a solution, but I think I might have to reinstall.

Thanks!
Florian

4 years 6 months ago #42921
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 1067
  • Thank you received: 140
Have you tried the new Beta Stellarmate for the the rpi4, or just bare Ubuntu mate, as that does not work...
4 years 6 months ago #42935

Please Log in or Create an account to join the conversation.

Can you run KStars in gdb? so that when it crashes, we can at least get a backtrace?
gdb -ex run kstars

For the memory issue, try to disable logging. Then monitor RAM, do you see it increasing steadily? Find out which driver is causing this.
4 years 6 months ago #42948

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 182


I also have frequent crashes on the RPi4 only. The last one appears to have been caused by gphoto2.

As for the "memory leak" Vamosi is seeing, I am wondering whether Buster lumps together used, shared and cached memory. My system monitor (using MATE) in the tray also shows memory maxed out, but most of that is used by the cache. When I open System Monitor, actually memory use is shown correctly. Also, when using free -m in the Terminal, most of the memory is used by the cache.
I am wondering whether the increased memory use reflects numerous open FITS windows? Turning off FITS viewer or checking the 'single FITS viewer window' box in EKOS might resolve that problem.
4 years 4 months ago #45612

Please Log in or Create an account to join the conversation.

  • Posts: 102
  • Thank you received: 31
FWIW: I'm also running a RPi 4, 4GB. SM OS 1.4.3 seems to run FLAWLESSLY with my hardware: iOptron iEQ45 Pro mount, Canon T3i DSLR, Lodestar X2 guide cam, RoboFocus auto-focuser, astrromtry. I run Kstars/Ekos on an older Dell I5, connecting to SM via WiFi Hotspot mode. SM OS 1.4.4 gave me nothing but problems with WiFi connectivity issues so I went back to 1.4.3.
Last edit: 3 years 2 months ago by Tom Bardenwerper.
4 years 4 months ago #45614

Please Log in or Create an account to join the conversation.

  • Posts: 527
  • Thank you received: 139
I'm running into the memory leak too. I'm on a RPi4 with Stellarmate 1.45 (just did a clean install tonight). I also have all the updates installed. The INDI server shuts down and EKOS stops taking images. Memory use is at 94%.
4 years 4 months ago #46211

Please Log in or Create an account to join the conversation.

  • Posts: 311
  • Thank you received: 42
Would it not be normal for most all the memory to be used up on these small systems? Memory management would attempt to put it to use and be depending on having enough swap space defined on disk.
4 years 4 months ago #46227

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
I have the server/drivers running on RPI4 on the telescope and use KSTARs/EKOS on a linux desktop system and a laptop system. I've found that the memory leak in either KSTARs or EKOS as it happens on the both the desktop and laptop. These are both 'heavy' systems with lots of memory and swap. I find it fills up memory, then swap then freezes the desktop or laptop requiring a reboot. This has now happened more then 7 times!! Very annoying when in the middle of a astrophotography run. Last night I had 'top' up and watched as it did this multiple times - at least I could see it coming and stop/restart in between images ...
3 years 2 months ago #65157

Please Log in or Create an account to join the conversation.

Is this with KStars 3.5.0 ? Any way to reproduce this? please list your equipment (better add them to your signature).
3 years 2 months ago #65191

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
Yes, this is KSTARs 3.5.0 Stable, on both the laptop and desktop Ubuntu linux systems. These connected to an indi web server on an RPI4 mounted on the telescope. Yes, this is repeatable (see my original post). It takes about 45 mins to fill up memory.
INDI devices being served by the RPI are: Celestron CGX, ZWO CCD, ASI EFW, OpenWeatherMap, WatchDog, GPSD, Pegasus UPB. Remember, these are hosted on an RPI4 and that does not have memory issues - the memory leak is on the desktop and the laptop running KSTARs and EKOS.

I also have another setup: an RPI4 serving Celestron CGEM, QHY CCD, MicroTouch Focuser, OpenWeather, WatchDog, GPSD, Dome Scripting Gateway. The laptop and desktop also experience a memory leak connecting to that one.
3 years 2 months ago #65222

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
I should add: this started happening after I installed 3.5.0. I had experienced a number of freezes before I had the thought that maybe this could be a memory leak and that's when I started running 'top' and caught watched the pid for kstars empty the tank. Then I repeated this 3 times that night (a couple nights ago) and finally gave up the ghost.
3 years 2 months ago #65223

Please Log in or Create an account to join the conversation.

Time to create page: 0.529 seconds