×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Possible Memory Leak in Kstars

  • Posts: 15
  • 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

Hetes Astronomical Observatory (under construction)

Sky-Watcher Quattro 10CF 10" f/4 or Sky-Watcher 150P 6" f/5 with ZWO ASI 183MM PRO, ZWO 8x1,25 EFW,
ZWO ASI 290MM Mini and OAG on Sky-Watcher AZ-EQ6 GT with EKOS on Raspberry Pi 4

Sky-Watcher Esprit 80ED with Canon 600D and Lacerta M-gen
3 years 2 months ago #42921
Attachments:

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

  • Posts: 1067
  • Thank you received: 137
Have you tried the new Beta Stellarmate for the the rpi4, or just bare Ubuntu mate, as that does not work...
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
3 years 2 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.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 years 2 months ago #42948

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

  • Posts: 1117
  • 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.
Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set
3 years 2 weeks 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.
TPO 8" Ritchey-Chretien Astrograph
Moonlite CS focuser with Motor Drive
RoboFocus Auto Focuser
iOptron iEQ45 Pro Mount on Tripier
Stellarrmate OS RPi 4, 4GB
ZWO ASI533MC Pro Main Camera
Meoptex Off Axis Guider
Starlight Xpress Lodestar X2 Guide Camera
Polemaster Polar Alignment Camera
Last edit: 1 year 11 months ago by Tom Bardenwerper.
3 years 2 weeks ago #45614

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

  • Posts: 527
  • Thank you received: 138
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%.
-Andrew
––––––––––
Mac Observatory - All about using the Mac for Astrophotography: www.macobservatory.com
Astrobin: www.astrobin.com/users/Lead_Weight/
3 years 5 days ago #46211

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

  • Posts: 277
  • Thank you received: 33
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.
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
3 years 5 days ago #46227

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

  • Posts: 11
  • 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 ...
1 year 11 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).
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 11 months ago #65191

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

  • Posts: 11
  • 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.
1 year 11 months ago #65222

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

  • Posts: 11
  • 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.
1 year 11 months ago #65223

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

Time to create page: 0.463 seconds