Bug 245173 - [KSharedDataCache] Crash when disk is full
Summary: [KSharedDataCache] Crash when disk is full
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kshareddatacache (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 253124 259347 263580 268940 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-19 22:00 UTC by omega
Modified: 2012-01-08 08:13 UTC (History)
7 users (show)

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


Attachments
New crash information added by DrKonqi (7.55 KB, text/plain)
2011-08-25 14:55 UTC, marsu1
Details
New crash information added by DrKonqi (14.75 KB, text/plain)
2012-01-08 08:13 UTC, subcoolent
Details

Note You need to log in before you can comment on or make changes to this bug.
Description omega 2010-07-19 22:00:10 UTC
Application: krunner (0.1)
KDE Platform Version: 4.4.92 (KDE 4.4.92 (KDE 4.5 RC2))
Qt Version: 4.7.0
Operating System: Linux 2.6.32-24-generic x86_64
Distribution: Ubuntu 10.04.1 LTS

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

krunner crashes when system hdd is full (no free space available on device)

The crash can be reproduced every time.

-- Backtrace:
Application: Interfaccia al comando di esecuzione (krunner), signal: Bus error
[KCrash Handler]
#6  0x00007f8c27f30f87 in KSharedDataCache::Private::mapSharedMemory() () from /usr/lib/libkdecore.so.5
#7  0x00007f8c27f2db92 in Private (this=0x1d32d60, cacheName=..., defaultCacheSize=83886080, expectedItemSize=0) at ../../kdecore/util/kshareddatacache.cpp:816
#8  KSharedDataCache (this=0x1d32d60, cacheName=..., defaultCacheSize=83886080, expectedItemSize=0) at ../../kdecore/util/kshareddatacache.cpp:1177
#9  0x00007f8c29f2ba1e in KImageCache (this=0x7f8c0bb10040, cacheName=..., defaultCacheSize=0, expectedItemSize=1) at ../../kdeui/util/kimagecache.cpp:69
#10 0x00007f8c2a476c56 in Plasma::ThemePrivate::useCache (this=0x1d470b0) at ../../plasma/theme.cpp:186
#11 0x00007f8c2a479d46 in Plasma::ThemePrivate::setThemeName (this=0x1d470b0, tempThemeName=<value optimized out>, writeSettings=<value optimized out>) at ../../plasma/theme.cpp:576
#12 0x00007f8c2a47cd7b in Plasma::Theme::settingsChanged (this=0x1d26d70) at ../../plasma/theme.cpp:413
#13 0x00007f8c2a47d110 in Theme (this=0x1d26d70, parent=<value optimized out>) at ../../plasma/theme.cpp:353
#14 0x00007f8c2a47d1b9 in ThemeSingleton () at ../../plasma/theme.cpp:330
#15 operator-> () at ../../plasma/theme.cpp:342
#16 Plasma::Theme::defaultTheme () at ../../plasma/theme.cpp:346
#17 0x00007f8c2a4765b9 in Plasma::SvgPrivate::setImagePath(QString const&) () from /usr/lib/libplasma.so.3
#18 0x00007f8c2a472a59 in Plasma::Svg::setImagePath (this=0x1d26c50, svgFilePath=...) at ../../plasma/svg.cpp:641
#19 0x00007f8c2b225d27 in KRunnerDialog (this=0x1d27630, runnerManager=<value optimized out>, parent=<value optimized out>, f=<value optimized out>) at ../../krunner/krunnerdialog.cpp:75
#20 0x00007f8c2b22c23d in Interface (this=0x7f8c0bb10040, runnerManager=0x5000000, parent=0x0) at ../../krunner/interfaces/default/interface.cpp:68
#21 0x00007f8c2b228e54 in KRunnerApp::initialize (this=0x1be5680) at ../../krunner/krunnerapp.cpp:173
#22 0x00007f8c2b2296a3 in KRunnerApp (this=0x1be5680) at ../../krunner/krunnerapp.cpp:77
#23 0x00007f8c2b2296f5 in KRunnerApp::self () at ../../krunner/krunnerapp.cpp:64
#24 0x00007f8c2b22a05d in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../krunner/main.cpp:62
#25 0x00007f8c2ae99c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fff26849d18) at libc-start.c:226
#26 0x00000000004006b9 in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2010-07-21 00:05:18 UTC
Bug 245172 has a different backtrace but refers to the same error.
Comment 2 Martin Flöser 2010-10-03 15:24:11 UTC
*** Bug 253124 has been marked as a duplicate of this bug. ***
Comment 3 Lamarque V. Souza 2011-02-09 21:58:15 UTC
*** Bug 259347 has been marked as a duplicate of this bug. ***
Comment 4 Lamarque V. Souza 2011-02-09 22:01:25 UTC
*** Bug 263580 has been marked as a duplicate of this bug. ***
Comment 5 Michael Pyne 2011-02-13 05:57:57 UTC
Git commit 7237842546dd284b388368afe3cc420c48cc51aa by Michael Pyne.
Committed on 13/02/2011 at 05:31.
Pushed by mpyne into branch 'master'.

Try to ensure disk cache is fully on-disk.

KSharedDataCache will use posix_fallocate() if it is available to try to
ensure that the file used for the disk cache is actually fully committed
to disk before using it. This should hopefully avoid crashes due to lack
of disk space.

Not all filesystems support posix_fallocate. If that function is not
claimed to be supported at compile time then a warning is issued, but
there are no other functionality changes. If the system claims to
support posix_fallocate and still fails, then it is assumed there is
really no space and KSharedDataCache will fallback to private memory.

This corresponds to KDE Platform 4.7. I intend to backport, but somehow
4.6 and 4.7 are already different enough that the patch wouldn't have
been a mere merge or cherry-pick, so perhaps in a few days once people
other than myself have had time to test.

CCBUG:245173

M  +3    -1    kdecore/util/kshareddatacache.cpp     
M  +45   -0    kdecore/util/kshareddatacache_p.h     

http://commits.kde.org/kdelibs/7237842546dd284b388368afe3cc420c48cc51aa
Comment 6 Frank Reininghaus 2011-03-20 12:03:02 UTC
*** Bug 268940 has been marked as a duplicate of this bug. ***
Comment 7 marsu1 2011-08-25 14:55:39 UTC
Created attachment 63142 [details]
New crash information added by DrKonqi

plasma-desktop (0.4) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.0

- What I was doing when the application crashed:
I was closing gmx sms manager, a wine programm

-- Backtrace (Reduced):
#6  memcpy () at ../sysdeps/x86_64/memcpy.S:79
#7  0x00007f3e6685035d in KSharedDataCache::insert (this=0xe81040, key=<value optimized out>, data=...) at /usr/include/bits/string3.h:52
#8  0x00007f3e66db316d in KImageCache::insertImage (this=0xe81040, key=..., image=...) at ../../kdeui/util/kimagecache.cpp:103
#9  0x00007f3e66db3696 in KImageCache::insertPixmap (this=0xe81040, key=..., pixmap=...) at ../../kdeui/util/kimagecache.cpp:119
#10 0x00007f3e68ad48b2 in Plasma::ThemePrivate::scheduledCacheUpdate (this=0x7d88a0) at ../../plasma/theme.cpp:302
Comment 8 subcoolent 2012-01-08 08:13:18 UTC
Created attachment 67566 [details]
New crash information added by DrKonqi

plasma-desktop (0.4) on KDE Platform 4.6.5 (4.6.5) using Qt 4.7.2

- What I was doing when the application crashed:

attempting to clear up more space. The screen keeps flashing, not allowing me to clear the trash.

-- Backtrace (Reduced):
#8  0x00d35c86 in operator int (this=0x89f6688, key=..., data=...) at /usr/include/bits/string3.h:52
#9  cachePageSize (this=0x89f6688, key=..., data=...) at ../../kdecore/util/kshareddatacache.cpp:361
#10 page (this=0x89f6688, key=..., data=...) at ../../kdecore/util/kshareddatacache.cpp:481
#11 page (this=0x89f6688, key=..., data=...) at ../../kdecore/util/kshareddatacache.cpp:511
#12 KSharedDataCache::insert (this=0x89f6688, key=..., data=...) at ../../kdecore/util/kshareddatacache.cpp:1446