Bug 406972 - Falkon crashes randomly when typing in the address bar
Summary: Falkon crashes randomly when typing in the address bar
Status: RESOLVED FIXED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: 3.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-27 14:07 UTC by magiblot
Modified: 2019-06-09 17:10 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description magiblot 2019-04-27 14:07:57 UTC
SUMMARY

Since updating to 3.1 I have been experiencing random crashes, up to one time per day.

STEPS TO REPRODUCE

The crash happens unexpectedly when typing in the address bar. The crash scenario usually goes like: I am doing something else in another program and suddenly switch to the Falkon window to search for something. While typing in the address bar, just before the suggestions load, falkon crashes and closes.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Kernel Version: 5.0.9-arch1-1-ARCH
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 11,7 GiB of RAM

ADDITIONAL INFORMATION

This is probably a regression, since I don't remember experiencing this before the update. 

Below is the backtrace KCrash managed to capture:

> Application: falkon (falkon), signal: Aborted
> Using host libthread_db library "/usr/lib/libthread_db.so.1".
> [Current thread is 1 (Thread 0x7f51a5315b00 (LWP 971))]
> 
> Thread 22 (Thread 0x7f511b7fe700 (LWP 1980)):
> [KCrash Handler]
> #6  0x00007f51b6c9e82f in raise () from /usr/lib/libc.so.6
> #7  0x00007f51b6c89672 in abort () from /usr/lib/libc.so.6
> #8  0x00007f51b6ce0e78 in __libc_message () from /usr/lib/libc.so.6
> #9  0x00007f51b6ce778a in malloc_printerr () from /usr/lib/libc.so.6
> #10 0x00007f51b6ce9007 in _int_free () from /usr/lib/libc.so.6
> #11 0x00007f51b7e0d999 in ?? () from /usr/lib/libFalkonPrivate.so.3
> #12 0x00007f51b7e0c26e in IconProvider::imageForUrl(QUrl const&, bool) () from /usr/lib/libFalkonPrivate.so.3
> #13 0x00007f51b7d08709 in ?? () from /usr/lib/libFalkonPrivate.so.3
> #14 0x00007f51b7d08ea3 in ?? () from /usr/lib/libFalkonPrivate.so.3
> #15 0x00007f51b707dc91 in ?? () from /usr/lib/libQt5Core.so.5
> #16 0x00007f51b707a63c in ?? () from /usr/lib/libQt5Core.so.5
> #17 0x00007f51af36ba92 in start_thread () from /usr/lib/libpthread.so.0
> #18 0x00007f51b6d61cd3 in clone () from /usr/lib/libc.so.6

Thanks.
Comment 1 David Rosca 2019-04-28 14:39:49 UTC
Can you please get a backtrace with debug symbols?
Comment 2 magiblot 2019-04-28 16:43:00 UTC
I will try to, but I can't predict when the crash will happen.
Comment 3 magiblot 2019-05-18 20:04:43 UTC
Here's another backtrace, but this one is from coredumpctl. The KCrash handler did not inform about the crash this time.

Again, it doesn't have debug symbols, but I'm definitely going to make a debug build. There are missing symbols from Qt5Core, though, which I can't afford to build.

The steps that led me to the crash are exactly the same I described in the first post. The backtrace looks very different, although it seems to be slightly more insightful.

> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00007f512a1ff82f in raise () from /usr/lib/libc.so.6
> [Current thread is 1 (Thread 0x7f50610f9700 (LWP 2456))]
> (gdb) bt
> #0  0x00007f512a1ff82f in raise () from /usr/lib/libc.so.6
> #1  0x00007f5115c26bef in KCrash::defaultCrashHandler(int) () from /usr/lib/libKF5Crash.so.5
> #2  <signal handler called>
> #3  0x00007f512a24cc16 in malloc () from /usr/lib/libc.so.6
> #4  0x00007f512a5e7394 in QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) () from /usr/lib/libQt5Core.so.5
> #5  0x00007f512a5e9461 in QByteArray::QByteArray(int, Qt::Initialization) () from /usr/lib/libQt5Core.so.5
> #6  0x00007f512a7eeb99 in ?? () from /usr/lib/libQt5Core.so.5
> #7  0x00007f512a65d1a9 in QString::toUtf8_helper(QString const&) () from /usr/lib/libQt5Core.so.5
> #8  0x00007f5115c26779 in KCrash::defaultCrashHandler(int) () from /usr/lib/libKF5Crash.so.5
> #9  <signal handler called>
> #10 0x00007f512a1ff82f in raise () from /usr/lib/libc.so.6
> #11 0x00007f512a1ea672 in abort () from /usr/lib/libc.so.6
> #12 0x00007f512a241e78 in __libc_message () from /usr/lib/libc.so.6
> #13 0x00007f512a24878a in malloc_printerr () from /usr/lib/libc.so.6
> #14 0x00007f512a248a54 in munmap_chunk () from /usr/lib/libc.so.6
> #15 0x00007f512a157c3b in QSqlError::~QSqlError() () from /usr/lib/libQt5Sql.so.5
> #16 0x00007f512a149de5 in QSqlQuery::prepare(QString const&) () from /usr/lib/libQt5Sql.so.5
> #17 0x00007f512b265cf5 in ?? () from /usr/lib/libFalkonPrivate.so.3
> #18 0x00007f512b267104 in LocationCompleterRefreshJob::completeFromHistory() () from /usr/lib/libFalkonPrivate.so.3
> #19 0x00007f512b267ece in ?? () from /usr/lib/libFalkonPrivate.so.3
> #20 0x00007f512b268473 in ?? () from /usr/lib/libFalkonPrivate.so.3
> #21 0x00007f512a5dec91 in ?? () from /usr/lib/libQt5Core.so.5
> #22 0x00007f512a5db63c in ?? () from /usr/lib/libQt5Core.so.5
> #23 0x00007f51228cca92 in start_thread () from /usr/lib/libpthread.so.0
> #24 0x00007f512a2c2cd3 in clone () from /usr/lib/libc.so.6
Comment 4 magiblot 2019-05-23 20:02:36 UTC
I got it! This one was captured by KCrash, and is the same crash as in the first post (comment #3 might be a different bug).

On this occasion, a blank tab was already opened, but I was on another one. I just switched to it and began typing in the address bar when falkon crashed.

Here are the backtraces of the crashed and the main threads:

Thread 27 (Thread 0x7f2b1184a700 (LWP 1085)):
> [KCrash Handler]
> #6  0x0000000000000035 in ?? ()
> #7  0x00007f2b6d244709 in QCache<QByteArray, QImage>::unlink (n=..., this=0x7f2b6d3bb5c0 <(anonymous namespace)::Q_QGS_qz_icon_provider::innerFunction()::holder+96>) at /usr/include/qt/QtCore/qcache.h:187
> #8  QCache<QByteArray, QImage>::trim (m=99, this=0x7f2b6d3bb5c0 <(anonymous namespace)::Q_QGS_qz_icon_provider::innerFunction()::holder+96>) at /usr/include/qt/QtCore/qcache.h:193
> #9  QCache<QByteArray, QImage>::insert (this=0x7f2b6d3bb5c0 <(anonymous namespace)::Q_QGS_qz_icon_provider::innerFunction()::holder+96>, akey=..., aobject=0x7f2ae42eeda0, acost=1) at /usr/include/qt/QtCore/qcache.h:173
> #10 0x00007f2b6d24270d in IconProvider::imageForUrl (url=..., allowNull=<optimized out>) at /usr/src/debug/falkon/src/lib/tools/iconprovider.cpp:211
> #11 0x00007f2b6d126fa9 in LocationCompleterRefreshJob::runJob (this=0x5593d6ddff50) at /usr/src/debug/falkon/src/lib/navigation/completer/locationcompleterrefreshjob.cpp:109
> #12 0x00007f2b6d127753 in non-virtual thunk to QtConcurrent::RunFunctionTask<void>::run() () at /usr/include/qt/QtCore/qfutureinterface.h:293
> #13 0x00007f2b6c482c91 in ?? () from /usr/lib/libQt5Core.so.5
> #14 0x00007f2b6c47f63c in ?? () from /usr/lib/libQt5Core.so.5
> #15 0x00007f2b64733a92 in start_thread () from /usr/lib/libpthread.so.0
> #16 0x00007f2b6c166cd3 in clone () from /usr/lib/libc.so.6
> 
> Thread 1 (Thread 0x7f2b5a6ddb00 (LWP 912)):
> #0  0x00007f2b64739bac in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
> #1  0x00007f2b6c48591c in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/lib/libQt5Core.so.5
> #2  0x00007f2b6c482108 in QThreadPoolPrivate::waitForDone(QDeadlineTimer const&) () from /usr/lib/libQt5Core.so.5
> #3  0x00007f2b6c482514 in QThreadPoolPrivate::waitForDone(int) () from /usr/lib/libQt5Core.so.5
> #4  0x00007f2b6c4825ad in QThreadPool::~QThreadPool() () from /usr/lib/libQt5Core.so.5
> #5  0x00007f2b6c4825ea in ?? () from /usr/lib/libQt5Core.so.5
> #6  0x00007f2b6c0a5f2c in __run_exit_handlers () from /usr/lib/libc.so.6
> #7  0x00007f2b6c0a605e in exit () from /usr/lib/libc.so.6
> #8  0x00007f2b523c373f in ?? () from /usr/lib/dri/i965_dri.so
> #9  0x00007f2b53139dc3 in glPrimitiveBoundingBox () from /usr/lib/libGLX_mesa.so.0
> #10 0x00007f2b5a0bd6e9 in ?? () from /usr/lib/qt/plugins/xcbglintegrations/libqxcb-glx-integration.so
> #11 0x00007f2b648a7f60 in QOpenGLContext::swapBuffers(QSurface*) () from /usr/lib/libQt5Gui.so.5
> #12 0x00007f2b64b57c08 in QPlatformBackingStore::composeAndFlush(QWindow*, QRegion const&, QPoint const&, QPlatformTextureList*, bool) () from /usr/lib/libQt5Gui.so.5
> #13 0x00007f2b59f6a7a6 in ?? () from /usr/lib/libQt5XcbQpa.so.5
> #14 0x00007f2b6ca58edd in ?? () from /usr/lib/libQt5Widgets.so.5
> #15 0x00007f2b6ca5a995 in ?? () from /usr/lib/libQt5Widgets.so.5
> #16 0x00007f2b6ca5c008 in ?? () from /usr/lib/libQt5Widgets.so.5
> #17 0x00007f2b6ca5c379 in ?? () from /usr/lib/libQt5Widgets.so.5
> #18 0x00007f2b6ca74337 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
> #19 0x00007f2b6ca8cc39 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
> #20 0x00007f2b6cb9a405 in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
> #21 0x00007f2b6d0a33af in BrowserWindow::event (this=0x5593cffc27e0, event=0x5593d6ddf140) at /usr/src/debug/falkon/src/lib/app/browserwindow.cpp:1252
> #22 0x00007f2b6ca4bda4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
> #23 0x00007f2b6ca533c1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
> #24 0x00007f2b6c63a849 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
> #25 0x00007f2b6c63d928 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
> #26 0x00007f2b6c690394 in ?? () from /usr/lib/libQt5Core.so.5
> #27 0x00007f2b63d0590f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
> #28 0x00007f2b63d07869 in ?? () from /usr/lib/libglib-2.0.so.0
> #29 0x00007f2b63d078ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
> #30 0x00007f2b6c68f969 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
> #31 0x00007f2b6c6394dc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
> #32 0x00007f2b6c641596 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
> #33 0x00005593ce9fb139 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/falkon/src/main/main.cpp:74
> [Inferior 1 (process 912) detached]

I would also like to point out --if it makes any difference-- that my new-tab policy is 'Open blank tab'.
Comment 5 David Rosca 2019-05-24 19:48:02 UTC
Git commit 307547749291948c97b459db2c8a0f51a44a4e20 by David Rosca.
Committed on 24/05/2019 at 19:47.
Pushed by drosca into branch 'Falkon/3.1'.

IconProvider: Add mutex around icon cache
FIXED-IN: 3.1.1

M  +6    -0    src/lib/tools/iconprovider.cpp
M  +2    -0    src/lib/tools/iconprovider.h

https://commits.kde.org/falkon/307547749291948c97b459db2c8a0f51a44a4e20
Comment 6 magiblot 2019-06-09 17:10:01 UTC
(In reply to David Rosca from comment #5)

Thanks, I haven't experienced this crash again.