Bug 410129 - System completly hang after opening a 144MB file with kwrite
Summary: System completly hang after opening a 144MB file with kwrite
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.16.3
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2019-07-23 07:45 UTC by Isaac
Modified: 2019-09-01 11:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Resources usage (98.19 KB, image/png)
2019-09-01 08:30 UTC, Isaac
Details
Resources usage (132.31 KB, image/png)
2019-09-01 08:30 UTC, Isaac
Details
Resources usage after killing kwrite (104.83 KB, image/png)
2019-09-01 08:31 UTC, Isaac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac 2019-07-23 07:45:12 UTC
Application: kwin_x11 (5.16.3)

Qt Version: 5.12.3
Frameworks Version: 5.60.0
Operating System: Linux 4.18.0-25-generic x86_64
Distribution: KDE neon User Edition 5.16

-- Information about the crash:
- What I was doing when the application crashed:

I downloaded SoapUI installer from here https://www.soapui.org/downloads/soapui.html. It downloads a shell script, so I opened with kwrite to take a look  (I tend to not execute random things from the internet without checking them first ¯\_(ツ)_/¯) without realising that ths script was so huge. Moved myself around that shell script with Av Pag and everything stoped responding, I couldn't even log in in a text mode terminal. After a restart, this kwin segfault report was here.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd5f36e8880 (LWP 2515))]

