Bug 339829 - KDE crashes with SIGBUS when /var (i.e. /var/tmp) is out of disk space
Summary: KDE crashes with SIGBUS when /var (i.e. /var/tmp) is out of disk space
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kshareddatacache (show other bugs)
Version: 4.14.0
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 350371 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-09 18:38 UTC by Rogier
Modified: 2018-11-07 23:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.53


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rogier 2014-10-09 18:38:50 UTC
Some days ago, while working I experienced a crash of KDE. I don't exactly remember the symptoms, but in the end, I had to leave anyway, so I shut down my system.

When I brought it up later, initially KDE appeared to start, but then a number of message windows appeared reporting crashes in several KDE applications, each caused by a bus error. As there was no way for me to interact with those windows, I restarted KDE, but with the same result.

After some investigation, it appeared that /var was at 100% due to an excessive amount of syslog messages. I purged some logs, and then tried to restart KDE, which once again raw flawlessly.

Apparently therefore, KDE has a problem running when it can't write to /var/tmp, and instead of informing the user about the problem, most parts of KDE crash with SIGBUS, leaving the user puzzled.
It seems that this problem was reported before:
https://bugs.kde.org/show_bug.cgi?id=235081
https://bugs.kde.org/show_bug.cgi?id=233127
(and possibly others)
but both those bugs have been marked 'resolved'.

I am reporting this bug (again), as I think the original reporters' problem may have been solved (just as my KDE starts fine again), but the underlying problem in KDE hasn't: KDE crashes without even a hint of a cause when /var/tmp fills up.

I'd appreciate if you could look into and solve this problem,

Kind regards,

Rogier. 

Reproducible: Always

Steps to Reproduce:
1. Fill up /var/tmp
2. Make sure KDE needs to write to /var/tmp (e.g. by removing a file in /var/tmp/kdecache-<user>)
3a. Start an affected KDE application: SIGBUS
3b. Restart KDE: when out of luck, plasma-desktop crashes with SIGBUS, leaving KDE unusable


Actual Results:  
Specific test results:

I filled up /var, and made sure a process was running to keep it filled up at 100%

When starting systemsettings and selecting 'workspace appearance/desktop theme', systemsettings consistently crashes with SIGBUS.

When starting amarok, amarok consistently crashes with SIGBUS

When restarting KDE, kmix crashes with SIGBUS, but for the rest, KDE seems to start fine

When restarting KDE after removing a 'random' file (ksycoca4) from /var/tmp/kdecache-<user>, KDE no longer manages to start at all.

Most of the time, plasma is the first one to crash with SIGBUS, along with some other parts of KDE (krunner, kmix). Combined with the fact that there is no keyboard or mouse response at all, KDE is entirely unusable.

A few times, I got a flashing screensaver (i.e. screen alternating between black and a screensaver prompt). This is rare - most restarts result in crash windows for plasma-desktop et al.

When freeing up some space on /var, KDE starts and runs fine again.

------------------------------------------------------------------------------
I haven't tried to fill up /var, keep it filled up, and keep working to see if at some point KDE finally rewrites some /var/tmp file, fails, and ends up crashing altogether, like it did for me initially.

Expected Results:  
Preferably, KDE and its applications don't crash, but continue to run, possibly in degraded mode (if possible at all).

At the very least, they inform the user of the root cause of the problem when crashing, so that he is at least able to remedy the situation.
Comment 1 Christoph Feck 2014-10-09 19:27:46 UTC
Is /var on an ext4 file system? If yes, the space for cache files should have been pre-allocated, but we cannot know why it crashes unless we see the backtrace.
Comment 2 Rogier 2014-10-09 21:12:18 UTC
/var is on ext4.

Cache file space pre-allocation may be OK, as KDE starts fine (except for kmix) when /var has filled up while the system is running.

I'll install the debian debug packages and create some backtraces, probably tomorrow.

