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 672175 - Make CamelFolderSearch cancellable
Make CamelFolderSearch cancellable
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 207011 665408 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-15 18:25 UTC by Milan Crha
Modified: 2014-02-19 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2012-03-15 18:25:25 UTC
Err, this is bad, the CamelFolderSearch API doesn't support cancellables, thus one cannot cancel operations like "Generating message list". I faced it when searching in a remote folder for headers which are not cached in folder's summary, like Bcc, where the folder doesn't have downloaded all messages yet, but it requires them locally for searching.

Below is the actual backtrace of the operation. The frame 37 passes GCancellable into regen_list_exec, but it is gone in frame 36 at camel_folder_search_by_expression. This API should be fixed, because the only way of letting it stop before it downloads the whole 100K messages folder is to kill evolution.

Thread 3 (Thread 0x7fb267fff700 (LWP 7901))

  • #0 poll
    from /lib64/libc.so.6
  • #1 pt_poll_now
    at ../../../mozilla/nsprpub/pr/src/pthreads/ptio.c line 615
  • #2 pt_Continue
    at ../../../mozilla/nsprpub/pr/src/pthreads/ptio.c line 738
  • #3 pt_Recv
    at ../../../mozilla/nsprpub/pr/src/pthreads/ptio.c line 1896
  • #4 ssl_DefRecv
    at ssldef.c line 94
  • #5 ssl3_GatherData
    at ssl3gthr.c line 90
  • #6 ssl3_GatherCompleteHandshake
    at ssl3gthr.c line 196
  • #7 ssl3_GatherAppDataRecord
    at ssl3gthr.c line 251
  • #8 DoRecv
    at sslsecur.c line 556
  • #9 ssl_SecureRecv
    at sslsecur.c line 1164
  • #10 ssl_Read
    at sslsock.c line 1669
  • #11 read_from_prfd
    at camel-tcp-stream-raw.c line 332
  • #12 tcp_stream_raw_read
    at camel-tcp-stream-raw.c line 359
  • #13 camel_stream_read
    at camel-stream.c line 123
  • #14 camel_stream_buffer_gets
    at camel-stream-buffer.c line 521
  • #15 camel_imap_store_readline
    at camel-imap-store.c line 3315
  • #16 camel_imap_command_response
    at camel-imap-command.c line 361
  • #17 imap_read_response
    at camel-imap-command.c line 474
  • #18 camel_imap_command
    at camel-imap-command.c line 123
  • #19 imap_get_message_sync
    at camel-imap-folder.c line 3603
  • #20 camel_folder_get_message_sync
    at camel-folder.c line 3573
  • #21 get_current_message
    at camel-folder-search.c line 1109
  • #22 check_header
    at camel-folder-search.c line 1158
  • #23 search_header_contains
    at camel-folder-search.c line 1233
  • #24 camel_sexp_term_eval
    at camel-sexp.c line 812
  • #25 term_eval_or
    at camel-sexp.c line 376
  • #26 camel_sexp_term_eval
    at camel-sexp.c line 802
  • #27 search_match_all
    at camel-folder-search.c line 926
  • #28 camel_sexp_term_eval
    at camel-sexp.c line 802
  • #29 term_eval_or
    at camel-sexp.c line 376
  • #30 camel_sexp_term_eval
    at camel-sexp.c line 802
  • #31 term_eval_and
    at camel-sexp.c line 310
  • #32 camel_sexp_term_eval
    at camel-sexp.c line 802
  • #33 camel_sexp_eval
    at camel-sexp.c line 1730
  • #34 camel_folder_search_search
  • #35 imap_search_by_expression
  • #36 camel_folder_search_by_expression
  • #37 regen_list_exec
    at message-list.c line 4697
  • #38 mail_msg_proxy
    at mail-mt.c line 423
  • #39 g_thread_pool_thread_proxy
    at gthreadpool.c line 319
  • #40 g_thread_create_proxy
    at gthread.c line 1962
  • #41 start_thread
    from /lib64/libpthread.so.0
  • #42 clone
    from /lib64/libc.so.6

Comment 1 Matthew Barnes 2012-03-15 21:13:08 UTC
CamelFolderSearch is one of those APIs keeping Camel bundled with E-D-S.

Have at it, scrap the whole thing if you need to.  The current API is crap.
Comment 2 Milan Crha 2012-03-27 15:20:25 UTC
I just made it cancellable, thus the Generating message list can be cancelled by a user.

Created commit eee3118 in eds master (3.5.1+)
Created commit b693398 in evo master (3.5.1+)
Created commit 446ccda in eex master (3.5.1+)
Created commit fe725a7 in ema master (3.5.1+)
Created commit cd1c2ee in egw master (3.5.1+)
Created commit f68b45e in ews master (3.5.1+)
Comment 3 Milan Crha 2012-06-13 09:01:07 UTC
*** Bug 665408 has been marked as a duplicate of this bug. ***
Comment 4 Milan Crha 2014-02-19 14:19:13 UTC
*** Bug 207011 has been marked as a duplicate of this bug. ***