×

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

Bi-monthly release with minor bug fixes and improvements

KStars memory leak and crash

  • Posts: 19
  • Thank you received: 1
Another follow up from me - another crash noted:
Last lines of log file:
[2022-07-05T16:51:07.950 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] Upload complete "
[2022-07-05T16:51:07.951 BST DEBG ][           org.kde.kstars.indi] - Image received. Mode: "Normal" Size: 2629440
[2022-07-05T16:51:07.955 BST INFO ][           org.kde.kstars.indi] - "FITS" file saved to "/home/astroberry/Astro/Light/Luminance/Light_Luminance_1_secs_2022-07-05T16-51-07_19659.fits"
[2022-07-05T16:51:07.958 BST INFO ][   org.kde.kstars.ekos.capture] - "Download Time: 0.01 s, New Download Time Estimate: 0.05 s."
[2022-07-05T16:51:09.641 BST INFO ][   org.kde.kstars.ekos.capture] - "Received image 19642 out of 50000."
[2022-07-05T16:51:12.584 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 87.305623, 90.000000 to ha 87.305623, ra 74.096583, 90.000000 "
[2022-07-05T16:51:12.584 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] HaAxis: 87.305623, ra 4.939772 "
[2022-07-05T16:51:12.585 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] DecAxis: 90.000000, dec 90.000000 "
[2022-07-05T16:51:12.585 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  4:56:23 Current DEC: 90:00:00 "
[2022-07-05T16:51:12.586 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 87.306670, 90.000000 to ha 87.306670, ra 74.096583, 90.000000 "
[2022-07-05T16:51:12.586 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] HaAxis: 87.306670, ra 4.939772 "
[2022-07-05T16:51:12.587 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] DecAxis: 90.000000, dec 90.000000 "
[2022-07-05T16:51:12.587 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  4:56:23 Current DEC: 90:00:00 "
[2022-07-05T16:51:12.588 BST DEBG ][           org.kde.kstars.indi] - INDI Server:  "2022-07-05T15:51:05: Driver indi_simulator_ccd: ****Coordinates (-c) error in "
[2022-07-05T16:51:12.588 BST DEBG ][           org.kde.kstars.indi] - INDI Server:  ""
[2022-07-05T16:51:13.440 BST INFO ][   org.kde.kstars.ekos.capture] - "Capturing 1.000-second Luminance image..."
And memory statistics:

The vertical jumps in the middle of the X axis is in agreement with the last log inputs.
Data from seconds around this:
2022-07-05 16:51:07 Temp=41.8ºC. RAM parameters: Used: 18.6%; Free:  2.5%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.2%; Available: 76.5%. Swap used:100.0%. µSD has 32.601% free space.
2022-07-05 16:51:08 Temp=41.3ºC. RAM parameters: Used: 18.4%; Free:  2.6%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.3%; Available: 76.6%. Swap used:100.0%. µSD has 32.599% free space.
2022-07-05 16:51:10 Temp=41.3ºC. RAM parameters: Used: 18.4%; Free:  2.6%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.3%; Available: 76.6%. Swap used:100.0%. µSD has 32.599% free space.
2022-07-05 16:51:11 Temp=41.8ºC. RAM parameters: Used: 18.4%; Free:  2.6%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.3%; Available: 76.6%. Swap used:100.0%. µSD has 32.599% free space.
2022-07-05 16:51:13 Temp=42.8ºC. RAM parameters: Used: 18.4%; Free:  2.6%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.3%; Available: 76.7%. Swap used:100.0%. µSD has 32.599% free space.
2022-07-05 16:51:14 Temp=41.8ºC. RAM parameters: Used: 18.5%; Free:  2.4%; Shared:  1.0%; Buffer:  0.7%; Cache: 78.3%; Available: 76.4%. Swap used:100.0%. µSD has 32.599% free space.
2022-07-05 16:51:15 Temp=41.3ºC. RAM parameters: Used:  6.6%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:17 Temp=41.3ºC. RAM parameters: Used:  6.6%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:18 Temp=41.8ºC. RAM parameters: Used:  6.6%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:20 Temp=40.9ºC. RAM parameters: Used:  6.5%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:21 Temp=41.3ºC. RAM parameters: Used:  6.6%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:23 Temp=41.8ºC. RAM parameters: Used:  6.5%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.
2022-07-05 16:51:24 Temp=42.3ºC. RAM parameters: Used:  6.6%; Free: 14.9%; Shared:  0.4%; Buffer:  0.7%; Cache: 77.8%; Available: 89.1%. Swap used: 99.9%. µSD has 32.600% free space.


RPi 4B, 4GB
VNC server, Conky & script detailing Memory usage running. Nothing else started from reboot.
KStars 3.5.9:
All notifications disabled
Limited resources mode on
FITS viewer etc off
Not running any scheduler
SIMUALTOR for Telescope (mount) and Camera in EKOS.
Restarting KStars after test (just after stopping data aquisition for above plot) and starting Indi reports 'another instance of INDI running...'

Hoping for a clear night tomorrow night to do real imaging (Steve, I'll be running internal plate solving and guiding so hope to report back with that too) with the cache-purging option which through various tests to date have shown longer runs possible without crashing. Watch this space!
1 year 8 months ago #84126
Attachments:
The topic has been locked.
  • Posts: 39
  • Thank you received: 9
Yep: this is backtrace of mine ( Astroberry on Raspi 4B 4GB, with KStars 3.5.8 )
free(): invalid pointer
 
Thread 12 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0xa41c8040 (LWP 26410)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: File o directory non esistente.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0xb38cb230 in __GI_abort () at abort.c:79
#2  0xb391b50c in __libc_message (action=action@entry=do_abort, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:181
#3  0xb3922034 in malloc_printerr (str=<optimized out>) at malloc.c:5341
#4  0xb3923d40 in _int_free (av=0xb39fe7d4 <main_arena>, p=0x9e0b01c7, have_lock=<optimized out>) at malloc.c:4165
#5  0xb56ccc90 in void std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > >::_M_realloc_insert<std::pair<int, double> >(__gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > >, std::pair<int, double>&&) () from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#6  0xb56c4290 in InternalExtractorSolver::extractPartition(InternalExtractorSolver::ImageParams const&) () from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#7  0xb56cbb70 in non-v[sub]irtual thunk to QtConcurrent::RunFunctionTask<QList<FITSImage::Star> >::run() () from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#8  0xb425ef30 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#9  0xb4267b58 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#10 0xb5797494 in start_thread (arg=0xa41c8040) at pthread_create.c:486
#11 0xb398b568 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

I can confitm that guiding for enough time is able to trigger the crash alone, seems like Alacant said.

The following user(s) said Thank You: alacant
1 year 8 months ago #84134
The topic has been locked.
  • Posts: 969
  • Thank you received: 94
"...guiding for enough time is able to trigger the crash alone..."

Thanks for posting.

Important to note that the crash occurs when calling the internal sextract, from stellarsolver, for the guide frames.

PHD2 guides all night as long as you like; no crash. Its memory usage remains constant, start to finish.

HTH and clear skies.
1 year 8 months ago #84136
The topic has been locked.
  • Posts: 349
  • Thank you received: 107

Replied by nou on topic KStars memory leak and crash

I think I am getting hit by same crash. Backtrace from gdb is little bit different but it is some kind of memory corruption so exact crash is somehow random. Going to build debug version and try to reproduce and poke around a little.
<code>
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140488782902848) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140488782902848) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140488782902848, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007fc63d148476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007fc63d12e7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007fc63d18f6f6 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fc63d2e1b8c "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#6 0x00007fc63d1a6d7c in malloc_printerr (str=str@entry=0x7fc63d2e4d40 "malloc(): unaligned tcache chunk detected") at ./malloc/malloc.c:5664
#7 0x00007fc63d1ab45c in tcache_get (tc_idx=<optimized out>) at ./malloc/malloc.c:3195
#8 __GI___libc_malloc (bytes=60) at ./malloc/malloc.c:3313
#9 0x00007fc63f3f3bd5 in SEP::addobjdeep(int, SEP::objliststruct*, SEP::objliststruct*, int) () at /usr/local/lib/libstellarsolver.so.2
#10 0x00007fc63f3ee328 in SEP::Deblend::deblend(SEP::objliststruct*, int, SEP::objliststruct*, int, double, int, SEP::Lutz*) () at /usr/local/lib/libstellarsolver.so.2
#11 0x00007fc63f3eec0c in SEP::Extract::sortit(SEP::infostruct*, SEP::objliststruct*, int, SEP::objliststruct*, int, double, double) () at /usr/local/lib/libstellarsolver.so.2
#12 0x00007fc63f3f1773 in SEP::Extract::sep_extract(SEP::sep_image*, float, int, int, float*, int, int, int, int, double, int, double, SEP::sep_catalog**) () at /usr/local/lib/libstellarsolver.so.2
#13 0x00007fc63f3ae1c2 in InternalExtractorSolver::extractPartition(InternalExtractorSolver::ImageParams const&) () at /usr/local/lib/libstellarsolver.so.2
#14 0x00007fc63f3ba532 in non-virtual thunk to QtConcurrent::RunFunctionTask<QList<FITSImage::Star> >::run() () at /usr/local/lib/libstellarsolver.so.2
#15 0x00007fc63d9b7f92 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fc63d9b4ca1 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fc63d19ab43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#18 0x00007fc63d22ca00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
</code>
Last edit: 1 year 8 months ago by nou.
1 year 8 months ago #84164
The topic has been locked.
is this on nightly? Please try to see if you get the crash on nightly.
1 year 8 months ago #84165
The topic has been locked.
  • Posts: 39
  • Thank you received: 9
I also had different BTs from different sessions

This is a segmentation fault
Thread 21 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x98a0c040 (LWP 21872)]
tcache_get (tc_idx=7) at malloc.c:2934
2934	malloc.c: File o directory non esistente.
(gdb) bt
#0  tcache_get (tc_idx=7) at malloc.c:2934
#1  __GI___libc_malloc (bytes=64) at malloc.c:3042
#2  0xb56fa3bc in SEP::Extract::convert_to_catalog(SEP::objliststruct*, int*, SEP::sep_catalog*, int, int) ()
   from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#3  0xb56fbce0 in SEP::Extract::sep_extract(SEP::sep_image*, float, int, int, float*, int, int, int, int, double, int, double, SEP::sep_catalog**) ()
   from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#4  0xb56c41d4 in InternalExtractorSolver::extractPartition(InternalExtractorSolver::ImageParams const&) ()
   from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#5  0xb56cbb70 in non-virtual thunk to QtConcurrent::RunFunctionTask<QList<FITSImage::Star> >::run() ()
   from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#6  0xb425ef30 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#7  0xb4267b58 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#8  0xb5797494 in start_thread (arg=0x98a0c040) at pthread_create.c:486
#9  0xb398b568 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

This one is a bus error: in this case only guiding was active; previous one a complete scheduled session (focus, align, ecc) was running.
Thread 21 "Thread (pooled)" received signal SIGBUS, Bus error.
[Switching to Thread 0x98a0c040 (LWP 4602)]
0xb56c2028 in ?? () from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
(gdb) bt
#0  0xb56c2028 in ?? () from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
#1  0xb56c46dc in InternalExtractorSolver::extractPartition(InternalExtractorSolver::ImageParams const&) ()
   from /usr/lib/arm-linux-gnueabihf/libstellarsolver.so.2
Backtrace stopped: Cannot access memory at address 0x4f1a51f8
1 year 8 months ago #84166
The topic has been locked.
  • Posts: 349
  • Thank you received: 107

Replied by nou on topic KStars memory leak and crash

It is with quite recent build but with older version of stellarsolver. Will try with latest build of stellarsolver and kstars.
1 year 8 months ago #84174
The topic has been locked.
  • Posts: 9
  • Thank you received: 3
Hi,
I think I have the same issue as here. Crashes every night when scheduling. Doesn't crash doing lots of dark/flat frames without using the scheduler. It's only started crashing after I updates about 3 weeks ago, and hadn't updated previously since Feb 2022. That'll teach me that if it 'aint broke, don't fix it.
Has anyone had any progress on this since the last post over 3 weeks ago ?. I see there is a new indi 1.9.7 released a few days ago. Any fixes in this for this issue ?
Here's hoping :-)
1 year 7 months ago #84922
The topic has been locked.
  • Posts: 969
  • Thank you received: 94
'Crashes every night when scheduling.'

Hi
No logs, so can only guess.
Turning off partitioning in stellarsolver works for some systems.
Or you can use ASTAP for solving and PHD2 for guiding.
Cheers and HTH
Last edit: 1 year 7 months ago by alacant.
1 year 7 months ago #84924
The topic has been locked.
  • Posts: 9
  • Thank you received: 3
Thanks for the quick reply. Looked at logs and it's definitely an out of memory issue :-

[2022-08-01T03:48:48.746 CEST DEBG ][ org.kde.kstars.indi] - Image received. Mode: "Normal" Size: 40368960
[2022-08-01T03:48:48.939 CEST INFO ][ org.kde.kstars.indi] - "FITS" file saved to "/media/astroberry/4311-BCAE/EkosImages/East Veil Nebula/East_Veil_Nebula/Light/East_Veil_Nebula_Light_60_secs_2022-08-01T03-48-48_231.fits"
[2022-08-01T03:48:48.939 CEST DEBG ][ org.kde.kstars.fits] - Reading file buffer ( "38.5 MiB" )
[2022-08-01T03:48:49.703 CEST CRIT ][ org.kde.kstars.fits] - Debayed memory allocation failure. Required Memory: "115.5 MiB" Available system memory: 1.8101e+09
[2022-08-01T03:48:49.772 CEST INFO ][ org.kde.kstars.ekos.capture] - "Download Time: 1.92 s, New Download Time Estimate: 2.23 s."
[2022-08-01T03:48:49.779 CEST INFO ][ org.kde.kstars.ekos.capture] - "Received image 231 out of 290."
[2022-08-01T03:48:49.783 CEST INFO ][ org.kde.kstars.ekos.capture] - "Captured /media/astroberry/4311-BCAE/EkosImages/East Veil Nebula/East_Veil_Nebula/Light/East_Veil_Nebula_Light_60_secs_2022-08-01T03-48-48_231.fits"

I do use stellarsolver and PHD2 for guiding. I'll try your suggestions as soon as I can get some sky to work with.

hairbear.
1 year 7 months ago #84925
The topic has been locked.
  • Posts: 349
  • Thank you received: 107

Replied by nou on topic KStars memory leak and crash

After I upgraded stellarsolver crashing stopped for me.
1 year 7 months ago #84934
The topic has been locked.
  • Posts: 123
  • Thank you received: 13

Replied by Outta on topic KStars memory leak and crash

Hi,


My crashings are unrelated to solver and guiding as I am using PHD2 and Online Astrometry. But I do not have any critical details in log.

You do have, it says that there is no memory available, is you RAM full?
1 year 7 months ago #84974
The topic has been locked.
Time to create page: 1.054 seconds