Could it be that the root cause for the crash of the applications is that they fail to allocate space for one or more cache files on /var ? Possibly, they fail to check some return code, then assume allocation of the cache file succeeded ? In any case, when they try to use the (presumably mmap-ed ?) cache file that couldn't be allocated anyway, they die because of a SIGBUS.
Comment 3 Rogier 2014-10-10 09:17:58 UTC
Backtrace for amarok starting & crashing while /var/tmp is at 100%

Application: Amarok (amarok), signal: Bus error
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[Current thread is 1 (Thread 0xeda73780 (LWP 26167))]

Thread 6 (Thread 0xea29cb40 (LWP 26175)):
#0  0xf76f9d70 in __kernel_vsyscall ()
#1  0xf42cf015 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:245
#2  0xf54f7934 in __pthread_cond_timedwait (cond=0x8462750, mutex=0x8462738, abstime=0xea29c0f4) at forward.c:162
#3  0xf5707948 in wait (time=<optimized out>, this=<optimized out>) at thread/qwaitcondition_unix.cpp:84
#4  QWaitCondition::wait (this=0x8462738, mutex=0x82ffdac, time=60000) at thread/qwaitcondition_unix.cpp:158
#5  0xf6c7986f in AbstractDirectoryWatcher::run (this=0x82ffd98) at ../../src/scanner/AbstractDirectoryWatcher.cpp:65
#6  0xf4b28266 in ThreadWeaver::JobRunHelper::runTheJob (this=0xea29c234, th=0x8314c88, job=0x82ffd98) at ../../../threadweaver/Weaver/Job.cpp:106
#7  0xf4b28478 in ThreadWeaver::Job::execute (this=0x82ffd98, th=0x8314c88) at ../../../threadweaver/Weaver/Job.cpp:135
#8  0xf4b27b54 in ThreadWeaver::Thread::run (this=0x8314c88) at ../../../threadweaver/Weaver/Thread.cpp:108
#9  0xf57073be in QThreadPrivate::start (arg=0x8314c88) at thread/qthread_unix.cpp:349
#10 0xf42caefb in start_thread (arg=0xea29cb40) at pthread_create.c:309
#11 0xf54ead4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 5 (Thread 0xe7b00b40 (LWP 26176)):
#0  0xf76f9d70 in __kernel_vsyscall ()
#1  0xf54f8372 in __GI___clock_gettime (clock_id=1, tp=0xe7afff94) at ../sysdeps/unix/clock_gettime.c:115
#2  0xf57633d5 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xf5853af3 in updateCurrentTime (this=0xe710269c) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xe710269c, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xf5852189 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xe7b00088) at kernel/qeventdispatcher_glib.cpp:136
#7  0xf5852245 in timerSourcePrepare (source=0xe7102668, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0xf2dfa4eb in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xf2dfaf64 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xf2dfb196 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xf5852ad4 in QEventDispatcherGlib::processEvents (this=0xe7100468, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#12 0xf581f1cf in QEventLoop::processEvents (this=0xe7b00214, flags=...) at kernel/qeventloop.cpp:149
#13 0xf581f55e in QEventLoop::exec (this=0xe7b00214, flags=...) at kernel/qeventloop.cpp:204
#14 0xf57047db in QThread::exec (this=0x83750d0) at thread/qthread.cpp:538
#15 0xf57feec6 in QInotifyFileSystemWatcherEngine::run (this=0x83750d0) at io/qfilesystemwatcher_inotify.cpp:265
#16 0xf57073be in QThreadPrivate::start (arg=0x83750d0) at thread/qthread_unix.cpp:349
#17 0xf42caefb in start_thread (arg=0xe7b00b40) at pthread_create.c:309
#18 0xf54ead4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 4 (Thread 0xe7088b40 (LWP 26179)):
#0  0xf76f9d70 in __kernel_vsyscall ()
#1  0xf42cec4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xf54f78dc in __pthread_cond_wait (cond=0x8463420, mutex=0x8463408) at forward.c:149
#3  0xf570796b in wait (time=<optimized out>, this=<optimized out>) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x8463408, mutex=0x836b050, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xf4b25f00 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x8463340, th=0x8688e08) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#6  0xf4b29214 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x831fb18, th=0x8688e08) at ../../../threadweaver/Weaver/WorkingHardState.cpp:77
#7  0xf4b25e44 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x8463340, th=0x8688e08) at ../../../threadweaver/Weaver/WeaverImpl.cpp:361
#8  0xf4b2930a in ThreadWeaver::WorkingHardState::applyForWork (this=0x831fb18, th=0x8688e08, previous=0xe67bfad0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#9  0xf4b24c98 in ThreadWeaver::WeaverImpl::applyForWork (this=0x8463340, th=0x8688e08, previous=0xe67bfad0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#10 0xf4b27abd in ThreadWeaver::Thread::run (this=0x8688e08) at ../../../threadweaver/Weaver/Thread.cpp:98
#11 0xf57073be in QThreadPrivate::start (arg=0x8688e08) at thread/qthread_unix.cpp:349
#12 0xf42caefb in start_thread (arg=0xe7088b40) at pthread_create.c:309
#13 0xf54ead4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 3 (Thread 0xe66ffb40 (LWP 26180)):
#0  0xf76f9d70 in __kernel_vsyscall ()
#1  0xf42cec4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xf54f78dc in __pthread_cond_wait (cond=0x8463420, mutex=0x8463408) at forward.c:149
#3  0xf570796b in wait (time=<optimized out>, this=<optimized out>) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x8463408, mutex=0x836b050, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xf4b25f00 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x8463340, th=0x889b2d8) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#6  0xf4b29214 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x831fb18, th=0x889b2d8) at ../../../threadweaver/Weaver/WorkingHardState.cpp:77
#7  0xf4b25e44 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x8463340, th=0x889b2d8) at ../../../threadweaver/Weaver/WeaverImpl.cpp:361
#8  0xf4b2930a in ThreadWeaver::WorkingHardState::applyForWork (this=0x831fb18, th=0x889b2d8, previous=0xe67be850) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#9  0xf4b24c98 in ThreadWeaver::WeaverImpl::applyForWork (this=0x8463340, th=0x889b2d8, previous=0xe67be850) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#10 0xf4b27abd in ThreadWeaver::Thread::run (this=0x889b2d8) at ../../../threadweaver/Weaver/Thread.cpp:98
#11 0xf57073be in QThreadPrivate::start (arg=0x889b2d8) at thread/qthread_unix.cpp:349
#12 0xf42caefb in start_thread (arg=0xe66ffb40) at pthread_create.c:309
#13 0xf54ead4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 2 (Thread 0xe5efeb40 (LWP 26181)):
#0  0xf76f9d70 in __kernel_vsyscall ()
#1  0xf42cec4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xf54f78dc in __pthread_cond_wait (cond=0x8463420, mutex=0x8463408) at forward.c:149
#3  0xf570796b in wait (time=<optimized out>, this=<optimized out>) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x8463408, mutex=0x836b050, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xf4b25f00 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x8463340, th=0x86a9cb0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#6  0xf4b29214 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x831fb18, th=0x86a9cb0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:77
#7  0xf4b25e44 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x8463340, th=0x86a9cb0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:361
#8  0xf4b2930a in ThreadWeaver::WorkingHardState::applyForWork (this=0x831fb18, th=0x86a9cb0, previous=0xe67bd5d0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#9  0xf4b24c98 in ThreadWeaver::WeaverImpl::applyForWork (this=0x8463340, th=0x86a9cb0, previous=0xe67bd5d0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#10 0xf4b27abd in ThreadWeaver::Thread::run (this=0x86a9cb0) at ../../../threadweaver/Weaver/Thread.cpp:98
#11 0xf57073be in QThreadPrivate::start (arg=0x86a9cb0) at thread/qthread_unix.cpp:349
#12 0xf42caefb in start_thread (arg=0xe5efeb40) at pthread_create.c:309
#13 0xf54ead4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 1 (Thread 0xeda73780 (LWP 26167)):
[KCrash Handler]
#7  0xf5bd5275 in testAndSetOrdered (newValue=1, expectedValue=0, this=0xe54ac000) at /usr/include/qt4/QtCore/qatomic_i386.h:144
#8  testAndSetAcquire (newValue=1, expectedValue=0, this=0xe54ac000) at /usr/include/qt4/QtCore/qatomic_i386.h:266
#9  KSharedDataCache::Private::mapSharedMemory (this=0x89e29d0) at ../../kdecore/util/kshareddatacache.cpp:1162
#10 0xf5bd0b2c in Private (expectedItemSize=0, defaultCacheSize=20480, name=..., this=0x89e29d0) at ../../kdecore/util/kshareddatacache.cpp:1007
#11 KSharedDataCache::KSharedDataCache (this=0x89e29c0, cacheName=..., defaultCacheSize=20480, expectedItemSize=0) at ../../kdecore/util/kshareddatacache.cpp:1404
#12 0xf7422399 in KImageCache::KImageCache (this=0x89e29c0, cacheName=..., defaultCacheSize=20480, expectedItemSize=0) at ../../kdeui/util/kimagecache.cpp:86
#13 0xf6d7e30b in SvgHandler::SvgHandler (this=0x89e3768, parent=0x0) at ../../src/SvgHandler.cpp:59
#14 0xf6d7e3f6 in The::svgHandler () at ../../src/SvgHandler.cpp:51
#15 0xf6e38114 in IconButton::IconButton (this=0x89e3e20, parent=0x0) at ../../src/widgets/IconButton.cpp:36
#16 0xf6e3e75c in PlayPauseButton::PlayPauseButton (this=0x89e3e20, parent=0x0) at ../../src/widgets/PlayPauseButton.cpp:28
#17 0xf6e29e4e in MainToolbar::MainToolbar (this=0x89dc4c8, parent=0x0) at ../../src/toolbar/MainToolbar.cpp:97
#18 0xf6d61ef6 in MainWindow::init (this=0x82ffdf0) at ../../src/MainWindow.cpp:202
#19 0xf6d6330c in MainWindow::MainWindow (this=0x82ffdf0) at ../../src/MainWindow.cpp:151
#20 0xf6d4a673 in App::continueInit (this=0xffc10c58) at ../../src/App.cpp:440
#21 0xf6d4b775 in App::App (this=0xffc10c58) at ../../src/App.cpp:175
#22 0x0804dcf9 in main (argc=1, argv=0xffc10d44) at ../../src/main.cpp:327
Comment 4 Rogier 2014-10-10 09:18:51 UTC
Backtrace for systemsettings starting and crashing while /var/tmp is at 100%

