Summary: | accessing mail contents lags for minutes and then sending mail does as well | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Martin Steigerwald <Martin> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.11.2 | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | strace of kmail going mad with akonadi and mysql |
Description
Martin Steigerwald
2013-10-16 10:29:00 UTC
merkaba:~> strace -c -fF -p 6450 Process 6450 attached with 4 threads - interrupt to quit ^CProcess 6450 detached Process 6453 detached Process 6456 detached Process 6457 detached % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 69.10 3.770837 48 79331 poll 12.55 0.684976 4 155855 154100 recvfrom 7.73 0.421865 6 73673 327 read 5.57 0.304150 4 72483 ioctl 3.88 0.211901 105951 2 restart_syscall 0.57 0.030906 5 5739 write 0.30 0.016511 9 1911 writev 0.24 0.012888 10 1272 sendmsg 0.02 0.001015 9 114 socket 0.02 0.000995 9 114 close 0.01 0.000453 38 12 sendto 0.00 0.000262 9 30 recvmsg 0.00 0.000107 10 11 5 stat 0.00 0.000036 6 6 bind 0.00 0.000025 4 6 getsockname ------ ----------- ----------- --------- --------- ---------------- 100.00 5.456927 390559 154432 total I am now producting a longer strace dump. Created attachment 82876 [details]
strace of kmail going mad with akonadi and mysql
I anomized the folder names. Its different folder names during the strace. Basically kmail seems to asks around all folders repeatedly while I just tried to access *one* mail.
file descriptors of this strace.
merkaba:~> cd /proc/$(pidof kmail)
merkaba:/proc/6450> ls -l fd
insgesamt 0
lr-x------ 1 martin martin 64 Okt 16 12:37 0 -> pipe:[11849]
l-wx------ 1 martin martin 64 Okt 16 12:37 1 -> /home/martin/.xsession-errors
lrwx------ 1 martin martin 64 Okt 16 12:37 10 -> socket:[62091]
lr-x------ 1 martin martin 64 Okt 16 12:37 11 -> /var/tmp/kdecache-martin/ksycoca4
lrwx------ 1 martin martin 64 Okt 16 12:37 12 -> anon_inode:[eventfd]
lr-x------ 1 martin martin 64 Okt 16 12:37 13 -> anon_inode:inotify
lrwx------ 1 martin martin 64 Okt 16 12:37 14 -> anon_inode:[eventfd]
lrwx------ 1 martin martin 64 Okt 16 12:37 15 -> socket:[64313]
lrwx------ 1 martin martin 64 Okt 16 12:37 18 -> socket:[65573]
l-wx------ 1 martin martin 64 Okt 16 12:37 2 -> /home/martin/.xsession-errors
lr-x------ 1 martin martin 64 Okt 16 12:37 21 -> /dev/urandom
lrwx------ 1 martin martin 64 Okt 16 12:37 25 -> socket:[66530]
lrwx------ 1 martin martin 64 Okt 16 12:37 3 -> anon_inode:[eventfd]
lr-x------ 1 martin martin 64 Okt 16 12:37 4 -> pipe:[61291]
lrwx------ 1 martin martin 64 Okt 16 12:37 5 -> socket:[65534]
l-wx------ 1 martin martin 64 Okt 16 12:37 6 -> pipe:[61291]
lrwx------ 1 martin martin 64 Okt 16 12:37 7 -> socket:[61292]
lrwx------ 1 martin martin 64 Okt 16 12:37 8 -> socket:[61293]
lrwx------ 1 martin martin 64 Okt 16 12:37 9 -> socket:[62090]
merkaba:~> netstat -anp | grep 61291
merkaba:~#1> netstat -anp | grep 65534
unix 3 [ ] STREAM VERBUNDEN 65534 6450/kmail
merkaba:~> netstat -anp | grep 61292
unix 3 [ ] STREAM VERBUNDEN 61292 6450/kmail
merkaba:~> netstat -anp | grep 61293
unix 3 [ ] STREAM VERBUNDEN 61293 6450/kmail
merkaba:~> netstat -anp | grep 62090
unix 3 [ ] STREAM VERBUNDEN 62090 6450/kmail
merkaba:~> netstat -anp | grep 65530
merkaba:~#1> netstat -anp | grep 64313
unix 3 [ ] STREAM VERBUNDEN 64313 6450/kmail
merkaba:~> netstat -anp | grep 65573
unix 3 [ ] STREAM VERBUNDEN 65573 6450/kmail
Downgrading to martin@merkaba:~> apt-show-versions | egrep "akonadi|kdepim|kmail|kdelibs|libqtgui|crm114|mysql" akonadi-backend-mysql:all/experimental 1.10.2-1 uptodate akonadi-backend-sqlite:amd64/sid 1.9.2-2+b1 uptodate akonadi-server:amd64/experimental 1.10.2-1 uptodate akonadiconsole:amd64/sid 4:4.10.5-2 uptodate crm114:amd64/sid 20100106-3 uptodate kdelibs-bin:amd64/experimental 4:4.11.2-1 uptodate kdelibs5-data:all/experimental 4:4.11.2-1 uptodate kdelibs5-plugins:amd64/experimental 4:4.11.2-1 uptodate kdepim:all/sid 4:4.10.5-2 uptodate kdepim-kresources:amd64/sid 4:4.10.5-2 uptodate kdepim-runtime:amd64/experimental 4:4.11.2-2 uptodate kdepim-strigi-plugins:amd64/sid 4:4.10.5-2 uptodate kdepimlibs-kio-plugins:amd64/experimental 4:4.11.2-2 uptodate kmail:amd64/sid 4:4.10.5-2 uptodate libakonadi-calendar4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-contact4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-kabc4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-kcal4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-kde4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-kmime4:amd64/experimental 4:4.11.2-2 uptodate libakonadi-notes4:amd64/experimental 4:4.11.2-2 uptodate libakonadiprotocolinternals1:amd64/experimental 1.10.2-1 uptodate libdbd-mysql-perl:amd64/sid 4.024-1 uptodate libkdepim4:amd64/sid 4:4.10.5-2 uptodate libkdepimdbusinterfaces4:amd64/sid 4:4.10.5-2 uptodate libmysqlclient-dev:amd64/sid 5.5.33+dfsg-1 uptodate libmysqlclient18:amd64/sid 5.5.33+dfsg-1 uptodate libqt4-sql-mysql:amd64/sid 4:4.8.5+git121-g2a9ea11+dfsg1-2 uptodate libqtgui4:amd64/sid 4:4.8.5+git121-g2a9ea11+dfsg1-2 uptodate mysql-client:all/sid 5.5.33+dfsg-1 uptodate mysql-client-5.5:amd64/sid 5.5.33+dfsg-1 uptodate mysql-common:all/sid 5.5.33+dfsg-1 uptodate mysql-server-core-5.5:amd64/sid 5.5.33+dfsg-1 uptodate python-mysqldb:amd64/sid 1.2.3-2 uptodate and restarting Akonadi and kmail *immediately* fixes this issue. Some informations about my setup: - Just POP3 accounts - Some have a large amount of mail, main account has Linux kernel-ml with 130000 mails in one folder - ThinkPad T520 Intel Sandybridge i5 with about 2,5 GHz, 8 GB of RAM, 300 GB Intel SSD, thus: The machine is *blazingly* fast. - BTRFS filesystem This basically works in KDEPIM 4.10. So I won´t follow any try this on Ext4 comments. Last time I did, it didn´t change a thing. There is some delay when Akonadi synchronized the kernel-ml folder, but here at lags with Akonadi due to Akonadiconsole just idling. Here we have an about 10 minuted install with that CPU usage distribution: merkaba:~> atopsar -O -b 12:30 -e 13:00 merkaba 3.12.0-rc4-tp520 #34 SMP PREEMPT Mon Oct 7 10:25:01 CEST 2013 x86_64 2013/10/16 -------------------------- analysis date: 2013/10/16 -------------------------- 12:31:56 pid command cpu% | pid command cpu% | pid command cpu%_top3_ 12:41:56 3949 mysqld 37% | 6450 kmail 35% | 3946 akonadis 5% 12:51:56 8202 mysqld 49% | 4076 virtuoso 20% | 8257 akonadi_ 14% For "retrieving folder contents" or more specifically I think "mail contents" KMail is using up too much CPU on this Sandybridge machine. The symptoms of Bug #322958 "KMail: duplicate special folder causes endless loop "Emitting defaultFoldersChanged" read very familiar to what I have been seeing. But other than a duplicate "drafs" folder I didn´t see any duplicate folders in ls -a ~/.local/share/local-mail or Akonadiconsole. I deleted the duplicate "drafts" folder from within Akonadiconsole. Well, deleting the duplicate "drafts" folder did the trick, so this is a duplicate of Bug #322958 "KMail: duplicate special folder causes endless loop "Emitting defaultFoldersChanged" *** This bug has been marked as a duplicate of bug 322958 *** |