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 613209 - Crash after call of ResolveNames
Crash after call of ResolveNames
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
3.0.x
Other Linux
: Normal critical
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-18 02:12 UTC by David Ronis
Modified: 2011-06-17 17:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Evolution-mapi valgrind log (91.72 KB, text/plain)
2011-06-13 23:13 UTC, Johann Agnarsson
  Details
Updated valgrind log (94.18 KB, text/plain)
2011-06-14 17:24 UTC, Johann Agnarsson
  Details
ema patch (821 bytes, patch)
2011-06-17 07:12 UTC, Milan Crha
committed Details | Review

Description David Ronis 2010-03-18 02:12:09 UTC
I was switching folders and evo hung.   What's different here is that I had just reactivated my MAPI account and the folders are I switching into/out of were on the MAPI account.  I attached gdb and got the following backtrace:

Thread 3 (Thread 0xabafdb90 (LWP 20679))

  • #0 __lll_lock_wait
    from //lib/libpthread.so.0
  • #1 _L_lock_95
    from //lib/libpthread.so.0
  • #2 pthread_mutex_lock
    from //lib/libpthread.so.0
  • #3 <signal handler called>
  • #4 find_SPropValue_data
    at libmapi/property.c line 235
  • #5 exchange_mapi_util_find_row_propval
    at exchange-mapi-utils.c line 187
  • #6 exchange_mapi_util_get_recipients
    at exchange-mapi-connection.c line 889
  • #7 exchange_mapi_connection_fetch_items
    at exchange-mapi-connection.c line 1326
  • #8 camel_mapi_folder_fetch_summary
    at camel-mapi-folder.c line 1022
  • #9 mapi_refresh_folder
    at camel-mapi-folder.c line 1129
  • #10 mapi_refresh_info
    at camel-mapi-folder.c line 166
  • #11 camel_folder_refresh_info
    at camel-folder.c line 347
  • #12 refresh_folder_exec
    at mail-ops.c line 1694
  • #13 mail_msg_proxy
    at mail-mt.c line 471
  • #14 g_thread_pool_thread_proxy
    at gthreadpool.c line 315
  • #15 g_thread_create_proxy
    at gthread.c line 1893
  • #16 start_thread
    from //lib/libpthread.so.0
  • #17 clone
    from //lib/libc.so.6

Comment 1 Milan Crha 2011-05-05 06:22:54 UTC
Similar downstream bug report from 3.0.1:
https://bugzilla.redhat.com/show_bug.cgi?id=701955

Thread 1 (Thread 0x7f96c919d700 (LWP 14432))

  • #0 find_SPropValue_data
    at libmapi/property.c line 241
  • #1 exchange_mapi_util_find_row_propval
    at exchange-mapi-utils.c line 210
  • #2 exchange_mapi_util_find_row_propval
    at exchange-mapi-utils.c line 203
  • #3 exchange_mapi_connection_ex_to_smtp
    at exchange-mapi-connection.c line 3508

Comment 2 Reinout van Schouwen 2011-05-06 09:58:11 UTC
Is there anything else I can do to help debug this problem?
Comment 3 Milan Crha 2011-05-09 15:59:09 UTC
Could you run evolution like this [1], sanitize resulting log.txt and get it here, please? It'll be quite long, so only the end before the crash, near ResolveNames should be enough. I hope it'll show us a bit more info. I can, alternatively, create a test package with some debugging patch applied to see what values are used. Maybe a valgrind will help here [2]?

[1] MAPI_DEBUG=10 evolution &>log.txt
[2] G_SLICE=always-malloc valgrind --num-callers=50 evolution &>log2.txt
Comment 4 Valent Turkovic 2011-06-02 11:36:08 UTC
Hi,
I tried both and I'll upload log.txt, but when I tried valgrind evolution starts but just sits there trying to connect to exchange server for over 10 minutes, and log2.txt grew up to 14 MB! Then I killed it.

So here is only the log.txt

