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 564388 - UI blocks while reading a large news group
UI blocks while reading a large news group
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.24.x (obsolete)
Other All
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[nntp] evolution[disk-summary]
: 562979 (view as bug list)
Depends on:
Blocks: 543389
 
 
Reported: 2008-12-13 15:22 UTC by Brian J. Murrell
Modified: 2011-08-23 12:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Test patch with db improvements (4.27 KB, patch)
2009-06-22 09:53 UTC, Srinivasa Ragavan
committed Details | Review
test patched backported for 2.26.x branch (4.31 KB, patch)
2009-06-25 03:20 UTC, Srinivasa Ragavan
committed Details | Review

Description Brian J. Murrell 2008-12-13 15:22:32 UTC
Please describe the problem:
If I add a large newsgroup on an NNTP evolution reads the summaries for the entire news group and in the process of doing so, blocks all other UI operations.  i.e. minimizing and restoring a window does not cause a "repaint".

Steps to reproduce:
1. configure the gmane nntp server
2. subscribe to the gmane.linux.kernel folder



Actual results:
Summaries download, UI hangs.

Expected results:
Summaries download, evolution goes about it's business otherwise while downloading, letting me read mail, etc.

Does this happen every time?
Yes.

Other information:
Comment 1 Brian J. Murrell 2008-12-13 20:47:32 UTC
Oh great.  Now I'm stuck in a cycle of:

1. start evolution
2. [re]starts NNTP download of lkml and hangs UI
3. kill evolution
4. goto 1

"evolution --offline" doesn't help either because with it offline I cannot see the list of newsgroups in Folder Subscriptions to disable the subscription to this folder.  I guess it needs to be online to fetch and display the list of newsgroups.

