After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688366 - WebDAV book can cause high CPU usage
WebDAV book can cause high CPU usage
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
3.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-11-15 07:54 UTC by Rick
Modified: 2012-11-28 11:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (3.23 KB, patch)
2012-11-28 11:41 UTC, Milan Crha
committed Details | Review

Description Rick 2012-11-15 07:54:24 UTC
creating a webdav address book and providing a zimbra server ie: http(s)://zimbra.comain.xxx/dav/[user]/Contacts or Yahoo : http(s)://carddav.address.yahoo.com/dav/[user]/ fails to connect or import contacts even when the URL works in the browser (displays the list of contacts).
Comment 1 Milan Crha 2012-11-20 18:45:21 UTC
Thanks for a bug report. I believe this is related to bug #688084, and possibly partly to bug #686785 too. Both are included in 3.6.2 release. Could you re-add your WebDAV book with that version, and let me know it helped for you, please?
Comment 2 Rick 2012-11-27 14:27:39 UTC
nope... i tried with 3.6.2 in opensuse and still no luck :-(
Comment 3 Milan Crha 2012-11-28 11:37:12 UTC
Thanks for the update. I tried to reproduce it here, which was pretty simple with your addresses, and I failed in 50% of it. I can connect to my Zimbra server with no issue, but I cannot connect to Yahoo! server. If I try with a web browser, then the authentication identifies itself as Zimbra too, thus I guess it's something with their version.

If I connect to https://carddav.address.yahoo.com/dav/user@ymail.com/ then I get no contacts, but also the evolution-addressbook-factory uses 100% of CPU - which is on bug I found during this testing. The other thing is that the Yahoo! server responses from this domain are incorrect, I either receive Inter Server Error or empty XML files (which are causing the hight CPU usage). I enabled WebDAV debugging for the addresbook factory with:
   $ WEBDAV_DEBUG=all /usr/libexec/evolution-addressbook-factory -w
then started evolution and watched the output on factory's console, and I realized that the server also has the "Contacts" subfolder, thus I added it into the URL. In that case the server reject even opening the folder on that domain. I tried to use the calendar domain, which is 
   https://caldav.calendar.yahoo.com/dav/user@ymail.com/Contacts
and it is able to open the folder, but shows no contacts. I tried to create a new contact there, but it failed with an Internal Server Error message. I found the second bug in the evolution's code, it doesn't make sure the URL ends with a forward slash, thus it creates new contacts as
   ...dav/user@ymail.com/Contacts0FA253C-73F96B8C-7CDE57A4.vcf
which is wrong, because the contact should be created in the given folder, not on the same level as the opened folder is. Though even with this fixed the Yahoo! still resists to cooperate. I'm pretty sure it's an issue on the Yahoo! server side, because as I said, the other WebDAV Zimbra server works just fine for me. Note I completely reentered my WebDAV addressbooks to avoid bugs mentioned in comment #1.

I'm using this bug report for the two issues found on the evolution-data-server side.
Comment 4 Milan Crha 2012-11-28 11:41:31 UTC
Created attachment 230078 [details] [review]
eds patch

for evolution-data-server;

This fixes two above-mentioned issues:
a) high CPU on invalid XML response from a server
b) ensures priv->uri ends with s forward slash, thus new contacts are created
   inside given folder, not on the same level as the folder
Comment 5 Milan Crha 2012-11-28 11:48:44 UTC
Created commit 1a8ecb3 in eds master (3.7.3+)
Created commit 3a1564e in eds gnome-3-6 (3.6.3+)