Summary: | Konqueror cache size is ignored | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Alex Hermann <gaaf> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | adawit, aiacovitti, kollix, loacoon, mstu, rasasi78, redm |
Priority: | NOR | ||
Version: | 4.4.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch attempt |
Description
Alex Hermann
2010-05-06 21:16:44 UTC
I see the same behaviour in all 4.* versions (Kubuntu). My cache size is 50000 (KiB), but I just deleted 4Gb /var/tmp/kdecache-${USER}/http cache. Same here, and this can provoke crashes when the partition is full, especially when /var/tmp is in the root partition. I can reproduce this with 4.6.3 See comment #3. Was the closure intended ? My comment #3 says that I still can reproduce it.... Puzzled... Read slower, he said CAN not CAN'T ;). I don't know if it's fixed or not though, since my /var/tmp folder is now liked to my /tmp partition, avoiding my root patition to be full and make linux crash. Still... I cannot reproduce this. This problem should only occur if kio_http_cache_cleaner never runs to reclaim the expired or old cached document. Do you see a kio_http_cache_cleaner process running on your system ? If not and you have caching enabled, then that is the problem. Otherwise, can one of you enable debug area 7113 and look for messages that prints out "total size of cache files after cleaning is..." ? Compare the size printed out there with the one that is set in the cache settings dialog. I retested now with 4.8RC2. I have no idea how often the cache cleaner does its work - maybe this is the problem. I see that it reduces the cache when I login into KDE, but it does not reduce the cache when I simply reduce the cache size, e.g. from 1000 KB to 100 KB. Does it do its job when I never logout ? Maybe one needs to know when this should happen. Can you explain ? I'm running into the same problem. This is the second time I've noticed since I'm following this bug when I noticed the http cache dir had growed a lot till it consumed all my partition free space. I checked that the kio_http_cache_cleaner process was running, I then reset the maximum cache with a different value and pressed "Clean cache" button in the konqueror settings->web browsing->cache. I noticed the cache was actually cleaned after a long while. It looked all files in the cache were being analized. After that the cache was cleaned and after some browsing it reached the top I had set before and it was keeped there, as expected. Some time later, after some long konqueror sessions (I use hibernate, hence I reboot seldom) and some reboots I've just noticed the current http cache dir is about 662MB. My current maximum cache size is set to 51200KiB May anyone provide some guidance on how to get useful information when I've reached this point? Regards, Created attachment 75347 [details]
Patch attempt
I think the problem is that cleaner object is never created since (newBytesCounter > g_maxCacheSize) comparison is most of times wrong since newBytesCounter type (int) is not enough to compare with g_maxCacheSize which is qint64.
Find attached a patch that fixes newBytesCounter and trigger cleaner object properly. It worked for me after killing http_cache_cleaner and running the fixed version. This is something that wasn't working before.
HTH,
(In reply to comment #10) > Created attachment 75347 [details] > Patch attempt > > I think the problem is that cleaner object is never created since > (newBytesCounter > g_maxCacheSize) comparison is most of times wrong since > newBytesCounter type (int) is not enough to compare with g_maxCacheSize > which is qint64. > Find attached a patch that fixes newBytesCounter and trigger cleaner object > properly. It worked for me after killing http_cache_cleaner and running the > fixed version. This is something that wasn't working before. > HTH, The patch looks fine to me. Are you able to commit it or do you need someone to do it for you ? Thanks for reviewing Dawit. I have no git access and therefore I'd appreciate someone to commit it. If someone else is willing to try it, it'd be also great that the patch would be backported. Hint: Debian Wheezy will release with KDE 4.8.4 ;) Git commit f23c23d9645513305e32758357211ff17c395f0b by Dawit Alemayehu. Committed on 21/11/2012 at 07:22. Pushed by adawit into branch 'KDE/4.10'. Prevent integer overflow that could potentiall cause Konqueror to ignore cache size limit under certain circumstances. Though this fix is necessary to address use of incorrectly sized integer variable, I am not entirely sure it is 'the' fix for bug# 236607. Original patch provided by Raul. M +4 -4 kioslave/http/http_cache_cleaner.cpp http://commits.kde.org/kdelibs/f23c23d9645513305e32758357211ff17c395f0b Seems not fixed yet. Running KDE 4.10.4 here and had >800 MB in the cache dir, even though configuration is set to 50 MB. Manually cleaning the entire cache (/usr/lib/kde4/libexec/kio_http_cache_cleaner --clear-all) worked, though. |