Bug 85811

Summary: fast/events/message-port-clone.html hits ASSERT in Debug (usually in later tests)
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: HTML DOMAssignee: Li Yin <li.yin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, atwilson, jberlin, li.yin, mhahnenberg, ossy, slewis, tmpsantos, webkit.review.bot
Priority: P1 Keywords: InRadar, LayoutTestFailure, MakingBotsRed, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://build.webkit.org/results/GTK%20Linux%2064-bit%20Debug/r116315%20(33088)/results.html
Attachments:
Description Flags
Patch none

Description Philippe Normand 2012-05-07 11:21:12 PDT
#0  0x00007f856a636223 in WebCore::MessagePort::contextDestroyed (this=0x77f0d60) at ../../Source/WebCore/dom/MessagePort.cpp:158
158	    ASSERT(m_closed);


Thread 1 (Thread 0x7f856ed9d900 (LWP 20470)):
#0  0x00007f856a636223 in WebCore::MessagePort::contextDestroyed (this=0x77f0d60) at ../../Source/WebCore/dom/MessagePort.cpp:158
#1  0x00007f856a67f81a in WebCore::ScriptExecutionContext::~ScriptExecutionContext (this=0x77027e8, __in_chrg=<optimized out>) at ../../Source/WebCore/dom/ScriptExecutionContext.cpp:113
#2  0x00007f856a5b6778 in WebCore::Document::~Document (this=0x77026c0, __in_chrg=<optimized out>) at ../../Source/WebCore/dom/Document.cpp:631
#3  0x00007f856a7b3626 in WebCore::HTMLDocument::~HTMLDocument (this=0x77026c0, __in_chrg=<optimized out>) at ../../Source/WebCore/html/HTMLDocument.cpp:91
#4  0x00007f856a5cceac in WebCore::Document::guardDeref (this=0x77026c0) at ../../Source/WebCore/dom/Document.h:255
#5  0x00007f856a5b80fb in WebCore::Document::removedLastRef (this=0x77026c0) at ../../Source/WebCore/dom/Document.cpp:678
#6  0x00007f856a1c842a in WebCore::TreeShared<WebCore::ContainerNode>::deref (this=0x77026d0) at ../../Source/WebCore/platform/TreeShared.h:79
#7  0x00007f856a380854 in WebCore::JSNode::releaseImpl (this=0x7f851d58c660) at ./DerivedSources/WebCore/JSNode.h:69
#8  0x00007f856a37fd96 in WebCore::JSNodeOwner::finalize (this=0x164da10, handle=..., context=0x164d760) at ../../Source/WebCore/bindings/js/JSNodeCustom.cpp:144
#9  0x00007f856e87ddac in JSC::WeakBlock::finalize (this=0x7f851f01a000, weakImpl=0x7f851f01a318) at ../../Source/JavaScriptCore/heap/WeakBlock.h:131
#10 0x00007f856e87d5d3 in JSC::WeakBlock::sweep (this=0x7f851f01a000) at ../../Source/JavaScriptCore/heap/WeakBlock.cpp:82
#11 0x00007f856e87e3b7 in JSC::WeakSet::sweep (this=0x1c464c8) at ../../Source/JavaScriptCore/heap/WeakSet.cpp:72
#12 0x00007f856e869a85 in JSC::Heap::collect (this=0x1c45720, sweepToggle=JSC::Heap::DoSweep) at ../../Source/JavaScriptCore/heap/Heap.cpp:773
#13 0x00007f856e8698fb in JSC::Heap::collectAllGarbage (this=0x1c45720) at ../../Source/JavaScriptCore/heap/Heap.cpp:730
#14 0x00007f856a316e92 in WebCore::collect () at ../../Source/WebCore/bindings/js/GCController.cpp:42
#15 0x00007f856a316fd8 in WebCore::GCController::gcTimerFired (this=0x1d0d290) at ../../Source/WebCore/bindings/js/GCController.cpp:77
#16 0x00007f856a31724c in WebCore::Timer<WebCore::GCController>::fired (this=0x1d0d290) at ../../Source/WebCore/platform/Timer.h:100
#17 0x00007f856ac17c40 in WebCore::ThreadTimers::sharedTimerFiredInternal (this=0x163c270) at ../../Source/WebCore/platform/ThreadTimers.cpp:115
#18 0x00007f856ac17b77 in WebCore::ThreadTimers::sharedTimerFired () at ../../Source/WebCore/platform/ThreadTimers.cpp:93
#19 0x00007f856b6494e2 in WebCore::timeout_cb () at ../../Source/WebCore/platform/gtk/SharedTimerGtk.cpp:49
#20 0x00007f856823a058 in g_timeout_dispatch () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0
#21 0x00007f8568238290 in g_main_dispatch () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0
#22 0x00007f8568238f56 in g_main_context_dispatch () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0
#23 0x00007f8568239140 in g_main_context_iterate () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0
#24 0x00007f8568239576 in g_main_loop_run () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0
#25 0x00007f8568b1d62b in gtk_main () from /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Dependencies/Root/lib64/libgtk-3.so.0
#26 0x000000000045dcfb in runTest (testPathOrURL=...) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:696
#27 0x000000000045d373 in runTestingServerLoop () at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:483
#28 0x000000000046038f in main (argc=2, argv=0x7fff1af4caa8) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:1378