If I can help further just say how.
Comment 5 Valent Turkovic 2011-06-02 11:42:35 UTC
Ups, I was wrong, log2.txt is small but first one - log.txt is huge. So here is the link to it: http://dl.dropbox.com/u/184632/log.txt
Comment 6 Milan Crha 2011-06-03 07:14:44 UTC
Thanks for the investigation, Valent. The log shows mostly name resolution requests at the bottom, but what surprises me it doesn't show a crash notice, as it use to on the console. Nonetheless, I do not see anything suspicious from the log.txt file, on the first look. Could you try with the valgrind, please? Just in case. Thanks in advance.
Comment 7 Valent Turkovic 2011-06-03 21:07:34 UTC
Hi, no problem, I can use valgrind but need instructions how. I used line you provided but that starts evolution and evolution shows message in status bar "trying to connect to..." and nothing happens. CPU is 100% loaded but evolutions is just trying to connect, no errors are reported and no crashes.

Should I leave it for more than 30 minutes?
Comment 8 Milan Crha 2011-06-06 08:34:36 UTC
Using 100% CPU is fine, it does that because of all the memory checking in valgrind, though the connecting may not take more than a minute (usually), definitely not more than 30 minutes. It's possible that valgrind got some memory issue and wrote it to the log, then please keep it running for some time and then close evolution, whether it'll show "trying to connect to..." or not. Say for those 30 minutes max. If evolution will not need to close itself after you close it with File->Quit or with the "x" window button, then press Ctrl+C once in the terminal where you run valgrind. If you press it only once then valgrind will catch it and will finish its summary calculations (it'll not stop immediately, due to all the statistic calculation).
Comment 9 Valent Turkovic 2011-06-08 06:42:45 UTC
I saw Fedora updates and Evolution was one of them, but also was the kernel update. After update I got vesa driver to load instead of nvidia driver so I rebuilt nvidia modules for new kernel. After few failed X starts now my quite old demo machine wont even boot. Looks like HDD has died so I can't help further until i get new HDD in this machine. Sorry.
Comment 10 Johann Agnarsson 2011-06-13 23:13:45 UTC
Created attachment 189860 [details]
Evolution-mapi valgrind log
Comment 11 Johann Agnarsson 2011-06-13 23:15:20 UTC
Comment on attachment 189860 [details]
Evolution-mapi valgrind log

Have the same problem.
Attached my log2.txt
Comment 12 Milan Crha 2011-06-14 05:39:49 UTC
Thanks for a valgrind log. I see it's showing memory issues just in a place where the backtrace is located, but it misses debug info packages for openchange and evolution-mapi. Could you install them and update the valgrind log, please? it may show lines like:
> at 0x1644884D: find_SPropValue_data (in /usr/lib64/libmapi-openchange.so.0.9)
> by 0x161D8C46: exchange_mapi_util_find_row_propval (in /usr/lib64
> /libexchangemapi-1.0.so.0.0.0)

only at the end, instead of
> in /usr/lib64/libmapi-openchange.so.0.9
> in /usr/lib64/libexchangemapi-1.0.so.0.0.0
there might be shown line numbers, like for example for camel, which comes from evolution-data-server, for which you have installed correct debug info packages (the version for the binary package and for the debug info package may match).
> by 0x3005A39637: camel_folder_refresh_info_sync (camel-folder.c:3373)

Also, what is your exact version of evolution-mapi, please?
Comment 13 Johann Agnarsson 2011-06-14 17:24:32 UTC
Created attachment 189930 [details]
Updated valgrind log

Hi,
I've attached the updated log file.

This is the version of evolution-mapi I'm running:

evolution-mapi-3.0.2-1.fc15.x86_64

Let me know if you need any more information.
Comment 14 Milan Crha 2011-06-16 11:12:45 UTC
Thanks for the update. I guess I got the issue. I think that the ResolveNames call succeeded, but there was no name resolved, thus there was no row in the table, and evolution-mapi asked libmapi to search in an uninitialized memory (after the block allocated in deeper library, as valgrind calls it).

I built a test package [1] and I would like to ask you to repeat the crash with it. It'll be quite chatty, to ensure my theory is right. Just run it like this:
   $ evolution &>log.txt
and let it do the usual stuff like it might crash, but it will not. Then close evolution and check content of the log.txt file. Is there any line with "***" (without quotes) there? I'm interested in surrounding lines, three lines before and three lines after it. Please paste them here. There is not printed any private information, only memory pointers and how many rows were received. If it'll work, then I'll do an official update and include the correct fix in evolution-mapi sources. Thanks in advance.

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=3134477
Comment 15 Johann Agnarsson 2011-06-16 16:56:46 UTC
Hi Milan,

You are right it doesn't crash.
When I try reading a message it just gets stuck on loading.

Here are the messages from the log:

exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f38c0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f38c0, rows:1 arow:0x7febf86f3930
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f37b0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f37b0, rows:1 arow:0x7febf86f2ff0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f3e60
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f3e60, rows:0 arow:0x7febf86f3fa0
        *** got it *** skipping because either ambiguous or no recipient received
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f2580
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f2580, rows:1 arow:0x7febf86f4970
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f3ed0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f3ed0, rows:1 arow:0x7febf86f4670
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f4450
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f4450, rows:1 arow:0x7febf86f44c0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f5460
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f5460, rows:1 arow:0x7febf86f6250
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86f5920
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86f5920, rows:1 arow:0x7febf86f5990
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86fbb40
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86fbb40, rows:0 arow:0x7febf86fc240
        *** got it *** skipping because either ambiguous or no recipient received
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86fc2a0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86fc2a0, rows:1 arow:0x7febf86fc310
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86fbd90
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86fbd90, rows:1 arow:0x7febf86fbe00
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86fcab0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86fcab0, rows:1 arow:0x7febf86fcb20
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf85156e0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf85156e0, rows:1 arow:0x7febf855e8b0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf81c3570
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf81c3570, rows:1 arow:0x7febf813c790
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86b9a30
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86b9a30, rows:0 arow:0x7febf8991090
        *** got it *** skipping because either ambiguous or no recipient received
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86016a0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86016a0, rows:1 arow:0x7febf84bb1b0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf8518e90
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf8518e90, rows:1 arow:0x7febf81e4e00
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf8549950
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf8549950, rows:1 arow:0x7febf8704f90
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf87f0250
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf87f0250, rows:1 arow:0x7febf880c4c0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf87eb870
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf87eb870, rows:1 arow:0x7febf8823c60
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf82ae3a0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf82ae3a0, rows:0 arow:0x7febf86e0670
        *** got it *** skipping because either ambiguous or no recipient received
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf81ca620
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf81ca620, rows:1 arow:0x7febf836f060
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf86fef60
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf86fef60, rows:1 arow:0x7febf86f3670
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf80f3750
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf80f3750, rows:1 arow:0x7febf86ce680
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95be650
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95be650, rows:1 arow:0x7febf95bcd50
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95bf3b0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95bf3b0, rows:1 arow:0x7febf95bfdd0
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95c01e0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95c01e0, rows:0 arow:0x7febf95bdbf0
        *** got it *** skipping because either ambiguous or no recipient received
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95bf5a0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95bf5a0, rows:1 arow:0x7febf95bf610
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95bfbf0
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95bfbf0, rows:1 arow:0x7febf95bfc60
exchange_mapi_connection_ex_to_smtp: Unicode check result:0 SRowSet:0x7febf95ba180
   exchange_mapi_connection_ex_to_smtp: trying with SRowSet:0x7febf95ba180, rows:1 arow:0x7febf95bfa70

Let me know if there is something else you need from me.

Thanks!
Comment 16 Milan Crha 2011-06-17 07:05:14 UTC
Great, thanks for the update. So it really returned success with no actual rows returned. I'll make a patch for it.

(In reply to comment #15)
> When I try reading a message it just gets stuck on loading.

evolution-mapi's background libraries aren't thread safe, thus the evolution-mapi tries to avoid races by aggressive locking, which can lock the application for some time. For example, if there is a folder update in progress, then any request to download a message from the server will wait till the previous operation is finished. I guess this is what happened to you here.
Comment 17 Milan Crha 2011-06-17 07:12:46 UTC
Created attachment 190094 [details] [review]
ema patch

for evolution-mapi;

Patch to fix the issue. Basically check whether were got any rows too, because accessing row itself.
Comment 18 Milan Crha 2011-06-17 07:15:07 UTC
Created commit ae2bf82 in ema master (3.1.3+)
Created commit 8a435eb in ema gnome-3-0 (3.0.3+)
Comment 19 Johann Agnarsson 2011-06-17 17:41:52 UTC
Just wanted to confirm the patch fixed the issue I was having. Thanks!