Application: System Settings (systemsettings), signal: Bus error
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[KCrash Handler]
#7  0xf6202275 in testAndSetOrdered (newValue=1, expectedValue=0, this=0xde76f000) at /usr/include/qt4/QtCore/qatomic_i386.h:144
#8  testAndSetAcquire (newValue=1, expectedValue=0, this=0xde76f000) at /usr/include/qt4/QtCore/qatomic_i386.h:266
#9  KSharedDataCache::Private::mapSharedMemory (this=0x9579770) at ../../kdecore/util/kshareddatacache.cpp:1162
#10 0xf61fdb2c in Private (expectedItemSize=0, defaultCacheSize=83886080, name=..., this=0x9579770) at ../../kdecore/util/kshareddatacache.cpp:1007
#11 KSharedDataCache::KSharedDataCache (this=0x92ee058, cacheName=..., defaultCacheSize=83886080, expectedItemSize=0) at ../../kdecore/util/kshareddatacache.cpp:1404
#12 0xf708f399 in KImageCache::KImageCache (this=0x92ee058, cacheName=..., defaultCacheSize=83886080, expectedItemSize=0) at ../../kdeui/util/kimagecache.cpp:86
#13 0xf751fd31 in Plasma::ThemePrivate::useCache (this=0xade0b50) at ../../plasma/theme.cpp:295
#14 0xf75208b6 in Plasma::Theme::findInCache (this=0xad7c9c0, key=..., pix=...) at ../../plasma/theme.cpp:1027
#15 0xf749fcf9 in Plasma::FrameSvgPrivate::generateBackground (this=0xae8af90, frame=0xaf96788) at ../../plasma/framesvg.cpp:671
#16 0xf74a0beb in Plasma::FrameSvg::paintFrame (this=0x9510908, painter=0xffbe3354, pos=...) at ../../plasma/framesvg.cpp:529
#17 0xeabbfb18 in ThemeDelegate::paint (this=0xaf8b868, painter=0xffbe3354, option=..., index=...) at ../../../kcontrol/desktoptheme/thememodel.cpp:187
#18 0xf6a137fa in QListView::paintEvent (this=0x9532ef8, e=0xffbe39e8) at itemviews/qlistview.cpp:1044
#19 0xf64b58f9 in QWidget::event (this=0x9532ef8, event=0xffbe39e8) at kernel/qwidget.cpp:8775
#20 0xf68be99a in QFrame::event (this=0x9532ef8, e=0xffbe39e8) at widgets/qframe.cpp:557
#21 0xf695009d in QAbstractScrollArea::viewportEvent (this=0x9532ef8, e=0xffbe39e8) at widgets/qabstractscrollarea.cpp:1043
#22 0xf69f5537 in QAbstractItemView::viewportEvent (this=0x9532ef8, event=0xffbe39e8) at itemviews/qabstractitemview.cpp:1644
#23 0xf6950323 in viewportEvent (event=0xffbe39e8, this=<optimized out>) at widgets/qabstractscrollarea_p.h:100
#24 QAbstractScrollAreaFilter::eventFilter (this=0x9315dc8, o=0x9518bf0, e=0xffbe39e8) at widgets/qabstractscrollarea_p.h:116
#25 0xf5dcb9c3 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x90efd10, receiver=0x9518bf0, event=0xffbe39e8) at kernel/qcoreapplication.cpp:1065
#26 0xf645a498 in QApplicationPrivate::notify_helper (this=0x90efd10, receiver=0x9518bf0, e=0xffbe39e8) at kernel/qapplication.cpp:4566
#27 0xf6461360 in QApplication::notify (this=0xffbe6bd8, receiver=0x9518bf0, e=0xffbe39e8) at kernel/qapplication.cpp:4356
#28 0xf701ed8c in KApplication::notify (this=0xffbe6bd8, receiver=0x9518bf0, event=0xffbe39e8) at ../../kdeui/kernel/kapplication.cpp:311
#29 0xf5dcb84a in QCoreApplication::notifyInternal (this=0xffbe6bd8, receiver=0x9518bf0, event=0xffbe39e8) at kernel/qcoreapplication.cpp:955
#30 0xf64af6f7 in sendSpontaneousEvent (event=0x300, receiver=0x9288b88) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#31 QWidgetPrivate::drawWidget (this=0xad70df8, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5599
#32 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#33 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=-4309785, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#34 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=-4309513, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#35 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=-4309241, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#36 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=-4308969, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#37 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xadb3de8, pdev=0x931a0b8, siblings=..., index=-4308509, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#38 0xf64af254 in QWidgetPrivate::drawWidget (this=0xadb3de8, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#39 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x9749ef0, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#40 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0x9749ef0, pdev=0x931a0b8, siblings=..., index=-4307725, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#41 0xf64af254 in QWidgetPrivate::drawWidget (this=0x9749ef0, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#42 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xadce0a8, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#43 0xf64af254 in QWidgetPrivate::drawWidget (this=0xadce0a8, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#44 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xaed45d8, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#45 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0xaed45d8, pdev=0x931a0b8, siblings=..., index=-4306429, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#46 0xf64af254 in QWidgetPrivate::drawWidget (this=0xaed45d8, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#47 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xad8c710, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#48 0xf64af254 in QWidgetPrivate::drawWidget (this=0xad8c710, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#49 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xad8d448, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#50 0xf64af254 in QWidgetPrivate::drawWidget (this=0xad8d448, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#51 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xae07430, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#52 0xf64af254 in QWidgetPrivate::drawWidget (this=0xae07430, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#53 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0xadafb08, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#54 0xf64af254 in QWidgetPrivate::drawWidget (this=0xadafb08, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#55 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x9374400, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#56 0xf64af254 in QWidgetPrivate::drawWidget (this=0x9374400, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#57 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x934f550, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#58 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0x934f550, pdev=0x931a0b8, siblings=..., index=-4303085, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#59 0xf64af254 in QWidgetPrivate::drawWidget (this=0x934f550, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#60 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x9275d18, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#61 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0x9275d18, pdev=0x931a0b8, siblings=..., index=-4302301, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#62 0xf64af254 in QWidgetPrivate::drawWidget (this=0x9275d18, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#63 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x94ae5a8, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#64 0xf64af254 in QWidgetPrivate::drawWidget (this=0x94ae5a8, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#65 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x9373c78, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#66 0xf64af254 in QWidgetPrivate::drawWidget (this=0x9373c78, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#67 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x921a0e0, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#68 0xf64af254 in QWidgetPrivate::drawWidget (this=0x921a0e0, pdev=0x931a0b8, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#69 0xf64b0226 in QWidgetPrivate::paintSiblingsRecursive (this=0x91c0670, pdev=0x931a0b8, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5808
#70 0xf64b008c in QWidgetPrivate::paintSiblingsRecursive (this=0x91c0670, pdev=0x931a0b8, siblings=..., index=-4299985, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5795
#71 0xf64af254 in QWidgetPrivate::drawWidget (this=0x91c0670, pdev=0x931a0b8, rgn=..., offset=..., flags=5, sharedPainter=0x0, backingStore=0x9288b88) at kernel/qwidget.cpp:5652
#72 0xf66a524b in QWidgetBackingStore::sync (this=0x9288b88) at painting/qbackingstore.cpp:1373
#73 0xf64a32a7 in QWidgetPrivate::syncBackingStore (this=0x91c0670) at kernel/qwidget.cpp:1894
#74 0xf64b59fe in QWidget::event (this=0x92213f0, event=0xad97a50) at kernel/qwidget.cpp:8693
#75 0xf68dad62 in QMainWindow::event (this=0x92213f0, event=0xad97a50) at widgets/qmainwindow.cpp:1478
#76 0xf70f38b4 in KMainWindow::event (this=0x92213f0, ev=0xad97a50) at ../../kdeui/widgets/kmainwindow.cpp:1084
#77 0xf713545d in KXmlGuiWindow::event (this=0x92213f0, ev=0xad97a50) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:126
#78 0xf645a4ba in QApplicationPrivate::notify_helper (this=0x90efd10, receiver=0x92213f0, e=0xad97a50) at kernel/qapplication.cpp:4570
#79 0xf6461360 in QApplication::notify (this=0xffbe6bd8, receiver=0x92213f0, e=0xad97a50) at kernel/qapplication.cpp:4356
#80 0xf701ed8c in KApplication::notify (this=0xffbe6bd8, receiver=0x92213f0, event=0xad97a50) at ../../kdeui/kernel/kapplication.cpp:311
#81 0xf5dcb84a in QCoreApplication::notifyInternal (this=0xffbe6bd8, receiver=0x92213f0, event=0xad97a50) at kernel/qcoreapplication.cpp:955
#82 0xf5dcf3f1 in sendEvent (event=0xad97a50, receiver=0x92213f0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#83 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x90be150) at kernel/qcoreapplication.cpp:1579
#84 0xf5dcf965 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1472
#85 0xf5dfd963 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#86 postEventSourceDispatch (s=0x90ed798) at kernel/qeventdispatcher_glib.cpp:280
#87 0xf20f5da4 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#88 0xf20f60c9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#89 0xf20f6196 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#90 0xf5dfdab9 in QEventDispatcherGlib::processEvents (this=0x90ef980, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#91 0xf650dff6 in QGuiEventDispatcherGlib::processEvents (this=0x90ef980, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#92 0xf5dca1cf in QEventLoop::processEvents (this=0xffbe6b44, flags=...) at kernel/qeventloop.cpp:149
#93 0xf5dca55e in QEventLoop::exec (this=0xffbe6b44, flags=...) at kernel/qeventloop.cpp:204
#94 0xf5dd06d6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#95 0xf64585b4 in QApplication::exec () at kernel/qapplication.cpp:3828
#96 0x0805030c in main (argc=1, argv=0xffbe6cb4) at ../../../systemsettings/app/main.cpp:49
Comment 5 Rogier 2014-10-10 09:27:06 UTC
Please let me know if you need more examples - e.g. from plasma-desktop.

