Bug 1277449 - evolution hangs loading large txt attachment
Summary: evolution hangs loading large txt attachment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-03 10:58 UTC by Martin Wilck
Modified: 2015-11-03 13:16 UTC (History)
4 users (show)

Fixed In Version: evolution-3.18.1-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-03 13:16:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 733877 0 None None None Never

Description Martin Wilck 2015-11-03 10:58:33 UTC
Description of problem:
evolution seems to hang forever with 100% CPU opening an email with a 20 MB TXT attachment. 

Version-Release number of selected component (if applicable):
evolution-3.12.11-1.fc21.x86_64

How reproducible:
always with this specific email + attachment. Havent't seen it before.

Steps to Reproduce:
1. click on message in message list window. The message lies on a MAPI account (Exchange server)
The message in question is a relatively short email in HTML format with a large TXT attachment (20MB) including CRs and a few escape sequences (actually a Linux kernel serial console boot log).

Actual results:
Evolution becomes unresponsive and hangs (waited several minutes).
The same message loads in MS Outlook in a matter of a few seconds.

Expected results:
Message is loaded, attachment is offered for download.

Additional info:
Opened the evolution process in gdb. gdb works stunningly slow on this otherwise quite powerful system 


(gdb) bt
#0  0x0000003510538730 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (this=0xd26a1d0)
    at Source/WebCore/dom/Node.h:437
#1  0x0000003510538730 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (renderingParentNode=<optimized out>, element=...) at Source/WebCore/style/StyleResolveTree.cpp:137
#2  0x0000003510538730 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (resolvedStyle=..., element=...)
    at Source/WebCore/style/StyleResolveTree.cpp:233
#3  0x0000003510538730 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (current=..., resolvedStyle=...)
    at Source/WebCore/style/StyleResolveTree.cpp:538
#4  0x00000035105399d0 in WebCore::Style::attachChildren(WebCore::ContainerNode&) (current=...) at Source/WebCore/style/StyleResolveTree.cpp:463
#5  0x0000003510538008 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (current=..., resolvedStyle=...)
    at Source/WebCore/style/StyleResolveTree.cpp:554
#6  0x00000035105399d0 in WebCore::Style::attachChildren(WebCore::ContainerNode&) (current=...) at Source/WebCore/style/StyleResolveTree.cpp:463
#7  0x0000003510538008 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (current=..., resolvedStyle=...)
    at Source/WebCore/style/StyleResolveTree.cpp:554
#8  0x00000035105399d0 in WebCore::Style::attachChildren(WebCore::ContainerNode&) (current=...) at Source/WebCore/style/StyleResolveTree.cpp:463
#9  0x0000003510538008 in WebCore::Style::attachRenderTree(WebCore::Element&, WTF::PassRefPtr<WebCore::RenderStyle>) (current=..., resolvedStyle=...)
    at Source/WebCore/style/StyleResolveTree.cpp:554
#10 0x000000351053ba87 in WebCore::Style::resolveTree(WebCore::Element &, enum WebCore::Style::Change) (inheritedChange=WebCore::Style::Force, current=...)
    at Source/WebCore/style/StyleResolveTree.cpp:678
#11 0x000000351053ba87 in WebCore::Style::resolveTree(WebCore::Element &, enum WebCore::Style::Change) (current=..., change=change@entry=WebCore::Style::Force) at Source/WebCore/style/StyleResolveTree.cpp:832
#12 0x000000351053d502 in WebCore::Style::resolveTree(WebCore::Document&, WebCore::Style::Change) (document=..., change=WebCore::Style::Force)
    at Source/WebCore/style/StyleResolveTree.cpp:906
#13 0x000000350fdc6b44 in WebCore::Document::recalcStyle(WebCore::Style::Change) (this=0x7f660d106700, change=<optimized out>)
    at Source/WebCore/dom/Document.cpp:1752
#14 0x000000350fdc7aaa in WebCore::Document::updateStyleIfNeeded() (this=0x7f660d106700) at Source/WebCore/dom/Document.cpp:1802
#15 0x000000350fdca389 in WebCore::Document::finishedParsing() (this=0x7f660d106700) at Source/WebCore/dom/Document.cpp:4457
#16 0x000000351001f3cd in WebCore::HTMLConstructionSite::finishedParsing() (this=<optimized out>) at Source/WebCore/html/parser/HTMLConstructionSite.cpp:392
#17 0x000000351004ec1a in WebCore::HTMLTreeBuilder::finished() (this=<optimized out>) at Source/WebCore/html/parser/HTMLTreeBuilder.cpp:3025
#18 0x0000003510025f51 in WebCore::HTMLDocumentParser::end() (this=this@entry=0x7f660d0e7c00) at Source/WebCore/html/parser/HTMLDocumentParser.cpp:439
#19 0x0000003510025f9e in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() (this=this@entry=0x7f660d0e7c00)
    at Source/WebCore/html/parser/HTMLDocumentParser.cpp:450