I'll flag it in GTK test_expectations. Please unflag when a fix is provided!
Comment 1 Li Yin 2012-05-07 18:11:20 PDT
(In reply to comment #0)
> I'll flag it in GTK test_expectations. Please unflag when a fix is provided!

Thanks for your report, I will follow this issue.
Comment 2 Jessie Berlin 2012-05-24 16:39:58 PDT
This is happening on Mac as well:

http://build.webkit.org/results/Lion%20Debug%20(Tests)/r118421%20(6997)/fast/events/message-port-constructor-for-deleted-document-crash-log.txt

Process:         DumpRenderTree [93186]
Path:            /Volumes/VOLUME/*/DumpRenderTree
Identifier:      DumpRenderTree
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  Python [93185]

Date/Time:       2012-05-24 15:57:15.534 -0700
OS Version:      Mac OS X 10.7.3 (11D50)
Report Version:  9

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000bbadbeef

VM Regions Near 0xbbadbeef:
--> 
    __TEXT                 000000010c357000-000000010c3ed000 [  600K] r-x/rwx SM=COW  /Volumes/VOLUME/*

Application Specific Information:
objc[93186]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010e9e9a82 WebCore::MessagePort::contextDestroyed() + 178 (MessagePort.cpp:158)
1   com.apple.WebCore             	0x000000010ee41b64 WebCore::ScriptExecutionContext::~ScriptExecutionContext() + 724 (ScriptExecutionContext.cpp:113)
2   com.apple.WebCore             	0x000000010dc94040 WebCore::Document::~Document() + 3120 (Document.cpp:639)
3   com.apple.WebCore             	0x000000010e0a7ba3 WebCore::HTMLDocument::~HTMLDocument() + 163 (HTMLDocument.cpp:91)
4   com.apple.WebCore             	0x000000010e0a7a35 WebCore::HTMLDocument::~HTMLDocument() + 21 (HTMLDocument.cpp:91)
5   com.apple.WebCore             	0x000000010e0a7a09 WebCore::HTMLDocument::~HTMLDocument() + 25 (HTMLDocument.cpp:90)
6   com.apple.WebCore             	0x000000010dcad3c9 WebCore::Document::guardDeref() + 201 (Document.h:261)
7   com.apple.WebCore             	0x000000010ea13d4b WebCore::Node::~Node() + 763 (Node.cpp:419)
8   com.apple.WebCore             	0x000000010dad0a63 WebCore::ContainerNode::~ContainerNode() + 67 (ContainerNode.cpp:115)
9   com.apple.WebCore             	0x000000010de9d01a WebCore::Element::~Element() + 442 (Element.cpp:142)
10  com.apple.WebCore             	0x000000010ef74133 WebCore::StyledElement::~StyledElement() + 67 (StyledElement.cpp:132)
11  com.apple.WebCore             	0x000000010dc75a05 WebCore::HTMLElement::~HTMLElement() + 21 (HTMLElement.h:44)
12  com.apple.WebCore             	0x000000010e13e785 WebCore::HTMLPreElement::~HTMLPreElement() + 21 (HTMLPreElement.h:30)
13  com.apple.WebCore             	0x000000010e13e675 WebCore::HTMLPreElement::~HTMLPreElement() + 21 (HTMLPreElement.h:30)
14  com.apple.WebCore             	0x000000010e13e699 WebCore::HTMLPreElement::~HTMLPreElement() + 25 (HTMLPreElement.h:30)
15  com.apple.WebCore             	0x000000010e13e6fc non-virtual thunk to WebCore::HTMLPreElement::~HTMLPreElement() + 28
16  com.apple.WebCore             	0x000000010d99f732 WebCore::TreeShared<WebCore::ContainerNode>::removedLastRef() + 50 (TreeShared.h:119)
17  com.apple.WebCore             	0x000000010d8fd25a WebCore::TreeShared<WebCore::ContainerNode>::deref() + 490 (TreeShared.h:81)
18  com.apple.WebCore             	0x000000010e52ae66 WebCore::JSNode::releaseImpl() + 38 (JSNode.h:69)
19  com.apple.WebCore             	0x000000010e656069 WebCore::JSNodeOwner::finalize(JSC::Handle<JSC::Unknown>, void*) + 121 (JSNodeCustom.cpp:145)
20  com.apple.JavaScriptCore      	0x000000010c957967 JSC::WeakBlock::finalize(JSC::WeakImpl*) + 215 (WeakBlock.h:126)
21  com.apple.JavaScriptCore      	0x000000010c957325 JSC::WeakBlock::sweep() + 165 (WeakBlock.cpp:80)
22  com.apple.JavaScriptCore      	0x000000010c957c72 JSC::WeakSet::sweep() + 114 (WeakSet.cpp:46)
23  com.apple.JavaScriptCore      	0x000000010c826ebc JSC::MarkedBlock::sweepWeakSet() + 28 (MarkedBlock.h:293)
24  com.apple.JavaScriptCore      	0x000000010c826e99 JSC::SweepWeakSet::operator()(JSC::MarkedBlock*) + 25 (MarkedSpace.cpp:81)
25  com.apple.JavaScriptCore      	0x000000010c826e65 void JSC::MarkedAllocator::forEachBlock<JSC::SweepWeakSet>(JSC::SweepWeakSet&) + 85 (MarkedAllocator.h:102)
26  com.apple.JavaScriptCore      	0x000000010c826d79 JSC::SweepWeakSet::ReturnType JSC::MarkedSpace::forEachBlock<JSC::SweepWeakSet>(JSC::SweepWeakSet&) + 105 (MarkedSpace.h:196)
27  com.apple.JavaScriptCore      	0x000000010c826889 JSC::SweepWeakSet::ReturnType JSC::MarkedSpace::forEachBlock<JSC::SweepWeakSet>() + 25 (MarkedSpace.h:213)
28  com.apple.JavaScriptCore      	0x000000010c826315 JSC::MarkedSpace::sweepWeakSets() + 21 (MarkedSpace.cpp:148)
29  com.apple.JavaScriptCore      	0x000000010c7200d1 JSC::Heap::collect(JSC::Heap::SweepToggle) + 497 (Heap.cpp:691)
30  com.apple.JavaScriptCore      	0x000000010c721714 JSC::Heap::collectAllGarbage() + 52 (Heap.cpp:643)
31  com.apple.WebCore             	0x000000010dfd8dcb WebCore::GCController::garbageCollectNow() + 75 (GCController.cpp:85)
32  com.apple.WebKit              	0x000000010d2bde9d +[WebCoreStatistics garbageCollectJavaScriptObjects] + 29 (WebCoreStatistics.mm:116)
33  DumpRenderTree                	0x000000010c37f27f GCController::collect() const + 31 (GCControllerMac.mm:39)
34  DumpRenderTree                	0x000000010c37f136 _ZL15collectCallbackPK15OpaqueJSContextP13OpaqueJSValueS3_mPKPKS2_PS5_ + 54 (GCController.cpp:49)
35  com.apple.JavaScriptCore      	0x000000010c79a5d1 JSC::JSCallbackFunction::call(JSC::ExecState*) + 497 (JSCallbackFunction.cpp:73)
36  com.apple.JavaScriptCore      	0x000000010c944700 _ZN3JSC5LLIntL14handleHostCallEPNS_9ExecStateEPNS_11InstructionENS_7JSValueENS_22CodeSpecializationKindE + 352 (LLIntSlowPaths.cpp:1249)
37  com.apple.JavaScriptCore      	0x000000010c9455dd JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 93 (LLIntSlowPaths.cpp:1293)
38  com.apple.JavaScriptCore      	0x000000010c945567 JSC::LLInt::genericCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind) + 263 (LLIntSlowPaths.cpp:1349)
39  com.apple.JavaScriptCore      	0x000000010c942a1c llint_slow_path_call + 60 (LLIntSlowPaths.cpp:1355)
40  com.apple.JavaScriptCore      	0x000000010c949b4b llint_op_call + 153
41  com.apple.JavaScriptCore      	0x000000010c73c009 JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*) + 121 (JITCode.h:127)
42  com.apple.JavaScriptCore      	0x000000010c7380de JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 1902 (Interpreter.cpp:1305)
43  com.apple.JavaScriptCore      	0x000000010c5e173b JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 315 (CallData.cpp:39)
44  com.apple.WebCore             	0x000000010e39db13 WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 179 (JSMainThreadExecState.h:56)
45  com.apple.WebCore             	0x000000010e4ea565 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 1445 (JSEventListener.cpp:132)
46  com.apple.WebCore             	0x000000010deed2e9 WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul>&) + 393 (EventTarget.cpp:232)
47  com.apple.WebCore             	0x000000010deed12b WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 331 (EventTarget.cpp:200)
48  com.apple.WebCore             	0x000000010ea1ec6b WebCore::Node::handleLocalEvents(WebCore::Event*) + 155 (Node.cpp:2697)
49  com.apple.WebCore             	0x000000010debb045 WebCore::EventContext::handleLocalEvents(WebCore::Event*) const + 293 (EventContext.cpp:53)
50  com.apple.WebCore             	0x000000010debc5a4 WebCore::EventDispatcher::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 1652 (EventDispatcher.cpp:279)
51  com.apple.WebCore             	0x000000010dec2cbc WebCore::EventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const + 76 (EventDispatchMediator.cpp:51)
52  com.apple.WebCore             	0x000000010debb82a WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) + 154 (EventDispatcher.cpp:116)
53  com.apple.WebCore             	0x000000010ea1ed66 WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 70 (Node.cpp:2712)
54  com.apple.WebCore             	0x000000010de3e8c6 WebCore::DOMWindow::dispatchLoadEvent() + 758 (DOMWindow.cpp:1640)
55  com.apple.WebCore             	0x000000010dc9dc12 WebCore::Document::dispatchWindowLoadEvent() + 146 (Document.cpp:3979)
56  com.apple.WebCore             	0x000000010dc9b031 WebCore::Document::implicitClose() + 513 (Document.cpp:2442)
57  com.apple.WebCore             	0x000000010df8a5eb WebCore::FrameLoader::checkCallImplicitClose() + 155 (FrameLoader.cpp:762)
58  com.apple.WebCore             	0x000000010df8a2a5 WebCore::FrameLoader::checkCompleted() + 341 (FrameLoader.cpp:709)
59  com.apple.WebCore             	0x000000010df890a3 WebCore::FrameLoader::finishedParsing() + 179 (FrameLoader.cpp:642)
60  com.apple.WebCore             	0x000000010dca745f WebCore::Document::finishedParsing() + 591 (Document.cpp:4729)
61  com.apple.WebCore             	0x000000010e185044 WebCore::HTMLTreeBuilder::finished() + 148 (HTMLTreeBuilder.cpp:2808)
62  com.apple.WebCore             	0x000000010e0acdf3 WebCore::HTMLDocumentParser::end() + 227 (HTMLDocumentParser.cpp:382)
63  com.apple.WebCore             	0x000000010e0abd16 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() + 278 (HTMLDocumentParser.cpp:391)
64  com.apple.WebCore             	0x000000010e0abaec WebCore::HTMLDocumentParser::prepareToStopParsing() + 268 (HTMLDocumentParser.cpp:154)
65  com.apple.WebCore             	0x000000010e0ace43 WebCore::HTMLDocumentParser::attemptToEnd() + 67 (HTMLDocumentParser.cpp:403)
66  com.apple.WebCore             	0x000000010e0ace98 WebCore::HTMLDocumentParser::finish() + 72 (HTMLDocumentParser.cpp:430)
67  com.apple.WebCore             	0x000000010dd09eb7 WebCore::DocumentWriter::end() + 391 (DocumentWriter.cpp:242)
68  com.apple.WebCore             	0x000000010dce83bf WebCore::DocumentLoader::finishedLoading() + 207 (DocumentLoader.cpp:300)
69  com.apple.WebCore             	0x000000010e98466e WebCore::MainResourceLoader::didFinishLoading(double) + 318 (MainResourceLoader.cpp:545)
70  com.apple.WebCore             	0x000000010ede34b5 WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*, double) + 53 (ResourceLoader.cpp:436)
71  com.apple.WebCore             	0x000000010ede0035 -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] + 197 (ResourceHandleMac.mm:861)
72  com.apple.Foundation          	0x00007fff8acf5662 ___NSURLConnectionDidFinishLoading_block_invoke_1 + 122
73  com.apple.Foundation          	0x00007fff8acf55e2 _NSURLConnectionDidFinishLoading + 81
74  com.apple.CFNetwork           	0x00007fff8859b4fe URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 296
75  com.apple.CFNetwork           	0x00007fff8864b91e URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 862
76  com.apple.CFNetwork           	0x00007fff88576389 URLConnectionClient::processEvents() + 185
77  com.apple.CFNetwork           	0x00007fff8857622e MultiplexerSource::perform() + 212
78  com.apple.CoreFoundation      	0x00007fff892a66e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
79  com.apple.CoreFoundation      	0x00007fff892a5f4d __CFRunLoopDoSources0 + 253
80  com.apple.CoreFoundation      	0x00007fff892ccd39 __CFRunLoopRun + 905
81  com.apple.CoreFoundation      	0x00007fff892cc676 CFRunLoopRunSpecific + 230
82  com.apple.Foundation          	0x00007fff8ac98f9f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
83  DumpRenderTree                	0x000000010c36f349 _ZL7runTestRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE + 5769 (DumpRenderTree.mm:1365)
84  DumpRenderTree                	0x000000010c36dc3a _ZL20runTestingServerLoopv + 282 (DumpRenderTree.mm:828)
85  DumpRenderTree                	0x000000010c36d4a9 dumpRenderTree(int, char const**) + 377 (DumpRenderTree.mm:877)
86  DumpRenderTree                	0x000000010c36fbac main + 124 (DumpRenderTree.mm:915)
87  DumpRenderTree                	0x000000010c358af4 start + 52
Comment 3 Jessie Berlin 2012-05-25 09:24:35 PDT
<rdar://problem/11533338>
Comment 4 Alexey Proskuryakov 2012-05-25 09:50:17 PDT
Do we know when this started?
Comment 5 Li Yin 2012-05-26 01:41:11 PDT
(In reply to comment #4)
> Do we know when this started?

The earliest crash report came from Gtk Debug version on 2012-05-07.
It seems that function ScriptExecutionContext::stopActiveDOMObjects is not called before deleting document.
Comment 6 Jessie Berlin 2012-05-29 08:57:38 PDT
This is happening often enough that I am going to add fast/events/message-port-constructor-for-deleted-document.html to the mac Skipped list.
Comment 7 Jessie Berlin 2012-05-29 09:03:07 PDT
Updated the Mac Skipped list in http://trac.webkit.org/changeset/118784
Comment 8 Alexey Proskuryakov 2012-05-29 10:33:45 PDT
Which test actually causes the badness? I've added the one Jessie skipped to the title for now, but perhaps it's scripts blaming the wrong test?
Comment 10 Alexey Proskuryakov 2012-05-29 14:00:14 PDT
From local testing, I think that it's message-port-clone.html causing a crash when its document is finally collected during other tests. Skipped it in <http://trac.webkit.org/changeset/118830>, and unskipped message-port-constructor-for-deleted-document.html.

Li, it makes some sense that cloned ports are not cleaned up correctly - it's easy to not count them right.
Comment 11 Chris Dumez 2012-06-18 23:41:45 PDT
*** Bug 86075 has been marked as a duplicate of this bug. ***
Comment 12 Csaba Osztrogonác 2012-07-31 08:32:53 PDT
It asserts on Qt too. First assert was r123684, last success run was r123670.

crash log for DumpRenderTree (pid 17724):
STDOUT: <empty>
STDERR: ASSERTION FAILED: m_closed
STDERR: /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/Source/WebCore/dom/MessagePort.cpp(158) : void WebCore::MessagePort::contextDestroyed()
STDERR: 1   0x7f30795b81e9 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x92d1e9) [0x7f30795b81e9]
STDERR: 2   0x7f30795f57ad /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x96a7ad) [0x7f30795f57ad]
STDERR: 3   0x7f307952ab61 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x89fb61) [0x7f307952ab61]
STDERR: 4   0x7f307974df57 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0xac2f57) [0x7f307974df57]
STDERR: 5   0x7f3079522aea /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x897aea) [0x7f3079522aea]
STDERR: 6   0x7f307952d88f /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x8a288f) [0x7f307952d88f]
STDERR: 7   0x7f30795cbe7c /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x940e7c) [0x7f30795cbe7c]
STDERR: 8   0x7f30790fb908 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x470908) [0x7f30790fb908]
STDERR: 9   0x7f30792a9c8e /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x61ec8e) [0x7f30792a9c8e]
STDERR: 10  0x7f30792aa982 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x61f982) [0x7f30792aa982]
STDERR: 11  0x7f307a73897a /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1aad97a) [0x7f307a73897a]
STDERR: 12  0x7f307a738278 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1aad278) [0x7f307a738278]
STDERR: 13  0x7f307a7376aa /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1aac6aa) [0x7f307a7376aa]
STDERR: 14  0x7f307a751ed1 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ac6ed1) [0x7f307a751ed1]
STDERR: 15  0x7f307a73e531 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab3531) [0x7f307a73e531]
STDERR: 16  0x7f307a742cb3 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab7cb3) [0x7f307a742cb3]
STDERR: 17  0x7f307a740f71 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab5f71) [0x7f307a740f71]
STDERR: 18  0x7f307a73f3d7 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab43d7) [0x7f307a73f3d7]
STDERR: 19  0x7f307a73e642 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab3642) [0x7f307a73e642]
STDERR: 20  0x7f307a73d451 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x1ab2451) [0x7f307a73d451]
STDERR: 21  0x7f307a73d1dd /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(JSC::Heap::collectAllGarbage()+0x2f) [0x7f307a73d1dd]
STDERR: 22  0x7f3079238639 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x5ad639) [0x7f3079238639]
STDERR: 23  0x7f307923882e /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x5ad82e) [0x7f307923882e]
STDERR: 24  0x7f30792389c6 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x5ad9c6) [0x7f30792389c6]
STDERR: 25  0x7f3079b8ffc0 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0xf04fc0) [0x7f3079b8ffc0]
STDERR: 26  0x7f3079b8fef7 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0xf04ef7) [0x7f3079b8fef7]
STDERR: 27  0x7f3079e78c94 /home/webkitbuildbot/slaves/debug64bit/buildslave/qt-linux-64-debug/build/WebKitBuild/Debug/lib/libQtWebKit.so.4(+0x11edc94) [0x7f3079e78c94]
STDERR: 28  0x7f3074409519 /usr/local/Trolltech/Qt-4.8.0/lib/libQtCore.so.4(QObject::event(QEvent*)+0xa9) [0x7f3074409519]
STDERR: 29  0x7f3074cc519c /usr/local/Trolltech/Qt-4.8.0/lib/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xac) [0x7f3074cc519c]
STDERR: 30  0x7f3074ccc06d /usr/local/Trolltech/Qt-4.8.0/lib/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0x13d) [0x7f3074ccc06d]
STDERR: 31  0x7f30743f70ec /usr/local/Trolltech/Qt-4.8.0/lib/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c) [0x7f30743f70ec]
Comment 13 Csaba Osztrogonác 2012-07-31 08:37:58 PDT
I added it to the Qt's TestExpectations file by r124204.
Comment 14 Alexey Proskuryakov 2012-08-20 10:25:00 PDT
> > I'll flag it in GTK test_expectations. Please unflag when a fix is provided!
> 
> Thanks for your report, I will follow this issue.

Li, please do take a look.

See also: bug 94458.
Comment 15 Li Yin 2012-08-23 18:05:15 PDT
(In reply to comment #14)
> > > I'll flag it in GTK test_expectations. Please unflag when a fix is provided!
> > 
> > Thanks for your report, I will follow this issue.
> 
> Li, please do take a look.
> 
> See also: bug 94458.

Sorry for delay, assign the bug to me, I will investigate it ASAP.
Comment 16 Li Yin 2012-08-24 21:15:02 PDT
Add Andrew Wilson, because he designed the test.
Comment 17 Li Yin 2012-08-31 19:38:37 PDT
Created attachment 161810 [details]
Patch
Comment 18 Li Yin 2012-08-31 19:45:34 PDT
I think the root cause is that we must set m_closed status to be true when the close function is invoked, especially, the port is cloned.
Comment 19 WebKit Review Bot 2012-09-01 12:42:24 PDT
Comment on attachment 161810 [details]
Patch

Clearing flags on attachment: 161810

Committed r127380: <http://trac.webkit.org/changeset/127380>
Comment 20 WebKit Review Bot 2012-09-01 12:42:28 PDT
All reviewed patches have been landed.  Closing bug.