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 724039 - Message preview shows a wrong message
Message preview shows a wrong message
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.11.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 595202 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-02-10 15:01 UTC by Fabiano Fidêncio
Modified: 2014-12-12 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabiano Fidêncio 2014-02-10 15:01:10 UTC
Every once in a while, when click in a message to read it, the message "Error verifying signature: Operation was cancelled" is shown.
After a few times trying to open the message I'm able to see the message's content.

I can see this problem happening when I'm using my Zimbra account (IMAP+).

What kind of info would be useful?
Comment 1 André Klapper 2014-02-10 15:05:31 UTC
I can confirm this in 3.10 on my GMail IMAP+ account.
Comment 2 Matthew Barnes 2014-02-10 16:13:00 UTC
I've never seen this myself, so I need some help debugging it.  I'd like to know where the cancellation error is getting set.

I assume it's happening in the CamelCipherContext call.  Catching specific errors for something not 100% reproducible is a little tricky though.

Try this in gdb.  Substitute $BP1 and $BP2 for the breakpoint numbers gdb assigns.  (Sorry this is a bit of a pain; I can't figure out a more auto-
mated way to set this up with my feeble gdb skillz.)

  (gdb) break g_set_error
  # Note breakpoint number ($BP1)

  (gdb) disable $BP1

  (gdb) break gpg_verify_sync
  # Note breakpoint number ($BP2)

  (gdb) continue
  # Select a signed message to halt at $BP2.

  (gdb) commands $BP2
  > enable $BP1
  > continue
  > end

  (gdb) up
  (gdb) break
  (gdb) commands
  > disable $BP1
  > continue
  > end

  (gdb) continue

Continue using Evolution as normal.

Hopefully that will break when a GError is set, but only while verifying a digital signature.  When it halts at "g_set_error", get a backtrace.
Comment 3 André Klapper 2014-02-10 17:07:56 UTC
This might NOT be the same issue as one of the two message HAS a signature, might rather be a race issue, anyway:

Local POP inbox, when very quickly going through the message list pane with the arrow up/down keys.
Message list pane shows a different message chosen (without signature) than what headers in message preview pane show (neighbor message with signature).

Body in message preview pane shows only
   "Error verifying signature: Operation was cancelled"
and when accessing that message again, it says "Signature exists, but need public key" at the bottom.


$:andre\> gdb evolution
(gdb) run
Starting program: /usr/bin/evolution 
^C
Program received signal SIGINT, Interrupt.
[...]
(gdb) break g_set_error
Breakpoint 1 at 0xb4297600: file gerror.c, line 551.
(gdb) disable 1
(gdb) break gpg_verify_sync
Breakpoint 2 at 0xb78ba760: file camel-gpg-context.c, line 1765.
(gdb) continue
Continuing.
[...]

Thread 2463030080 (LWP 6739)

  • #1 camel_cipher_context_verify_sync
    at camel-cipher-context.c line 940

Thread 146 (Thread 0x92cedb40 (LWP 6739))

  • #0 gpg_verify_sync
    at camel-gpg-context.c line 1765
  • #1 camel_cipher_context_verify_sync
    at camel-cipher-context.c line 940
  • #2 empe_mp_signed_parse
    at e-mail-parser-multipart-signed.c line 122
  • #3 e_mail_parser_extension_parse
    at e-mail-parser-extension.c line 89
  • #4 e_mail_parser_parse_part_as
    at e-mail-parser.c line 561
  • #5 empe_message_parse
    at e-mail-parser-message.c line 91
  • #6 e_mail_parser_extension_parse
    at e-mail-parser-extension.c line 89
  • #7 mail_parser_run
    at e-mail-parser.c line 127
  • #8 e_mail_parser_parse_sync
    at e-mail-parser.c line 347
  • #9 mail_reader_parse_message_run
    at e-mail-reader-utils.c line 2376
  • #10 run_in_thread
    at gsimpleasyncresult.c line 871
  • #11 io_job_thread
    at gioscheduler.c line 89
  • #12 g_task_thread_pool_thread
    at gtask.c line 1245
  • #13 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #14 g_thread_proxy
    at gthread.c line 798
  • #15 start_thread
    at pthread_create.c line 309
  • #16 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 129
(gdb) commands
Type commands for breakpoint(s) 3, one per line.
End with a line saying just "end".
>disable 1
>continue
>end
(gdb) continue
Continuing.
[New Thread 0x93cefb40 (LWP 6743)]
Detaching after fork from child process 6744.
[New Thread 0x994fab40 (LWP 6745)]
[Thread 0x93cefb40 (LWP 6743) exited]