#20 0x0000003510029a4e in WebCore::HTMLDocumentParser::prepareToStopParsing() (this=0x7f660d0e7c00) at Source/WebCore/html/parser/HTMLDocumentParser.cpp:165
#21 0x0000003510026109 in WebCore::HTMLDocumentParser::finish() (this=0x7f660d0e7c00) at Source/WebCore/html/parser/HTMLDocumentParser.cpp:490
#22 0x00000035101af342 in WebCore::DocumentWriter::end() (this=this@entry=0x7f6670127b70) at Source/WebCore/loader/DocumentWriter.cpp:248
#23 0x00000035101a4280 in WebCore::DocumentLoader::finishedLoading(double) (this=0x7f6670127b00, finishTime=<optimized out>)
    at Source/WebCore/loader/DocumentLoader.cpp:440
#24 0x000000351018ceb9 in WebCore::CachedResource::checkNotify() (this=0x7f660d170680) at Source/WebCore/loader/cache/CachedResource.cpp:332
#25 0x0000003510188128 in WebCore::CachedRawResource::finishLoading(WebCore::ResourceBuffer*) (this=0x7f660d170680, data=0x7f660d1a2288)
    at Source/WebCore/loader/cache/CachedRawResource.cpp:94
#26 0x00000035101fba29 in WebCore::SubresourceLoader::didFinishLoading(double) (this=0x7f660d172000, finishTime=0)
    at Source/WebCore/loader/SubresourceLoader.cpp:309
---Type <return> to continue, or q <return> to quit---
#27 0x0000003510a5afe9 in WebCore::readCallback(GObject*, GAsyncResult*, gpointer) (asyncResult=<optimized out>, data=0x7f660d175a98)
    at Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:1352


#28 0x000000350665ddaa in async_ready_callback_wrapper (source_object=0xca92430 [GMemoryInputStream], res=0xc9545b0, user_data=0x7f660d175a98)
    at ginputstream.c:523
#29 0x00000035066824cb in g_task_return_now (task=0xc9545b0 [GTask]) at gtask.c:1077
#30 0x00000035066824e9 in complete_in_idle_cb (task=0xc9545b0) at gtask.c:1086
#31 0x00000039fe4497fb in g_main_context_dispatch (context=0xd85580) at gmain.c:3111
#32 0x00000039fe4497fb in g_main_context_dispatch (context=context@entry=0xd85580) at gmain.c:3710
#33 0x00000039fe449b98 in g_main_context_iterate (context=0xd85580, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#34 0x00000039fe449ec2 in g_main_loop_run (loop=0xb9257e0) at gmain.c:3975
#35 0x00000035097ec915 in gtk_main () at gtkmain.c:1207
#36 0x000000000040389d in main (argc=1, argv=0x7ffffea3f7a8) at main.c:685

(gdb) info threads
  Id   Target Id         Frame 
  16   Thread 0x7f6671cf2700 (LWP 12786) "gdbus" 0x00000039fbcf4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
  15   Thread 0x7f66710c5700 (LWP 12787) "gmain" 0x00000039fbcf4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
  14   Thread 0x7f666bfff700 (LWP 12788) "dconf worker" 0x00000039fbcf4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
  13   Thread 0x7f666b7fe700 (LWP 12789) "evolution" 0x00000039fbcf4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
  12   Thread 0x7f665e878700 (LWP 12790) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  11   Thread 0x7f665e077700 (LWP 12791) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  10   Thread 0x7f65d9895700 (LWP 12836) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  9    Thread 0x7f65d9094700 (LWP 12837) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  8    Thread 0x7f65d8893700 (LWP 12838) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  7    Thread 0x7f65d131d700 (LWP 12881) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  6    Thread 0x7f65d0b1c700 (LWP 12882) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  5    Thread 0x7f65cbfff700 (LWP 12883) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  4    Thread 0x7f65cb7fe700 (LWP 12884) "evolution" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f65feffd700 (LWP 12900) "pool" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  2    Thread 0x7f65c9986700 (LWP 13076) "book-client-dbu" 0x00000039fbcf4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
* 1    Thread 0x7f66786d6a40 (LWP 12783) "evolution" renderer (this=0xd26a1d0) at Source/WebCore/dom/Node.h:437

Comment 1 Martin Wilck 2015-11-03 11:08:09 UTC
I've got a 38MB core dump file created using "gcore"; I could upload it somewhere but I don't know where to do this for Fedora (non Red Hat) bugs, hints appreciated.

Comment 2 Martin Wilck 2015-11-03 11:27:39 UTC
Update: it appears that evolution eventually finished loading the message . I worked on other things for a while and after perhaps 20 minutes the evolution UI became responsive again. Given that this is a 2-core Intel(R) Core(TM) i5-4310M CPU @ 2.70GHz system with 16G RAM, that is still pretty much time for dealing with a 20MB file.

Perhaps this was caused by slowness of the MAPI connection (but I doubt it because evolution hung with 100% CPU).

I am now trying the message from the MAPI store to a local folder, and evolution appears stuck again, this time it actually seems that the MAPI connection is slow.

Comment 3 Milan Crha 2015-11-03 13:16:11 UTC
Thanks for a bug report. No need to retest with local store, this is a known issue, discussed upstream at [1]. I'm closing this in favour if it and some other follow-up changes in this area. The 3.18.x will work better for sure. It's part of Fedora 23. Please note that the hang can be seen even there, but only if the attachment is shown in the evolution.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=733877


Note You need to log in before you can comment on or make changes to this bug.