×

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

Bi-monthly release with minor bug fixes and improvements

Memory Leak

  • Posts: 220
  • Thank you received: 14

Replied by Teseo on topic Memory Leak


I also use it remotely, and as I said in the computer I have 8GB of memory.
After the automatic capture of over 100 images (asteroid orbit measurement) the computer becomes slow, so much so that I have to close kstars to free up more than 7gb of memory.
Every time download an image it takes up a lot of ram memory.
4 years 2 months ago #47654

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

Replied by Jasem Mutlaq on topic Memory Leak

I would like to know how I can replicate this.. I took 500 images on StellarMate a couple of weeks ago and I couldn't detect any memory leak. Was HIPS overlay enabled? I'd like to replicate exact conditions.
The following user(s) said Thank You: Teseo
4 years 2 months ago #47676

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

  • Posts: 220
  • Thank you received: 14

Replied by Teseo on topic Memory Leak


Thanks knro, next time I create a log, HIPS is disabled.
I forgot to mention that they are all FITS image ( fits viewer is disabled ).
The following user(s) said Thank You: Tim Schuh
4 years 2 months ago #47679

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

  • Posts: 4
  • Thank you received: 0

Replied by Tim Schuh on topic Memory Leak


If HIPS overlay is enabled by default then yes, it is. My objective is to be able to pack the whole imaging train minus the mount into a suitcase, preferably carry-on sized bag. Resolving this is very important to me since I'm trying to avoid taking a full computer into the field. Full control and imaging from a RPi opens SO many possibilities that I really want to explore.
4 years 2 months ago #47709

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

  • Posts: 1208
  • Thank you received: 559

Replied by Hy Murveit on topic Memory Leak

I was wondering, for the folks with the memory leak--do you have the option "Single Preview Tab" checked? (I think you should have it checked).
You find that under the KStars options, then FITS, then it's a checkbox on that page.
I believe that KStars/fitsviewer would leak tabs if you had it unchecked (perhaps it should limit the number of tabs, I don't know if it does or doesn't).
Hy
The following user(s) said Thank You: Jose Corazon
4 years 2 months ago #47722

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

  • Posts: 220
  • Thank you received: 14

Replied by Teseo on topic Memory Leak


Yes is checked and Fits viewer is disabled.
Thanks
4 years 2 months ago #47724

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

  • Posts: 983
  • Thank you received: 375

Replied by Radek Kaczorek on topic Memory Leak

Apparently memory leak is related to FITS preview.

I have just got a report that memory leak does not happen if you disable:
- fits viewer (Settings / Configure KStars / FITS / Use FITS Viewer) and
- preview from main Ekos tab (Settings / Configure KStars / Ekos / Capture / Summary Screen Preview)

Can you confirm this?
4 years 2 months ago #47742

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

  • Posts: 1119
  • Thank you received: 182

Replied by Jose Corazon on topic Memory Leak


I was about to make the same comment. That box needs to be checked to prevent consecutive tabs from opening.
In addition, I always leave my FITS viewer minimized. I also use an SSD with swap enabled, that might also make a difference.
I had the memory overflow a couple of times, but only when I ran KStars from a microSD card. Unsure how to explain that, though.

4 years 2 months ago #47751
Attachments:

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

  • Posts: 44
  • Thank you received: 10

Replied by J. Hill on topic Memory Leak

Sounds strange, but I can apparently duplicate the memory leak with those options disabled. Using Canon T6s, Astroberry over VNC. I duplicated with upload to client set. After a few images, I get the "Unsufficient Memory" errors.

I did some testing with the CCD Simulator (with the same frame size as the Canon) and did not notice a memory leak, even looping to the FITS viewer.
4 years 2 months ago #47752

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

  • Posts: 1119
  • Thank you received: 182

Replied by Jose Corazon on topic Memory Leak



I should have kept my big mouth shut! I did not have these out of memory problems for a long time - until last night.
I had made no changes to my configuration from the night before, when the system performed flawlessly and collected over 300 frames. Last night it ran out of memory after 113. I woke up to the message on the desktop that there was not enough free memory to report the cause of the crash. KStars had shut down.
I have no clue what is causing this, but I did not change any of the parameters I had highlighted earlier. And as I said, the system performed great the night before, no changes made, no updates, nothing....
4 years 2 months ago #47761

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

  • Posts: 983
  • Thank you received: 375

Replied by Radek Kaczorek on topic Memory Leak

I have just confirmed that after disabling FITS previews there is no memory leak. You can go hundreds of frames with no problem whatsoever.
The workaround to the memory leak is to disable:
- fits viewer (Settings / Configure KStars / FITS / Use FITS Viewer) and
- preview on main Ekos tab (Settings / Configure KStars / Ekos / Capture / Summary Screen Preview)
The following user(s) said Thank You: Robusto
4 years 2 months ago #47790

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

  • Posts: 10
  • Thank you received: 3