Increasing Severity and I would like to see somebody increase Priority to reflect that evolution is now completely useless to me until I can break this vicious cycle.
Comment 2 Paul Bolle 2008-12-18 00:57:33 UTC
(In reply to comment #1) 
> 1. start evolution
> 2. [re]starts NNTP download of lkml and hangs UI
> 3. kill evolution
> 4. goto 1

How long have you (generally) waited between step 2 and 3?

Can you disable the account (Edit > Preferences > Accounts) while in offline mode>
Comment 3 Brian J. Murrell 2008-12-18 01:45:57 UTC
(In reply to comment #2)
> 
> How long have you (generally) waited between step 2 and 3?

Until it crashed with an ENOMEM.
 
> Can you disable the account (Edit > Preferences > Accounts) while in offline
> mode>

Sure but then I can't read any of the newsgroups I'm subscribed to, making the feature completely useless.

There is no way to unsubscribe from a group while an NNTP account is offline.  As soon as you put it online it starts trying to download hundreds of thousands of headers again.
Comment 4 Srinivasa Ragavan 2009-06-20 14:52:43 UTC
Hmm, possible that its locked. when you encounter it in gdb, 'thread apply all bt' would get a good trace to see on which lock main thread is waiting and can help to see who else is holding the lock.
Comment 5 Brian J. Murrell 2009-06-20 16:37:49 UTC
(In reply to comment #4)
> Hmm, possible that its locked. when you encounter it in gdb, 'thread apply all
> bt' would get a good trace to see on which lock main thread is waiting and can
> help to see who else is holding the lock.

I don't really have a "sandbox" I can mess around in and given what a pain in the ass it is to recover from this situation once in it, I am reluctant to purposely get into this situation.

Surely you have a sandbox that you can screw around with and scrub if you need to, yes?  If so, simply use gmane and subscribe to lkml with it.  You will very quickly see what I mean.
Comment 6 Srinivasa Ragavan 2009-06-22 09:53:26 UTC
Created attachment 137160 [details] [review]
Test patch with db improvements

I need someone to test this patch. I reviewed the entire nntp code and saw that these could be the cause for the long delays/hangs. Attached patch should help improve a lot.
Comment 7 Brian J. Murrell 2009-06-23 12:14:05 UTC
(In reply to comment #6)
> Created an attachment (id=137160) [edit]
> Test patch with db improvements
> 
> I need someone to test this patch. I reviewed the entire nntp code and saw that
> these could be the cause for the long delays/hangs. Attached patch should help
> improve a lot.

I'd love to test it but this doesn't appear to apply too cleanly to 2.26.1.  In fact, I can't even find a camel_nntp_get_headers() function in 2.26.1's camel/nntp provider.
Comment 8 Srinivasa Ragavan 2009-06-23 13:38:01 UTC
Oh, it doesn't apply on 2.26.x? Lemme put a back ported patch. Ideally it should go there as well.
Comment 9 Srinivasa Ragavan 2009-06-25 03:20:49 UTC
Created attachment 137348 [details] [review]
test patched backported for 2.26.x branch
Comment 10 Brian J. Murrell 2009-06-25 10:53:37 UTC
(In reply to comment #9)
> Created an attachment (id=137348) [edit]
> test patched backported for 2.26.x branch

This is an e-d-s patch, right?  The patch patches camel/providers/nntp/camel-nntp-utils.c but I don't have that file in my 2.26.1 source tree:

$ ls camel/providers/nntp/
camel-nntp-folder.c	 camel-nntp-store.lo	      camel-nntp-summary.lo
camel-nntp-folder.h	 camel-nntp-store-summary.c   ChangeLog
camel-nntp-folder.lo	 camel-nntp-store-summary.h   libcamelnntp.la
camel-nntp-private.h	 camel-nntp-store-summary.lo  libcamelnntp.urls
camel-nntp-provider.c	 camel-nntp-stream.c	      Makefile
camel-nntp-provider.lo	 camel-nntp-stream.h	      Makefile.am
camel-nntp-resp-codes.h  camel-nntp-stream.lo	      Makefile.in
camel-nntp-store.c	 camel-nntp-summary.c
camel-nntp-store.h	 camel-nntp-summary.h

Comment 11 Srinivasa Ragavan 2009-06-25 11:28:51 UTC
This patch is against e-d-s stable branch for gnome-2-26. May be 2.26.2 should do. 
Comment 12 Brian J. Murrell 2009-06-25 11:46:14 UTC
(In reply to comment #11)
> This patch is against e-d-s stable branch for gnome-2-26. May be 2.26.2 should
> do. 

Hrm.  This is not making any sense to me.  Looking at http://git.gnome.org./cgit/evolution-data-server/commit/?h=gnome-2-26&id=8c649f6db04ff488d66db5a365dc24099cd4bdda

I see that camel/providers/nntp/camel-nntp-utils.c was imported (i.e. created) back in 2000-04-14 19:05:33 (GMT).

Why does my 2.26.1 tarball not have this file?
Comment 13 Brian J. Murrell 2009-06-25 21:43:14 UTC
Hrm.  Further investigation yields that also, http://ftp.gnome.org/pub/GNOME/sources/evolution-data-server/2.26/evolution-data-server-2.26.2.tar.bz2 does not have the camel/providers/nntp/camel-nntp-utils.c file either:

$ tar tjvf evolution-data-server-2.26.2.tar.bz2 | grep camel-nntp-utils.c
$ 

Ideas why?
Comment 14 Brian J. Murrell 2009-06-26 00:35:59 UTC
OK.  After much mucking about with git and make distdir and whatnot, a simple grep of the source reveals that camel-nntp-utils.c is not even used to build e-d-s anymore.  I think.

So that makes the camel-nntp-utils.c portion of your patch moot/invalid.

Rebuilding e-d-s with your patch minus the camel-nntp-utils.c hunk.
Comment 15 Srinivasa Ragavan 2009-06-26 03:30:54 UTC
Argh. Im sorry. I just all code around and fixed everywhere. And then just a make install.
Comment 16 Akhil Laddha 2009-06-26 12:36:32 UTC
I tried the patch on master and i see great improvement, nice work Srini. Patch has reduced downloading time by almost 60%, i have tried folder subscription which has approx 200K mails 

But there is considerable delay between completion of downloading of the messages and showing them in message list. 

Gdb traces of evolution 


Comment 17 Brian J. Murrell 2009-06-26 12:43:02 UTC
(In reply to comment #16)
> 
> But there is considerable delay between completion of downloading of the
> messages and showing them in message list. 

I wonder if this delay you describe is the same thing I am reporting in bug 586882.
Comment 18 Akhil Laddha 2009-06-26 12:44:50 UTC
Once evolution CPU shot up to 100% 


Comment 19 Akhil Laddha 2009-06-26 12:46:11 UTC
(In reply to comment #17)

> I wonder if this delay you describe is the same thing I am reporting in bug
> 586882.
> 

Not sure as I don't have any search folder here. I was just trying with nntp.
Comment 20 Srinivasa Ragavan 2009-06-26 13:57:33 UTC
Akhil, first time setup of a folder of size 800K will take some time surely. Its gonna commit 800K records at once. 
Comment 21 Akhil Laddha 2009-06-29 05:15:54 UTC
Got crash here with evolution running under valgrind 

==5308== Thread 13:
==5308== Invalid read of size 4
==5308==    at 0x42C211A: camel_folder_summary_save_to_db (camel-folder-summary.c:1570)
==5308==    by 0xFBE2519: nntp_folder_sync_online (camel-nntp-folder.c:108)
==5308==    by 0x42B3826: disco_sync (camel-disco-folder.c:300)
==5308==    by 0x42C9FF5: camel_folder_sync (camel-folder.c:324)
==5308==    by 0x42C3320: remove_cache (camel-folder-summary.c:835)
==5308==    by 0x42DE981: session_thread_proxy (camel-session.c:597)
==5308==    by 0x57CFDC5: g_thread_pool_thread_proxy (gthreadpool.c:265)
==5308==    by 0x57CE75E: g_thread_create_proxy (gthread.c:635)
==5308==    by 0x499B1B4: start_thread (in /lib/libpthread-2.9.so)
==5308==    by 0x59013BD: clone (in /lib/libc-2.9.so)
==5308==  Address 0x28 is not stack'd, malloc'd or (recently) free'd
Comment 22 Srinivasa Ragavan 2009-06-29 05:55:48 UTC
Possible. Can you pull me when you get a trace? I think its a left-out folder or a closed folder, still trying to sync.
Comment 23 Srinivasa Ragavan 2009-07-13 05:21:15 UTC
Patch committed to trunk
Comment 24 Srinivasa Ragavan 2009-08-19 05:25:55 UTC
*** Bug 562979 has been marked as a duplicate of this bug. ***
Comment 25 Srinivasa Ragavan 2009-08-19 05:38:25 UTC
(In reply to comment #14)
> OK.  After much mucking about with git and make distdir and whatnot, a simple
> grep of the source reveals that camel-nntp-utils.c is not even used to build
> e-d-s anymore.  I think.
> 
> So that makes the camel-nntp-utils.c portion of your patch moot/invalid.
> 
> Rebuilding e-d-s with your patch minus the camel-nntp-utils.c hunk.

Did my patch improve the situation? In our local test, this was a lot better.
Comment 26 Milan Crha 2011-08-23 12:59:15 UTC
I'm closing this supposing it's similar on your end as described in the previous comment, but feel free to reopen if you find any issue with 3.0.2 or any later version. Thanks in advance.