Thread 5 (Thread 0x7fd5ba44d700 (LWP 2622)):
#0  0x00007fd5ebfb39f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fd5ef56cfb8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7fd5ef56cf68, cond=0x7fd5ef56cf90) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x7fd5ef56cf90, mutex=0x7fd5ef56cf68) at pthread_cond_wait.c:655
#3  0x00007fd5ef276844 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#4  0x00007fd5ef276889 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#5  0x00007fd5ebfad6db in start_thread (arg=0x7fd5ba44d700) at pthread_create.c:463
#6  0x00007fd5f304888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fd5d150c700 (LWP 2617)):
#0  0x00007fd5f303bcf6 in __GI_ppoll (fds=fds@entry=0x7fd5c8000d28, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007fd5f058fab1 in ppoll (__ss=<optimized out>, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7fd5c8000d28) at kernel/qcore_unix.cpp:132
#3  qt_safe_poll (fds=0x7fd5c8000d28, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:153
#4  0x00007fd5f05911be in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500
#5  0x00007fd5f053503a in QEventLoop::exec (this=this@entry=0x7fd5d150bd00, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#6  0x00007fd5f035c4ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#7  0x00007fd5ea9cb115 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007fd5f035dc72 in QThreadPrivate::start (arg=0x555824097dd0) at thread/qthread_unix.cpp:361
#9  0x00007fd5ebfad6db in start_thread (arg=0x7fd5d150c700) at pthread_create.c:463
#10 0x00007fd5f304888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fd5d1f4e700 (LWP 2566)):
[KCrash Handler]
#6  QHashNode<QString, QList<KPluginMetaData> >::same_key (key0=..., h0=2494525897, this=0x50) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:158
#7  QHash<QString, QList<KPluginMetaData> >::findNode (this=this@entry=0x7fd5c4001828, akey=..., h=h@entry=2494525897) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:919
#8  0x00007fd5ead6bbb2 in QHash<QString, QList<KPluginMetaData> >::findNode (ahp=<synthetic pointer>, akey=..., this=0x7fd5c4001828) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:938
#9  QHash<QString, QList<KPluginMetaData> >::insert (avalue=..., akey=..., this=0x7fd5c4001828) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:774
#10 KPackage::PackageLoader::listPackages (this=0x7fd5c4001a70, packageFormat=..., packageRoot=...) at ./src/kpackage/packageloader.cpp:283
#11 0x00007fd5f2b9ffdd in KWin::ScriptedEffectLoader::findAllEffects (this=<optimized out>) at ./effectloader.cpp:292
#12 0x00007fd5f2ba7dd7 in QtConcurrent::StoredConstMemberFunctionPointerCall0<QList<KPluginMetaData>, KWin::ScriptedEffectLoader>::runFunctor (this=0x5558243addc0) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentstoredfunctioncall.h:228
#13 QtConcurrent::RunFunctionTask<QList<KPluginMetaData> >::run (this=0x5558243addc0) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentrunbase.h:108
#14 0x00007fd5f03623e2 in QThreadPoolThread::run (this=0x5558240383b0) at thread/qthreadpool.cpp:99
#15 0x00007fd5f035dc72 in QThreadPrivate::start (arg=0x5558240383b0) at thread/qthread_unix.cpp:361
#16 0x00007fd5ebfad6db in start_thread (arg=0x7fd5d1f4e700) at pthread_create.c:463
#17 0x00007fd5f304888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd5d3df5700 (LWP 2556)):
#0  0x00007fd5f303bcf6 in __GI_ppoll (fds=fds@entry=0x7fd5cc00b358, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007fd5f058fab1 in ppoll (__ss=<optimized out>, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7fd5cc00b358) at kernel/qcore_unix.cpp:132
#3  qt_safe_poll (fds=0x7fd5cc00b358, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:153
#4  0x00007fd5f05911be in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500
#5  0x00007fd5f053503a in QEventLoop::exec (this=this@entry=0x7fd5d3df4cf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#6  0x00007fd5f035c4ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#7  0x00007fd5e983b015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fd5f035dc72 in QThreadPrivate::start (arg=0x7fd5e9ab2d80) at thread/qthread_unix.cpp:361
#9  0x00007fd5ebfad6db in start_thread (arg=0x7fd5d3df5700) at pthread_create.c:463
#10 0x00007fd5f304888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fd5f36e8880 (LWP 2515)):
#0  0x00007fd5ebfb39f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555824036c50) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x555824036c00, cond=0x555824036c28) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x555824036c28, mutex=0x555824036c00) at pthread_cond_wait.c:655
#3  0x00007fd5f0364dbb in QWaitConditionPrivate::wait (deadline=..., this=0x555824036c00) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=this@entry=0x55582401de98, mutex=mutex@entry=0x55582401de70, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007fd5f0360ac7 in QThreadPoolPrivate::waitForDone (this=this@entry=0x55582401de00, timer=...) at thread/qthreadpool.cpp:311
#6  0x00007fd5f0360f09 in QThreadPoolPrivate::waitForDone (this=0x55582401de00, msecs=msecs@entry=-1) at thread/qthreadpool.cpp:321
#7  0x00007fd5f0360f89 in QThreadPool::waitForDone (this=this@entry=0x7fd5f09e80a0 <(anonymous namespace)::Q_QGS_theInstance::innerFunction()::holder>, msecs=msecs@entry=-1) at thread/qthreadpool.cpp:693
#8  0x00007fd5f0360fac in QThreadPool::~QThreadPool (this=0x7fd5f09e80a0 <(anonymous namespace)::Q_QGS_theInstance::innerFunction()::holder>, __in_chrg=<optimized out>) at thread/qthreadpool.cpp:473
#9  0x00007fd5f0360fe9 in (anonymous namespace)::Q_QGS_theInstance::Holder::~Holder (this=<optimized out>, __in_chrg=<optimized out>) at thread/qthreadpool.cpp:48
#10 0x00007fd5f2f6a041 in __run_exit_handlers (status=1, listp=0x7fd5f3312718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#11 0x00007fd5f2f6a13a in __GI_exit (status=<optimized out>) at exit.c:139
#12 0x00007fd5e8f7f775 in _XDefaultIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#13 0x00007fd5db6d8a9a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#14 0x00007fd5e8f7f99e in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#15 0x00007fd5e8f7da81 in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#16 0x00007fd5e8f791cd in XSync () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#17 0x00007fd5c33c0a52 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#18 0x00007fd5d33dfbf4 in KWin::GlxTexture::onDamage (this=0x55582453aba0) at ./plugins/platforms/x11/standalone/glxbackend.cpp:888
#19 0x00007fd5eb93dc9c in KWin::GLTexture::bind() () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.12
#20 0x00007fd5d00b7408 in KWin::SceneOpenGL2Window::performPaint (this=this@entry=0x5558245324f0, mask=mask@entry=9, region=..., data=<incomplete type>) at ./plugins/scenes/opengl/scene_opengl.cpp:1469
#21 0x00007fd5d00bea03 in KWin::SceneOpenGL2::performPaintWindow (this=<optimized out>, w=<optimized out>, mask=<optimized out>, region=..., data=...) at ./plugins/scenes/opengl/scene_opengl.cpp:1064
#22 0x00007fd5d00beb37 in KWin::SceneOpenGL2::finalDrawWindow (this=this@entry=0x555824038050, w=w@entry=0x555824541b80, mask=mask@entry=9, region=..., data=...) at ./plugins/scenes/opengl/scene_opengl.cpp:1046
#23 0x00007fd5f2b90416 in KWin::EffectsHandlerImpl::drawWindow (this=<optimized out>, w=0x555824541b80, mask=9, region=..., data=...) at ./effects.cpp:476
#24 0x00007fd5ef885a06 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#25 0x00007fd5f2b903ae in KWin::EffectsHandlerImpl::drawWindow (this=0x5558243d4750, w=0x555824541b80, mask=9, region=..., data=...) at ./effects.cpp:473
#26 0x00007fd5ef7ef9d5 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#27 0x00007fd5f2b903ae in KWin::EffectsHandlerImpl::drawWindow (this=this@entry=0x5558243d4750, w=w@entry=0x555824541b80, mask=mask@entry=9, region=..., data=...) at ./effects.cpp:473
#28 0x00007fd5f2b7e670 in KWin::Scene::finalPaintWindow (this=this@entry=0x555824038050, w=w@entry=0x555824541b80, mask=mask@entry=9, region=..., data=...) at ./scene.cpp:608
#29 0x00007fd5f2b9023d in KWin::EffectsHandlerImpl::paintWindow (this=<optimized out>, w=0x555824541b80, mask=9, region=..., data=...) at ./effects.cpp:439
#30 0x00007fd5efae32a0 in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.12
#31 0x00007fd5f2b901de in KWin::EffectsHandlerImpl::paintWindow (this=0x5558243d4750, w=0x555824541b80, mask=9, region=..., data=...) at ./effects.cpp:436
#32 0x00007fd5efae32a0 in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.12
#33 0x00007fd5f2b901de in KWin::EffectsHandlerImpl::paintWindow (this=this@entry=0x5558243d4750, w=0x555824541b80, mask=mask@entry=9, region=..., data=...) at ./effects.cpp:436
#34 0x00007fd5f2b84a55 in KWin::Scene::paintWindow (this=this@entry=0x555824038050, w=0x5558245324f0, mask=9, region=..., quads=...) at ./scene.cpp:480
#35 0x00007fd5f2b80cb1 in KWin::Scene::paintSimpleScreen (this=this@entry=0x555824038050, orig_mask=orig_mask@entry=8, region=...) at ./scene.cpp:374
#36 0x00007fd5d00b4242 in KWin::SceneOpenGL2::paintSimpleScreen (this=this@entry=0x555824038050, mask=mask@entry=8, region=...) at ./plugins/scenes/opengl/scene_opengl.cpp:1009
#37 0x00007fd5f2b83f37 in KWin::Scene::finalPaintScreen (this=this@entry=0x555824038050, mask=mask@entry=8, region=..., data=...) at ./scene.cpp:199
#38 0x00007fd5f2b8ff95 in KWin::EffectsHandlerImpl::paintScreen (this=<optimized out>, mask=8, region=..., data=...) at ./effects.cpp:396
#39 0x00007fd5efae31f1 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.12
#40 0x00007fd5f2b8ff3d in KWin::EffectsHandlerImpl::paintScreen (this=0x5558243d4750, mask=8, region=..., data=...) at ./effects.cpp:393
#41 0x00007fd5efae31f1 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.12
#42 0x00007fd5f2b8ff3d in KWin::EffectsHandlerImpl::paintScreen (this=this@entry=0x5558243d4750, mask=8, region=..., data=...) at ./effects.cpp:393
#43 0x00007fd5f2b83c2e in KWin::Scene::paintScreen (this=this@entry=0x555824038050, mask=mask@entry=0x7fffa9cb1f80, damage=..., repaint=..., updateRegion=updateRegion@entry=0x7fffa9cb1f68, validRegion=validRegion@entry=0x7fffa9cb1f70, projection=..., outputGeometry=...) at ./scene.cpp:149
#44 0x00007fd5d00ba6e1 in KWin::SceneOpenGL::paint (this=this@entry=0x555824038050, damage=..., toplevels=...) at ./plugins/scenes/opengl/scene_opengl.cpp:707
#45 0x00007fd5f2b76262 in KWin::Compositor::performCompositing (this=0x5558240620e0) at ./composite.cpp:746
#46 0x00007fd5f056739b in QObject::event (this=0x5558240620e0, e=<optimized out>) at kernel/qobject.cpp:1282
#47 0x00007fd5f133265c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#48 0x00007fd5f1339b90 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#49 0x00007fd5f0536d18 in QCoreApplication::notifyInternal2 (receiver=0x5558240620e0, event=0x7fffa9cb2430) at kernel/qcoreapplication.cpp:1060
#50 0x00007fd5f0593219 in QTimerInfoList::activateTimers (this=this@entry=0x555823fcf780) at kernel/qtimerinfo_unix.cpp:643
#51 0x00007fd5f059064c in QEventDispatcherUNIXPrivate::activateTimers (this=this@entry=0x555823fcf6e0) at kernel/qeventdispatcher_unix.cpp:249
#52 0x00007fd5f0591422 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:514
#53 0x00007fd5db6d891e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#54 0x00007fd5f053503a in QEventLoop::exec (this=this@entry=0x7fffa9cb25f0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#55 0x00007fd5f053e170 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1363
#56 0x00007fd5f3320f88 in kdemain (argc=<optimized out>, argv=0x7fffa9cb2888) at ./main_x11.cpp:476
#57 0x00007fd5f2f48b97 in __libc_start_main (main=0x555822f88720 <main>, argc=3, argv=0x7fffa9cb2888, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffa9cb2878) at ../csu/libc-start.c:310
#58 0x0000555822f8875a in _start ()

