×

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

Bi-monthly release with minor bug fixes and improvements

Kstars crashing

  • Posts: 535
  • Thank you received: 109

Kstars crashing was created by Jim

When a captured image is sent to the fits viewer, I am receiving a message in the console:

*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
Aborted (core dumped)

When I look at the corefile, it is corrupt, so not much help there. Restarting and doing the same with ekosdebugger:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe3141640 (LWP 337814)]
[New Thread 0x7fffe18aa640 (LWP 337815)]
[New Thread 0x7fffe10a9640 (LWP 337816)]
[New Thread 0x7fffe08a8640 (LWP 337817)]
[New Thread 0x7fffd3f9d640 (LWP 337819)]
[New Thread 0x7fffd358e640 (LWP 337821)]
[New Thread 0x7fffc7fff640 (LWP 337822)]
[New Thread 0x7fffbffff640 (LWP 337823)]
[New Thread 0x7fffb7fff640 (LWP 337824)]
[New Thread 0x7fffaffff640 (LWP 337825)]
[New Thread 0x7fff9ffff640 (LWP 337826)]
[New Thread 0x7fffa7fff640 (LWP 337827)]
[New Thread 0x7fff97fff640 (LWP 337828)]
[New Thread 0x7fff8ffff640 (LWP 337829)]
[New Thread 0x7fff87fff640 (LWP 337830)]
[New Thread 0x7fffc55ee640 (LWP 337831)]
[New Thread 0x7fffbdffe640 (LWP 337832)]
[New Thread 0x7fffbd7fd640 (LWP 337833)]
[New Thread 0x7fffbcffc640 (LWP 337834)]
[New Thread 0x7fffb5ffe640 (LWP 337835)]
[New Thread 0x7fff63fff640 (LWP 337836)]
[New Thread 0x7fff61ffe640 (LWP 337837)]
[New Thread 0x7fff5fffd640 (LWP 337838)]
[New Thread 0x7fff57fff640 (LWP 337839)]
[New Thread 0x7fff43fff640 (LWP 337840)]
[New Thread 0x7fff4bfff640 (LWP 337841)]
[Thread 0x7fffbdffe640 (LWP 337832) exited]
[Thread 0x7fffbd7fd640 (LWP 337833) exited]
[New Thread 0x7fffbd7fd640 (LWP 337848)]
[Thread 0x7fffbd7fd640 (LWP 337848) exited]
[New Thread 0x7fffbd7fd640 (LWP 337849)]
[New Thread 0x7fffbdffe640 (LWP 337850)]
[Thread 0x7fffbd7fd640 (LWP 337849) exited]
[Thread 0x7fffbdffe640 (LWP 337850) exited]
[New Thread 0x7fffbdffe640 (LWP 337851)]
[New Thread 0x7fffbd7fd640 (LWP 337852)]
[New Thread 0x7fffadffe640 (LWP 337853)]
[New Thread 0x7fffad7fd640 (LWP 337854)]
[New Thread 0x7fffacffc640 (LWP 337855)]
[New Thread 0x7fffa5ffe640 (LWP 337857)]
[New Thread 0x7fffa57fd640 (LWP 337858)]
[Thread 0x7fffb5ffe640 (LWP 337835) exited]
[Thread 0x7fffbcffc640 (LWP 337834) exited]
[New Thread 0x7fffbcffc640 (LWP 337874)]
[Thread 0x7fffbcffc640 (LWP 337874) exited]
Thread 23 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff61ffe640 (LWP 337837)]
__GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
49	  return ret;
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff46c58a4 in __GI_abort () at abort.c:79
#2  0x00007ffff471f127 in __libc_message (action=<optimized out>, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff4726e1c in malloc_printerr (str=str@entry=0x7ffff48343e8 "malloc(): unaligned fastbin chunk detected") at malloc.c:5389
#4  0x00007ffff4729f01 in _int_malloc (av=av@entry=0x7fff50000020, bytes=bytes@entry=16) at malloc.c:3615
#5  0x00007ffff472c675 in __libc_calloc (n=n@entry=2, elem_size=elem_size@entry=8) at malloc.c:3448
#6  0x00007ffff4bd134d in linset (lin=0x7fff8000b958) at lin.c:705
#7  0x00007ffff4bf8f5f in wcsset (wcs=<optimized out>) at wcs.c:2506
#8  0x00007ffff4bfa7ed in wcsp2s (wcs=0x7fff8000b2f0, ncoord=1, nelem=2, pixcrd=0x7fff61ffda60, imgcrd=0x7fff61ffda70, phi=0x7fff61ffda38, theta=0x7fff61ffda40, world=0x7fff61ffda50, stat=0x7fff61ffda48) at wcs.c:2951
#9  0x000055555582d615 in operator() (__closure=0x7fffb802c3e0) at /usr/src/debug/kstars-3.5.0.git-20201111204715.fc33.x86_64/kstars/fitsviewer/fitsdata.cpp:2265
#10 QtConcurrent::StoredFunctorCall0<void, FITSData::loadWCS()::<lambda()> >::runFunctor (this=0x7fffb802c3c0) at /usr/include/qt5/QtConcurrent/qtconcurrentstoredfunctioncall.h:70
#11 QtConcurrent::RunFunctionTask<void>::run (this=0x7fffb802c3c0) at /usr/include/qt5/QtConcurrent/qtconcurrentrunbase.h:136
#12 0x00007ffff527bdca in QThreadPoolThread::run (this=0x7fff800040e0) at thread/qthreadpool.cpp:100
#13 0x00007ffff52784bc in QThreadPrivate::start(void*) () at thread/qthread_unix.cpp:329
#14 0x00007ffff63333f9 in start_thread (arg=0x7fff61ffe640) at pthread_create.c:463
#15 0x00007ffff47a0b03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
3 years 4 months ago #62726

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

