Bug 404164 - Crashes when saving document upon closing
Summary: Crashes when saving document upon closing
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: 2.9.92
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2019-02-10 02:33 UTC by John Scott
Modified: 2019-02-24 19:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Scott 2019-02-10 02:33:03 UTC
Application: kile (2.9.92)

Qt Version: 5.11.3
Frameworks Version: 5.54.0
Operating System: Linux 4.19.0-2-amd64 x86_64
Distribution: Debian GNU/Linux buster/sid

-- Information about the crash:
Closing Kile without saving a document first and proceeding to save as suggested makes Kile crash, but doesn't have any practical consequences and is an annoyance at worst. I reported it downstream [1] where someone chimed in with details on the probable upstream issue.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919030

The crash can be reproduced every time.

-- Backtrace:
Application: Kile (kile), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
futex_wait_cancelable (private=0, expected=0, futex_word=0x55b22ef72190) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[Current thread is 1 (Thread 0x7fd057feb880 (LWP 3911))]

Thread 5 (Thread 0x7fcffbfff700 (LWP 5830)):
#0  0x00007fd06294a289 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fd05d023f1a in g_cond_wait_until (cond=cond@entry=0x55b22ed02a68, mutex=mutex@entry=0x55b22ed02a60, end_time=end_time@entry=12062223028) at ../../../glib/gthread-posix.c:1449
#2  0x00007fd05cfac051 in g_async_queue_pop_intern_unlocked (queue=queue@entry=0x55b22ed02a60, wait=wait@entry=1, end_time=end_time@entry=12062223028) at ../../../glib/gasyncqueue.c:422
#3  0x00007fd05cfac611 in g_async_queue_timeout_pop (queue=0x55b22ed02a60, timeout=timeout@entry=15000000) at ../../../glib/gasyncqueue.c:545
#4  0x00007fd05d002d61 in g_thread_pool_wait_for_new_pool () at ../../../glib/gthreadpool.c:167
#5  0x00007fd05d002d61 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../glib/gthreadpool.c:364
#6  0x00007fd05d002325 in g_thread_proxy (data=0x7fd008005190) at ../../../glib/gthread.c:784
#7  0x00007fd05fac0fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007fd06294f80f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fd04d2e6700 (LWP 3916)):
#0  0x00007fd05fac6fbc in futex_wait_cancelable (private=0, expected=0, futex_word=0x55b22efde638) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007fd05fac6fbc in __pthread_cond_wait_common (abstime=0x0, mutex=0x55b22efde5e8, cond=0x55b22efde610) at pthread_cond_wait.c:502
#2  0x00007fd05fac6fbc in __pthread_cond_wait (cond=0x55b22efde610, mutex=0x55b22efde5e8) at pthread_cond_wait.c:655
#3  0x00007fd04d8caa32 in cnd_wait (mtx=0x55b22efde5e8, cond=0x55b22efde610) at ../src/../include/c11/threads_posix.h:155
#4  0x00007fd04d8caa32 in util_queue_thread_func (input=input@entry=0x55b22f31fab0) at ../src/util/u_queue.c:270
#5  0x00007fd04d8ca5f7 in impl_thrd_routine (p=<optimized out>) at ../src/../include/c11/threads_posix.h:87
#6  0x00007fd05fac0fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007fd06294f80f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fd04ffff700 (LWP 3914)):
[KCrash Handler]
#6  0x00007fd05fda6cfd in _mm_loadu_si128(long long __vector(2) const*) (__P=<optimized out>) at /usr/lib/gcc/x86_64-linux-gnu/8/include/emmintrin.h:1397
#7  0x00007fd05fda6cfd in ucstrncmp (l=<optimized out>, b=0x55b230a21878, a=0xab645fd2c8c0) at tools/qstring.cpp:685
#8  0x00007fd05fda6cfd in ucstrcmp(QChar const*, size_t, QChar const*, size_t) (a=a@entry=0xab645fd2c8c0, alen=13, b=0x55b230a21878, blen=11) at tools/qstring.cpp:899
#9  0x00007fd05fdacb0a in qt_compare_strings (cs=Qt::CaseSensitive, rhs=..., lhs=...) at ../../include/QtCore/../../src/corelib/tools/qstringview.h:275
#10 0x00007fd05fdacb0a in operator<(QString const&, QString const&) (s1=..., s2=...) at tools/qstring.cpp:3214
#11 0x00007fd062c75b70 in qMapLessThanKey<QString>(QString const&, QString const&) (key2=..., key1=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:69
#12 0x00007fd062c75b70 in QMapNode<QString, KileStructData>::lowerBound(QString const&) (akey=..., this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:155
#13 0x00007fd062c75b70 in QMapData<QString, KileStructData>::findNode(QString const&) const (this=<optimized out>, akey=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:287
#14 0x00007fd062c72805 in QMap<QString, KileStructData>::constFind(QString const&) const (this=0x55b22fceef70, akey=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:867
#15 0x00007fd062c72805 in KileParser::LaTeXParser::parse() (this=0x55b230c874f0) at ./src/parser/latexparser.cpp:186
#16 0x00007fd062c79362 in KileParser::ParserThread::run() (this=0x55b22eeff2c0) at ./src/parser/parserthread.cpp:193
#17 0x00007fd05fd39cd7 in QThreadPrivate::start(void*) (arg=0x55b22eeff2c0) at thread/qthread_unix.cpp:367
#18 0x00007fd05fac0fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#19 0x00007fd06294f80f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd056c03700 (LWP 3913)):
#0  0x00007ffd0a5b2b34 in clock_gettime ()
#1  0x00007fd06295d326 in __GI___clock_gettime (clock_id=clock_id@entry=1, tp=tp@entry=0x7fd056c02a30) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007fd05ff33a91 in qt_clock_gettime (ts=0x7fd056c02a30, clock=1) at kernel/qelapsedtimer_unix.cpp:175
#3  0x00007fd05ff33a91 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at kernel/qelapsedtimer_unix.cpp:166
#4  0x00007fd05ff33a91 in qt_gettime() () at kernel/qelapsedtimer_unix.cpp:175
#5  0x00007fd05ff322c9 in QTimerInfoList::updateCurrentTime() (this=this@entry=0x7fd050005120) at kernel/qtimerinfo_unix.cpp:91
#6  0x00007fd05ff328c5 in QTimerInfoList::timerWait(timespec&) (this=0x7fd050005120, tm=...) at kernel/qtimerinfo_unix.cpp:388
#7  0x00007fd05ff33eee in timerSourcePrepareHelper (timeout=0x7fd056c02b14, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:161
#8  0x00007fd05ff33eee in timerSourcePrepare(GSource*, gint*) (source=<optimized out>, timeout=timeout@entry=0x7fd056c02b14) at kernel/qeventdispatcher_glib.cpp:165
#9  0x00007fd05cfd9549 in g_main_context_prepare (context=context@entry=0x7fd050000bf0, priority=priority@entry=0x7fd056c02ba0) at ../../../glib/gmain.c:3492
#10 0x00007fd05cfd9f4b in g_main_context_iterate (context=context@entry=0x7fd050000bf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3900
#11 0x00007fd05cfda13c in g_main_context_iteration (context=0x7fd050000bf0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3981
#12 0x00007fd05ff3416b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fd050000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#13 0x00007fd05fee114b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fd056c02cf0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#14 0x00007fd05fd30106 in QThread::exec() (this=this@entry=0x7fd060de3d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#15 0x00007fd060d69545 in QDBusConnectionManager::run() (this=0x7fd060de3d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#16 0x00007fd05fd39cd7 in QThreadPrivate::start(void*) (arg=0x7fd060de3d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:367
#17 0x00007fd05fac0fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#18 0x00007fd06294f80f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fd057feb880 (LWP 3911)):
#0  0x00007fd05fac6fbc in futex_wait_cancelable (private=0, expected=0, futex_word=0x55b22ef72190) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007fd05fac6fbc in __pthread_cond_wait_common (abstime=0x0, mutex=0x55b22ef72140, cond=0x55b22ef72168) at pthread_cond_wait.c:502
#2  0x00007fd05fac6fbc in __pthread_cond_wait (cond=0x55b22ef72168, mutex=0x55b22ef72140) at pthread_cond_wait.c:655
#3  0x00007fd05fd3a48b in QWaitConditionPrivate::wait(unsigned long) (time=18446744073709551615, this=0x55b22ef72140) at thread/qwaitcondition_unix.cpp:143
#4  0x00007fd05fd3a48b in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x55b22ef03be0, mutex=mutex@entry=0x55b22ef03bc0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#5  0x00007fd05fd3993e in QThread::wait(unsigned long) (this=<optimized out>, time=18446744073709551615) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:240
#6  0x00007fd062c77ef4 in KileParser::ParserThread::~ParserThread() (this=0x55b22eeff2c0, __in_chrg=<optimized out>) at ./src/parser/parserthread.cpp:53
#7  0x00007fd062c781b7 in KileParser::DocumentParserThread::~DocumentParserThread() (this=0x55b22eeff2c0, __in_chrg=<optimized out>) at ./src/parser/parserthread.cpp:213
#8  0x00007fd062c781b7 in KileParser::DocumentParserThread::~DocumentParserThread() (this=0x55b22eeff2c0, __in_chrg=<optimized out>) at ./src/parser/parserthread.cpp:215
#9  0x00007fd05ff0969b in QObjectPrivate::deleteChildren() (this=this@entry=0x55b22ef03ad0) at kernel/qobject.cpp:1997
#10 0x00007fd05ff123c4 in QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025
#11 0x00007fd062c76cec in KileParser::Manager::~Manager() (this=0x55b22ef03a00, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/atomic_base.h:303
#12 0x00007fd062c76e09 in KileParser::Manager::~Manager() (this=0x55b22ef03a00, __in_chrg=<optimized out>) at ./src/parser/parsermanager.cpp:51
#13 0x00007fd05ff0969b in QObjectPrivate::deleteChildren() (this=this@entry=0x55b22ed98e90) at kernel/qobject.cpp:1997
#14 0x00007fd0608940c6 in QWidget::~QWidget() (this=0x55b22ed98a80, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1705
#15 0x00007fd061404cc4 in KMainWindow::~KMainWindow() (this=0x55b22ed98a80, __in_chrg=<optimized out>) at ./src/kmainwindow.cpp:399
#16 0x00007fd062bc9d79 in Kile::~Kile() (this=this@entry=0x55b22ed98a80, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:339
#17 0x00007fd062bca039 in Kile::~Kile() (this=0x55b22ed98a80, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ./src/kile.cpp:417
#18 0x00007fd05ff0bfa0 in QObject::event(QEvent*) (this=this@entry=0x55b22ed98a80, e=e@entry=0x55b230857a00) at kernel/qobject.cpp:1242
#19 0x00007fd060898c5b in QWidget::event(QEvent*) (this=this@entry=0x55b22ed98a80, event=event@entry=0x55b230857a00) at kernel/qwidget.cpp:9353
#20 0x00007fd06099eed4 in QMainWindow::event(QEvent*) (this=this@entry=0x55b22ed98a80, event=event@entry=0x55b230857a00) at widgets/qmainwindow.cpp:1348
#21 0x00007fd06140717b in KMainWindow::event(QEvent*) (this=this@entry=0x55b22ed98a80, ev=ev@entry=0x55b230857a00) at ./src/kmainwindow.cpp:871
#22 0x00007fd061451115 in KXmlGuiWindow::event(QEvent*) (this=0x55b22ed98a80, ev=0x55b230857a00) at ./src/kxmlguiwindow.cpp:119
#23 0x00007fd06085a491 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x55b22ed20040, receiver=receiver@entry=0x55b22ed98a80, e=e@entry=0x55b230857a00) at kernel/qapplication.cpp:3726
#24 0x00007fd060861ad0 in QApplication::notify(QObject*, QEvent*) (this=0x7ffd0a4fcab0, receiver=0x55b22ed98a80, e=0x55b230857a00) at kernel/qapplication.cpp:3485
#25 0x00007fd05fee2479 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55b22ed98a80, event=0x55b230857a00) at ../../include/QtCore/5.11.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307
#26 0x00007fd05fee546b in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x55b230857a00, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#27 0x00007fd05fee546b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55b22ed1aaa0) at kernel/qcoreapplication.cpp:1744
#28 0x00007fd05ff34b23 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55b22ed45660) at kernel/qeventdispatcher_glib.cpp:276
#29 0x00007fd05cfd9e0e in g_main_dispatch (context=0x55b22edb05c0) at ../../../glib/gmain.c:3182
#30 0x00007fd05cfd9e0e in g_main_context_dispatch (context=context@entry=0x55b22edb05c0) at ../../../glib/gmain.c:3847
#31 0x00007fd05cfda0a8 in g_main_context_iterate (context=context@entry=0x55b22edb05c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:3920
#32 0x00007fd05cfda13c in g_main_context_iteration (context=0x55b22edb05c0, may_block=may_block@entry=1) at ../../../glib/gmain.c:3981
#33 0x00007fd05ff34153 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55b22ed28d10, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#34 0x00007fd057c5d6c1 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#35 0x00007fd05fee114b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd0a4fc8d0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#36 0x00007fd05fee92c2 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#37 0x00007fd06028485c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1762
#38 0x00007fd06085a405 in QApplication::exec() () at kernel/qapplication.cpp:2900
#39 0x00007fd062c69746 in kdemain(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:199
#40 0x00007fd06287a09b in __libc_start_main (main=0x55b22dc60050 <main>, argc=1, argv=0x7ffd0a4fcc98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd0a4fcc88) at ../csu/libc-start.c:308
#41 0x000055b22dc6008a in _start ()
[Inferior 1 (process 3911) detached]

Reported using DrKonqi
Comment 1 Michel Ludwig 2019-02-24 19:47:47 UTC
Git commit 62232952aa222189db39b6024bd8bbb0ccebe211 by Michel Ludwig.
Committed on 24/02/2019 at 19:46.
Pushed by mludwig into branch 'master'.

Avoid crashing when closing a document that is being parsed

M  +3    -1    src/parser/latexparser.cpp
M  +2    -2    src/parser/latexparser.h

https://commits.kde.org/kile/62232952aa222189db39b6024bd8bbb0ccebe211