Possible duplicates by query: bug 364342.

Reported using DrKonqi
Comment 1 Nate Graham 2019-07-23 16:53:03 UTC
Crashing in KPackage::PackageLoader::listPackages(), called from KWin::ScriptedEffectLoader::findAllEffects()
Comment 2 Vlad Zahorodnii 2019-08-27 06:22:13 UTC
#6  QHashNode<QString, QList<KPluginMetaData> >::same_key (key0=..., h0=2494525897, this=0x50) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:158

this looks a bit suspicious

could it be that you ran out of memory?
Comment 3 Isaac 2019-08-27 06:45:54 UTC
Don't think so, but I'll try to reproduce this while keeping an eye on free memory.

Anyway, does that h0 param means that kwrite needs more than 2GB of memory for reading a 144MB file?
Comment 4 Vlad Zahorodnii 2019-08-27 06:54:39 UTC
Nah, don't worry about h0. It's irrelevant in our case.
Comment 5 Isaac 2019-09-01 08:27:38 UTC
OK, after opening that 144MB file in kwrite and hitting 'Ctrl End' one of my CPU cores spiked to 100% usage and memory usage started to raise until I killed kwrite. I'm attaching some KSysGuard screenshots.

This test was made in a fully updated Neon install with kwrite 19.08.0

Operating System: KDE neon 5.16
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.3
Kernel Version: 5.0.0-25-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i3-7100U CPU @ 2.40GHz
Memory: 15,6 GiB
Comment 6 Isaac 2019-09-01 08:30:18 UTC
Created attachment 122440 [details]
Resources usage
Comment 7 Isaac 2019-09-01 08:30:39 UTC
Created attachment 122441 [details]
Resources usage
Comment 8 Isaac 2019-09-01 08:31:27 UTC
Created attachment 122442 [details]
Resources usage after killing kwrite
Comment 9 Vlad Zahorodnii 2019-09-01 10:07:53 UTC
Given that you don't have a swap partition or swapfile, I'm pretty sure that kwin crashes because there's not enough free memory.
Comment 10 Isaac 2019-09-01 10:09:21 UTC
Yep, but is not a bug this memory usage from kwrite?
Comment 11 Vlad Zahorodnii 2019-09-01 10:11:51 UTC
> Yep, but is not a bug this memory usage from kwrite?
Can be. Please report this bug to kwrite developers.
Comment 12 Isaac 2019-09-01 11:01:58 UTC
OK, I'm opening a new bug to kate component. Thanks!