The core dumps are repeatable whether the check box is set to "Independent Window" or not. The above information had the box checked.

By unchecking the box, I am able to get a non-truncated core dump and the backtrace from that is below:
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `kstars'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
49	  return ret;
[Current thread is 1 (Thread 0x7f7355ffe640 (LWP 3842))]
(gdb) bt
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007f73a489e8a4 in __GI_abort () at abort.c:79
#2  0x00007f73a48f8127 in __libc_message (action=<optimized out>, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007f73a48ffe1c in malloc_printerr (str=str@entry=0x7f73a4a0cfe8 "double free or corruption (fasttop)") at malloc.c:5389
#4  0x00007f73a4901343 in _int_free (av=0x7f734c000020, p=0x7f734c004560, have_lock=0) at malloc.c:4298
#5  0x00007f73a4dd145a in wcs_types (wcs=0x7f7370055600) at wcs.c:2614
#6  wcsset (wcs=0x7f7370055600) at wcs.c:2208
#7  0x00007f73a4dd37ed in wcsp2s (wcs=0x7f7370055600, ncoord=1, nelem=2, pixcrd=0x7f7355ffda60, imgcrd=0x7f7355ffda70, phi=0x7f7355ffda38, theta=0x7f7355ffda40, world=0x7f7355ffda50, stat=0x7f7355ffda48) at wcs.c:2951
#8  0x0000558335250615 in operator() (__closure=0x7f733002cf50) at /usr/src/debug/kstars-3.5.0.git-20201111204715.fc33.x86_64/kstars/fitsviewer/fitsdata.cpp:2265
#9  QtConcurrent::StoredFunctorCall0<void, FITSData::loadWCS()::<lambda()> >::runFunctor (this=0x7f733002cf30) at /usr/include/qt5/QtConcurrent/qtconcurrentstoredfunctioncall.h:70
#10 QtConcurrent::RunFunctionTask<void>::run (this=0x7f733002cf30) at /usr/include/qt5/QtConcurrent/qtconcurrentrunbase.h:136
#11 0x00007f73a5454dca in QThreadPoolThread::run (this=0x5583370e9f10) at thread/qthreadpool.cpp:100
#12 0x00007f73a54514bc in QThreadPrivate::start(void*) () at thread/qthread_unix.cpp:329
#13 0x00007f73a650c3f9 in start_thread (arg=0x7f7355ffe640) at pthread_create.c:463
#14 0x00007f73a4979b03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
3 years 4 months ago #62729

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

One more update, from looking at the backtrace/ekosdebugger log, I turned off AutoWCS in the fitsviewer options, and the crash goes away.
3 years 4 months ago #62730

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

  • Posts: 1208
  • Thank you received: 559

Replied by Hy Murveit on topic Kstars crashing

Does this crash happen right when you close the fitsviewer?
Jasem and I discussed a repeatable crash a few weeks ago which went like this:
Start kstars, open an image, and immediately close the fitsviewer window.
We think what's happening in that case is the WCS code is still working on the image when the image is free'd.
The work-around is to not close the window right after you open the image--give it several seconds to breathe.
Clearly this should be fixed but was a tricky one, as I recall. It should be a little better in the latest code as Jasem
recently sped up the WCS processing, but could still happen. (On a RPi 4, I think Jasem reduced the WCS time from ~10-20s to ~5s).

Hy
3 years 4 months ago #62735

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

Hy, thanks for the response.

No, I am not closing the window. The window opens without showing any data, and just sits there about a second or so before the crash. No buttons pressed or anything. Capture -> automaticly opens fits viewer (no image, just blank), crash about a second later. While it is trying to do something, I can tell the CPU is crunching away for that brief instant due to the temperature on the CPU increasing.

My WCS time was nearly instant before, but I am running on a desktop machine. INDI is running remotely, but remote is also a NUC i5.

Jim
Last edit: 3 years 4 months ago by Jim. Reason: hardware info
3 years 4 months ago #62737

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

@hy or @knro, any other thoughts, or things I can do to debug further?
3 years 4 months ago #62803

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

  • Posts: 1208
  • Thank you received: 559

Replied by Hy Murveit on topic Kstars crashing

Jim,

I'll defer to Jasem, but could you let us know:
- what version of the software you're using, On what platform (hardware and OS version)?
- does this happen all the time, or occasionally?
- are there particular configurations (besides autoWCS) needed to replicate this (or that make it go away)?
- can you replicate this with the simulator?
if so, can you spell out the sequence of steps in gory detail of how you get this to replicate.
if not, please spell out the gory details of how you get this to replicate with your live setup.
- Can you send a debug log?

FWIW, I'm doing a lot of testing on the latest code, and not seeing this, so there's some difference in our configurations that would be useful to figure out.

Thanks for the report,
Hy
3 years 4 months ago #62807

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

Thanks Hy,

A good bit of equipment information is in my signature.
I am using Fedora 33 on both the remote INDI server and the local desktop, running the latest builds from git for all packages, INDI, INDI drivers, kstars, stellarsolver, etc., current as of the writing of the forum post.
This happens any time AutoWCS is checked in the fits configuration. Unchecking that box is the only change to make it not crash every time fitsviewer is opened. With AutoWCS not checked, everything regarding the fitsviewer works as it should, and the system worked the rest of the evening.

Trying just now with the simulators, it works as I would expect. I have also updated since the version that was crashing to the latest again, so will hook my actual equipment up again in a bit and see if I can reproduce the crash.
All that was needed to produce the issue was to capture an image in the CCD tab, just after starting kstars and Ekos. When the fitsviewer was opened to see the image captured, it would freeze for a second without displaying the image, and then kstars would crash.
The debug log did not show the problem, even with everything turned to verbose.

Jim
3 years 4 months ago #62809

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

  • Posts: 1208
  • Thank you received: 559

Replied by Hy Murveit on topic Kstars crashing

As I understand you, when it crashes, you are running Indi on a linux computer near your telescope, and KStars on a linux desktop.
[That is different from my testing configuration where I run EVERYTHING on a Raspberry Pi "near my telescope" and just VNC to the RPi.]
Does it still crash if you run KStars/Ekos on the telescope computer? i.e. Do you think it has something to do with the remote connection to Indi?

Also, of course, let us know how the lastest HEAD works tonight.

Hy
3 years 4 months ago #62813

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

You understand correctly. I grew tired of resource constraints a few years back and decided the INDI at the scope machine should not be a concern. I do not think it has to do with the remote connection. The system goes through the same download routine to bring the image back to the local desktop whether the AutoWCS is checked or not. It downloads the 32M fits file in about 2 seconds, and only then tries to display it, and that is when the crash happens. The transfer does appear to be done at that point. The telescope computer is set up headless right now, so would have to do some work to get X/VNC/etc working on it, but if we are not able to figure anything else out, I will do so.
3 years 4 months ago #62814

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

  • Posts: 1208
  • Thank you received: 559

Replied by Hy Murveit on topic Kstars crashing

How about this: You said it didn't crash with the simulator.
Can you try again with the simulator, where the Indi simulator is remote, and the KStars/ekos is on desktop, e.g. mimicking your setup?
3 years 4 months ago #62815

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

  • Posts: 535
  • Thank you received: 109

Replied by Jim on topic Kstars crashing

That is a great idea that I had not thought of. I now have a "RemoteSims" profile. Thank you.

It also works without problem. The image is downloaded in under a second and displayed in fitsviewer with the AutoWCS box checked.

Jim
Last edit: 3 years 4 months ago by Jim. Reason: typos
3 years 4 months ago #62816

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

Time to create page: 0.791 seconds