crash analysis

Hy Murveit murveit at gmail.com
Sat Apr 2 22:19:03 BST 2022


Had a crash on my machine last night, in fact two.

I was running gdb and got a (not totally helpful) stack trace, but here's
what I found.

In the stack trace below, it was processing a callback to
Scheduler::setCaptureStatus(Ekos::CAPTURE_IMAGE_RECEIVED_ and calling the
qCDebug in that method
This was the last thing output in the log

The last thing in the log was this:

[2022-04-02T02:14:53.707 PDT DEBG ][     org.kde.kstars.ekos.guide] -
Capturing frame...
[2022-04-02T02:14:53.716 PDT INFO ][   org.kde.kstars.ekos.capture] -
"Captured
/home/pi/mydisk/m101/Light/LPR/m101_Light_LPR_120_secs_2022-04-02T02-14-53_247.fits"
[2022-04-02T02:14:53.750 PDT DEBG ][   org.kde.kstars.ekos.capture] - Focus
elapsed time (secs):  246 . Requested Interval (secs):  3600
[2022-04-02T02:14:53.868 PDT DEBG ][           org.kde.kstars.fits] - FITS
HFR: 3.09129
[2022-04-02T02:14:53.869 PDT DEBG ][ org.kde.kstars.ekos.scheduler] -
Capture State "Image Received"

Here's the line in setCaptureStatus:

    qCDebug(KSTARS_EKOS_SCHEDULER) << "Capture State" <<
Ekos::getCaptureStatusString(status);

It did print that, but it dies in the cleanup from that QDebug call.
(I can tell that it was this output by examining the variables on the stack)

If we look back in the log for a similar event, we see this:

[2022-04-02T01:40:04.137 PDT INFO ][   org.kde.kstars.ekos.capture] -
"Captured
/home/pi/mydisk/m101/Light/Blue/m101_Light_Blue_240_secs_2022-04-02T01-40-03_028.fits"
[2022-04-02T01:40:04.165 PDT DEBG ][   org.kde.kstars.ekos.capture] - Focus
elapsed time (secs):  1941 . Requested Interval (secs):  3600
[2022-04-02T01:40:04.285 PDT DEBG ][           org.kde.kstars.fits] - FITS
HFR: 2.887
[2022-04-02T01:40:04.285 PDT DEBG ][ org.kde.kstars.ekos.scheduler] -
Capture State "Image Received"
[2022-04-02T01:40:04.287 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - Frame
map summary:
[2022-04-02T01:40:04.287 PDT DEBG ][ org.kde.kstars.ekos.scheduler] -
"/home/pi/mydisk/m101/Light/Blue/m101_Light_Blue_240_secs" : 28
[2022-04-02T01:40:04.287 PDT DEBG ][ org.kde.kstars.ekos.scheduler] -
"/home/pi/mydisk/m101/Light/Green/m101_Light_Green_240_secs" : 32

So it just finished printing "Capture State "Image Received", and  was
cleaning up, and about to look at the capture progress and call
updateCompletedJobsCount()
It dies in a ~QObject() from KSUtils::Logging::File()

Was memory corrupted by something else?

FWIW I looked at stack level 6, and was able to see that the QString being
passed to File had 30 characters, which is the length of: Capture State:
Image Received"

Thread 1 "kstars" received signal SIGABRT, Aborted.
__GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff47ea859 in __GI_abort () at abort.c:79
#2  0x00007ffff485529e in __libc_message (action=action at entry=do_abort,
fmt=fmt at entry=0x7ffff497f298 "%s\n")
    at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff485d32c in malloc_printerr (str=str at entry=0x7ffff497d4c1
"free(): invalid pointer") at malloc.c:5347
#4  0x00007ffff485eb5c in _int_free (av=<optimized out>, p=<optimized out>,
have_lock=0) at malloc.c:4173
#5  0x00007ffff52181d1 in QObject::~QObject() () at
/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00005555557391ee in KSUtils::Logging::File(QtMsgType,
QMessageLogContext const&, QString const&) (type=QtDebugMsg, context=...,
msg=...)
    at /home/hy/Projects/kstars/kstars/auxiliary/ksutils.cpp:959
#7  0x00007ffff50141f8 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff5015851 in qt_message_output(QtMsgType, QMessageLogContext
const&, QString const&) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff510a710 in QDebug::~QDebug() () at
/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x0000555555bb735c in
Ekos::Scheduler::setCaptureStatus(Ekos::CaptureState) (this=0x55555a39d450,
status=Ekos::CAPTURE_IMAGE_RECEIVED)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qdebug.h:125
#11 0x0000555555973206 in Ekos::Scheduler::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**)
    (_o=0x55555a39d450, _c=<optimized out>, _id=<optimized out>,
_a=0x7fffffffd6b0)
    at
/home/hy/Projects/kstars-build/kstars/KStarsLib_autogen/E56QNYLS5F/moc_scheduler.cpp:422
#12 0x00007ffff52101d0 in QMetaObject::activate(QObject*, int, int, void**)
() at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff69f0985 in  () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#14 0x00007ffff69db63b in  () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#15 0x00007ffff5210c2a in QObject::event(QEvent*) () at
/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff5bfca66 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff5c060f0 in QApplication::notify(QObject*, QEvent*) () at
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff51e480a in QCoreApplication::notifyInternal2(QObject*,
QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff51e7488 in
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
at /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff523ce37 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff42b417d in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff42b4400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff42b44a3 in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff523c435 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff51e33ab in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff51eb116 in QCoreApplication::exec() () at
/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00005555556d4f0e in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at /home/hy/Projects/kstars/kstars/main.cpp:382
(gdb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20220402/6f50aeac/attachment.htm>


More information about the Kstars-devel mailing list