Breakpoint 3, camel_cipher_context_verify_sync (context=context@entry=0xc510188, ipart=ipart@entry=0xae46a80, 
    cancellable=cancellable@entry=0xbaf7438, error=error@entry=0x92cece2c) at camel-cipher-context.c:941
941		CAMEL_CHECK_GERROR (context, verify_sync, valid != NULL, error);
[New Thread 0x93cefb40 (LWP 6746)]
[New Thread 0x96cf5b40 (LWP 6747)]
[...]
Comment 4 Fabiano Fidêncio 2014-02-10 23:38:45 UTC
Matthew,

Following your steps I could see the error happening but gdb didn't break at that point. So, I'm not completely sure if this output will be useful.
Anyway, here is the "t a a bt" following your steps:

Breakpoint 1 at 0x3c022359c0: file gerror.c, line 551.
Breakpoint 2 at 0x7ffff5d50a83: file camel-gpg-context.c, line 1765.
Continuing.
[New Thread 0x7fff657fa700 (LWP 32137)]
[New Thread 0x7fff1e7fc700 (LWP 32138)]
[Thread 0x7fff657fa700 (LWP 32137) exited]
[New Thread 0x7fff657fa700 (LWP 32139)]
[Thread 0x7fff657fa700 (LWP 32139) exited]
[New Thread 0x7fff657fa700 (LWP 32140)]
[Thread 0x7fff677fe700 (LWP 32065) exited]
[Thread 0x7fff657fa700 (LWP 32140) exited]
[Thread 0x7fff1ffff700 (LWP 32080) exited]
[New Thread 0x7fff1ffff700 (LWP 32141)]
[Thread 0x7fff1ffff700 (LWP 32141) exited]
[New Thread 0x7fff1ffff700 (LWP 32143)]
[New Thread 0x7fff657fa700 (LWP 32144)]
[New Thread 0x7fff677fe700 (LWP 32145)]
[Thread 0x7fff677fe700 (LWP 32145) exited]
[Thread 0x7fff874e7700 (LWP 32058) exited]
[New Thread 0x7fff874e7700 (LWP 32146)]
[Thread 0x7fff874e7700 (LWP 32146) exited]
[New Thread 0x7fff874e7700 (LWP 32147)]
[Thread 0x7fff874e7700 (LWP 32147) exited]
[New Thread 0x7fff874e7700 (LWP 32148)]
[Thread 0x7fff874e7700 (LWP 32148) exited]
[New Thread 0x7fff874e7700 (LWP 32149)]
[Thread 0x7fff874e7700 (LWP 32149) exited]
[New Thread 0x7fff874e7700 (LWP 32150)]
[Thread 0x7fff874e7700 (LWP 32150) exited]
[Thread 0x7fff657fa700 (LWP 32144) exited]
[Thread 0x7fff1f7fe700 (LWP 32081) exited]
[New Thread 0x7fff1f7fe700 (LWP 32151)]
[Thread 0x7fff1f7fe700 (LWP 32151) exited]
[New Thread 0x7fff1f7fe700 (LWP 32152)]
[New Thread 0x7fff657fa700 (LWP 32153)]
[New Thread 0x7fff874e7700 (LWP 32154)]
[Thread 0x7fff657fa700 (LWP 32153) exited]
[Thread 0x7fff874e7700 (LWP 32154) exited]
[Thread 0x7fff1f7fe700 (LWP 32152) exited]
[New Thread 0x7fff1f7fe700 (LWP 32155)]
[New Thread 0x7fff874e7700 (LWP 32156)]
[Thread 0x7fff874e7700 (LWP 32156) exited]
[Thread 0x7fff1e7fc700 (LWP 32138) exited]
[New Thread 0x7fff1e7fc700 (LWP 32157)]
[Thread 0x7fff1f7fe700 (LWP 32155) exited]
[Thread 0x7fff1e7fc700 (LWP 32157) exited]
[New Thread 0x7fff1e7fc700 (LWP 32158)]
[New Thread 0x7fff1f7fe700 (LWP 32159)]
[Thread 0x7fff1f7fe700 (LWP 32159) exited]

Thread 140734284572416 (LWP 32071)

  • #1 camel_cipher_context_verify_sync
    at camel-cipher-context.c line 493