BTW: My statement that the above systemsettings backtrace happened while starting was in error: it happened when selecting 'Workspace Appearance and Behavior'/'Workspace Appearance'/'Desktop Theme' after starting. Sorry for any confusion.
Simply selecting that category makes systemsettings crash.
Comment 6 Christoph Feck 2014-10-10 12:14:03 UTC
Those should be enough, they both indeed point to code handling cache files.
Comment 7 Myriam Schweingruber 2015-07-19 18:28:47 UTC
*** Bug 350371 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Crouthamel 2018-10-31 03:55:35 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Mike 2018-11-03 12:32:07 UTC
This could be the same as or similar to bug 400610. I was able to track this down to a specific line in kcoreaddons: src/lib/caching/kshareddatacache.cpp, see bug 400610
Comment 10 Andrew Crouthamel 2018-11-05 02:46:16 UTC
Thanks for the update!
Comment 11 Alexey Min 2018-11-07 23:33:48 UTC
Git commit eb916c305a5cd8683e7e8f955740a7c810220e19 by Alexey Min.
Committed on 07/11/2018 at 23:33.
Pushed by alexeymin into branch 'master'.

Fix crash if XDG_CACHE_HOME directory is too small or out of space

Summary:
Incorrect checking for error return code of posix_fallocate() causes function to think that everything is OK, while it is not, causing crash in some cases.
Related: bug 400610

Test Plan:
good test plan provided in https://bugs.kde.org/show_bug.cgi?id=400610 . Works like a charm, tested in KDE Neon dev-ustable

The reason for bug was that return value of posix_fallocate() was assumed to be negative on error, but in fact it is a positive integer. The check was `< 0`, whi should be `!= 0`. ( http://man7.org/linux/man-pages/man3/posix_fallocate.3.html )

With this fix applied test application does not crash, and the output in console widow is:
```
No space left on device. Check filesystem free space at your XDG_CACHE_HOME!
The operating system is unable to promise 10547304 bytes for mapped cache, abandoning the cache for crash-safety.
org.kde.kcoreaddons: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase
```

Reviewers: dfaure, #frameworks, mpyne

Reviewed By: dfaure

Subscribers: cfeck, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16744

M  +4    -1    src/lib/caching/kshareddatacache_p.h

https://commits.kde.org/kcoreaddons/eb916c305a5cd8683e7e8f955740a7c810220e19
Comment 12 Alexey Min 2018-11-07 23:46:39 UTC
Since 400610 is automatically closed as resolved fixed, this one should probably be closed too.