GNOME Bugzilla – Bug 627999
Cannot autocomplete with contacts
Last modified: 2010-10-13 07:53:46 UTC
evolution 2.31.91 When i try to auto complete any email id in mapi address book, i get time out and auto completion will be unsuccessful. Though in contact view, if i click on address book, i see the contact. Note - i deleted old (migrated) address book cache and fetched fresh one. gdb traces of evolution
+ Trace 223405
Confirming, I see this too, with mapi accounts.
I run e-addressbook-factory from the terminal with latest openchange and samba4 and I see error like: ../librpc/rpc/dcerpc.c:181: Type mismatch: name[DATA_BLOB: ../../librpc/ndr/ndr_basic.c:1132] expected[struct tevent_req] which leads to a crash. It seems that a thread-safety of openchange is required here, or to make ema less threading (my effort to actually speed up things, with a paralelism).
OK, basically openchange and samba4 are not thread safe, and my recent rewrite to make ema more threading-like uncovers this issue in more visible manner. I'm not much willing to have a global connection lock, because it'll make ema slow again, but it seems we have no other option. I will also make notification optional, though on by default, because its invocation is unpredictable with respect of other threads. I'll see and update this bug report when I'll have something.
Created attachment 169042 [details] [review] proposed ema patch for evolution-mapi; - every (most of) operation on mapi is guarded with a global lock - use MAPI_NO_NOTIFY=1 to disable notifications - EBookBackend's summary was rewritten with a cache (little typo in the code). Let it fetch items twice and it'll be fine ok.
*** Bug 627332 has been marked as a duplicate of this bug. ***
Created attachment 169047 [details] [review] proposed ema patch ][ for evolution-mapi; Almost same as the earlier one, only doesn't block global lock in the fetching callbacks, giving a chance to others to work too.
Initial results say that patch may not be enough. What are the problems i see 1) I have cached a mapi address book out of 5 mapi address books and that address book has 900 contacts. I see all the contacts of that address book in contact view. Now if i try to compose a mail, click on 'To' and search for a contact which is there for sure in that particular address book, i see 'searching' but no result. I see timeout on evolution terminal. 2) Now when i clear the search and go back to contact view, i see empty address book which showed 900 contacts before doing search. 3) Contacts downloading is still very slow. 4) One of address book with name 'Contacts' which shows 20 contacts in owa, doesn't show anything in evolution. If you want, i can do more testing tomorrow.
Thanks for testing it. ad 3) hmm, 5 mapi address books, it might explain the slowness, because right now is anything in the ExchangeMapiConnection guarded with a global lock, which means only one of those can call libampi functions, and others are just waiting for it. ad 4) might be it's in the pile of "to be done" books The thing is that when the summary file was rewritten with a cache file, and cache file is now the old file, then it'll always load a whole addressbook on its load. Which may mean in your case a pretty huge loading. As soon as it updates the local cache as expected, the autocompletion should be fine again, together with 1) and 2). It was behaving like running ema account for the first time, with no local cache filled.
Created attachment 169150 [details] [review] proposed ema patch ]I[ for evolution-mapi; The third attempt, hopefully the last one. It should also fix the slowness you noticed while fetching GAL.
That works neat, gal download is fast though i see evolution cpu goes 100% some times when i launch new -> composer in middle of fetching contacts.
*** Bug 626193 has been marked as a duplicate of this bug. ***
Created attachment 169167 [details] [review] ema patch IV for evolution-mapi; Thanks for testing. This patch is almost the same as the previous one, the only difference is that the notifications are disabled by default. To enable them one should use MAPI_LISTEN_NOTIFY environment variable. There is no go due to thread unsafety of libmapi/samba4 code. With respect of 100% CPU, please try to get a backtrace of such situation, maybe we can address it. It's OK to provide it on IRC/pastebin. Thanks in advance.
Created commit bdfbaf6 in ema master (0.31.92+)
*** Bug 630846 has been marked as a duplicate of this bug. ***
*** Bug 578954 has been marked as a duplicate of this bug. ***