Replied by Robusto on topic Memory Leak

Indeed, those two settings do the magic - but this is probably not just about getting memory filled as this happens even with a handful of captured frames.
This is very disappointing, I finally bit the bullet and upgraded my KStars to the latest and this is now practically unusable the way it is.

Also, brief rundown on how to reproduce the problem:

- Using simulator devices: CCD sim, telescope sim, guider sim
- Created a new sequence (3x lum, 3x red) and saved it
- Opened the scheduler, chose M 34 (I doubt this matters), selected the sequence
- Did not touch the sequence conditions
- Add and run the sequence

A crash will most likely occur at some point (had one happen at 2 frames, one happen at 3 frames, etc).
I doubt this is even exactly a simple memory leak since it happens so quickly, and my machine has 8GB of RAM, a pair of simulator camera frames hardly make a dent.
As said, disabling those two options act as a workaround, so this is definitely FITS viewer related.

Attached a verbose log.
The crash happens right after "Reading FITS file buffer".

I tried the bug reporting tool but unfortunately it failed to get anything useful out of it, so I tried running it with gdb, and that perhaps gave out something useful:
Thread 14 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa1cc2700 (LWP 8338)]
0x00005555557d7878 in FITSData::loadWCS (this=0x55555b2185e0) at ./kstars/fitsviewer/fitsdata.cpp:2444

And backtrace for thread 14:
Thread 14 (Thread 0x7fffa1cc2700 (LWP 8338)):
#0  0x00005555557d7878 in FITSData::loadWCS (this=0x55555b2185e0) at ./kstars/fitsviewer/fitsdata.cpp:2444
#1  0x00005555557b01c2 in QtConcurrent::StoredMemberFunctionPointerCall0<bool, FITSData>::runFunctor (this=0x55555ba61720)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentstoredfunctioncall.h:189
#2  0x00005555556748e5 in QtConcurrent::RunFunctionTask<bool>::run (this=0x55555ba61720)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentrunbase.h:108
#3  0x00007ffff21dc2b2 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff21df17d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff14ab6db in start_thread (arg=0x7fffa1cc2700) at pthread_create.c:463
#6  0x00007ffff026788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

And backtrace for Thread 1:
Thread 1 (Thread 0x7ffff7f9a440 (LWP 8321)):
#0  0x00007ffff14b19f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555ba01d90)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55555ba01d40, cond=0x55555ba01d68) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55555ba01d68, mutex=0x55555ba01d40) at pthread_cond_wait.c:655
#3  0x00007ffff21e05ab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff21d30e0 in QFutureInterfaceBase::waitForFinished() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00005555557bbd72 in FITSView::loadFITSFromData (this=this@entry=0x55555b9fef10, data=data@entry=0x55555c239000, inFilename=...)
    at ./kstars/fitsviewer/fitsview.cpp:309
#6  0x000055555590f53c in FITSTab::loadFITSFromData (this=this@entry=0x55555b10b650, data=data@entry=0x55555c239000, imageURL=..., 
    mode=<optimized out>, filter=<optimized out>) at ./kstars/fitsviewer/fitstab.cpp:478
#7  0x00005555558f6715 in FITSViewer::updateFITSFromData (this=0x7fff48001c30, data=data@entry=0x55555c239000, imageName=..., 
    fitsUID=<optimized out>, tab_uid=tab_uid@entry=0x7fffffffd560, filter=filter@entry=FITS_NONE) at ./kstars/fitsviewer/fitsviewer.cpp:538
#8  0x00005555558d3786 in ISD::CCD::processBLOB (this=0x555557c64380, bp=0x7fff7c0186d0) at ./kstars/indi/indiccd.cpp:1722
#9  0x00005555558c0656 in INDIListener::processBLOB (this=<optimized out>, bp=0x7fff7c0186d0) at ./kstars/indi/indilistener.cpp:435
#10 0x000055555586b1d4 in INDIListener::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at ./obj-x86_64-linux-gnu/kstars/KStarsLib_autogen/FRI4DANIHA/moc_indilistener.cpp:189
#11 0x00007ffff23ec645 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00005555558389a2 in ClientManager::newINDIBLOB (this=<optimized out>, _t1=<optimized out>)
    at ./obj-x86_64-linux-gnu/kstars/KStarsLib_autogen/FRI4DANIHA/moc_clientmanager.cpp:363
#13 0x00007ffff23ed1b2 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff384283c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff384a104 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff23bd9c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff23c013d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff2417353 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fffed8f3417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fffed8f3650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fffed8f36dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff241697f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff23bb9fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff23c4aa4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x000055555562a412 in main (argc=<optimized out>, argv=<optimized out>) at ./kstars/main.cpp:333

I hope this'll help in investigating this.
The following user(s) said Thank You: Radek Kaczorek, Tim Schuh
4 years 2 months ago #47797
Attachments:

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

Time to create page: 1.021 seconds