Thread 1 (Thread 0x7ffff59d4a40 (LWP 32037))

  • #0 g_set_error
    at gerror.c line 551
  • #1 g_dir_open
    at gdir.c line 156
  • #2 WebCore::listDirectory(WTF::String const&, WTF::String const&)
    from /lib64/libwebkitgtk-3.0.so.0
  • #3 WebCore::PluginDatabase::getPluginPathsInDirectories(WTF::HashSet<WTF::String, WTF::StringHash, WTF::HashTraits<WTF::String> >&) const
    from /lib64/libwebkitgtk-3.0.so.0
  • #4 WebCore::PluginDatabase::refresh()
    from /lib64/libwebkitgtk-3.0.so.0
  • #5 WebCore::PluginDatabase::isMIMETypeRegistered(WTF::String const&)
    from /lib64/libwebkitgtk-3.0.so.0
  • #6 WebCore::FrameLoader::defaultObjectContentType(WebCore::KURL const&, WTF::String const&, bool)
    from /lib64/libwebkitgtk-3.0.so.0
  • #7 WebCore::HTMLPlugInImageElement::isImageType()
    from /lib64/libwebkitgtk-3.0.so.0
  • #8 WebCore::HTMLPlugInImageElement::didAttachRenderers()
    from /lib64/libwebkitgtk-3.0.so.0
  • #9 WebCore::Style::attachRenderTree(WebCore::Element*, WebCore::Style::AttachContext const&)
    from /lib64/libwebkitgtk-3.0.so.0
  • #10 WebCore::HTMLConstructionSite::executeQueuedTasks()
    from /lib64/libwebkitgtk-3.0.so.0
  • #11 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLToken&)
    from /lib64/libwebkitgtk-3.0.so.0
  • #12 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
    from /lib64/libwebkitgtk-3.0.so.0
  • #13 WebCore::HTMLDocumentParser::append(WTF::PassRefPtr<WTF::StringImpl>)
    from /lib64/libwebkitgtk-3.0.so.0
  • #14 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*, char const*, unsigned long)
    from /lib64/libwebkitgtk-3.0.so.0
  • #15 WebCore::DocumentLoader::commitData(char const*, unsigned long)
    from /lib64/libwebkitgtk-3.0.so.0
  • #16 WebKit::FrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int)
    from /lib64/libwebkitgtk-3.0.so.0
  • #17 WebCore::DocumentLoader::commitLoad(char const*, int)
    from /lib64/libwebkitgtk-3.0.so.0
  • #18 WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int)
    from /lib64/libwebkitgtk-3.0.so.0
  • #19 WebCore::CachedRawResource::addDataBuffer(WebCore::ResourceBuffer*)
    from /lib64/libwebkitgtk-3.0.so.0
  • #20 WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::PassRefPtr<WebCore::SharedBuffer>, long long, WebCore::DataPayloadType)
    from /lib64/libwebkitgtk-3.0.so.0
  • #21 WebCore::SubresourceLoader::didReceiveData(char const*, int, long long, WebCore::DataPayloadType)
    from /lib64/libwebkitgtk-3.0.so.0
  • #22 WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int)
    from /lib64/libwebkitgtk-3.0.so.0
  • #23 WebCore::readCallback(_GObject*, _GAsyncResult*, void*)
    from /lib64/libwebkitgtk-3.0.so.0
  • #24 async_ready_callback_wrapper
    at ginputstream.c line 519
  • #25 g_task_return_now
    at gtask.c line 1108
  • #26 complete_in_idle_cb
    at gtask.c line 1117
  • #27 g_main_dispatch
    at gmain.c line 3066
  • #28 g_main_context_dispatch
    at gmain.c line 3642
  • #29 g_main_context_iterate
    at gmain.c line 3713
  • #30 g_main_loop_run
    at gmain.c line 3907
  • #31 gtk_main
    from /lib64/libgtk-3.so.0
  • #32 main
    at main.c line 680

Comment 5 Milan Crha 2014-12-12 12:39:46 UTC
*** Bug 595202 has been marked as a duplicate of this bug. ***
Comment 6 Milan Crha 2014-12-12 12:48:15 UTC
The problem is that e_mail_reader_parse_message_finish() didn't return any error state, which means that the EMailReader filled message preview unconditionally. Fidencio's case was that he selected a signed message, but before the signature verification was over he managed to move to another message, which filled the message preview and cancelled the ongoing signature verification. Then the verification finished (with an error) and because the error (cancellation) was not properly propagated, the EMailReader replaced the preview panel content with that cancelled verification message. Confirmed when I cheat camel code to have more time to switch between messages.

Created commit 2d83d76 in evo master (3.13.9+) [1]
Created commit afab9d2 in evo evolution-3-12 (3.12.10+)

[1] https://git.gnome.org/browse/evolution/commit/?id=2d83d76