<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>48682</bug_id>
          
          <creation_ts>2010-10-29 14:37:45 -0700</creation_ts>
          <short_desc>Chromium: seg fault when testing fast/frames/iframe-reparenting-new-page.html</short_desc>
          <delta_ts>2012-04-12 21:19:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jenn Braithwaite">jennb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>antonm</cc>
    
    <cc>dimich</cc>
    
    <cc>japhet</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>302068</commentid>
    <comment_count>0</comment_count>
    <who name="Jenn Braithwaite">jennb</who>
    <bug_when>2010-10-29 14:37:45 -0700</bug_when>
    <thetext>I&apos;ve only seen this crash on the chromium platform. Crashes consistently for me on Linux (Lucid) and occasionally for me on Mac (Snow Leopard).  Did not try on Windows. 

The test fast/frames/iframe-reparenting.html runs fine on its own, but seg faults when testing all fast/frames. I&apos;ve narrowed the repro case down to making it fail by only running 2 layout tests:

  new-run-webkit-tests --chromium --use-drt --verbose --no-show-results fast/frames/iframe-reparenting-new-page.html fast/frames/iframe-reparenting.html

2010-10-29 14:31:29,847 dump_render_tree_thread.py:106  DEBUG Stacktrace for /work/WebKit/LayoutTests/fast/frames/iframe-reparenting.html:
[8574:8574:1284969651047:ERROR:WebKit/chromium/base/process_util_posix.cc(105)] Received signal 11
	StackTrace::StackTrace() [0x86e060]
	base::(anonymous namespace)::StackDumpSignalHandler() [0x89f0c1]
	0x7fac40bb3af0
	WebCore::Page::group() [0x468736]
	WebCore::V8Proxy::didLeaveScriptContext() [0xdc8ab4]
	WebCore::V8Proxy::callFunction() [0xdc8629]
	WebCore::ScheduledAction::execute() [0xd994f3]
	WebCore::ScheduledAction::execute() [0xd9933e]
	WebCore::DOMTimer::fired() [0x10cc370]
	WebCore::ThreadTimers::sharedTimerFiredInternal() [0xd0705c]
	WebCore::ThreadTimers::sharedTimerFired() [0xd06f8f]
	webkit_glue::WebKitClientImpl::DoTimeout() [0x17ba32e]
	DispatchToMethod&lt;&gt;() [0x17ba751]
	base::BaseTimer&lt;&gt;::TimerTask::Run() [0x17ba6a6]
	MessageLoop::RunTask() [0x87fb5e]
	MessageLoop::DeferOrRunPendingTask() [0x87fc42]
	MessageLoop::DoDelayedWork() [0x8803c5]
	base::MessagePumpForUI::HandleDispatch() [0x8d065b]
	(anonymous namespace)::WorkSourceDispatch() [0x8cfa53]
	0x7fac438898c2
	0x7fac4388d748
	0x7fac4388d8fc
	base::MessagePumpForUI::RunOnce() [0x8d03d7]
	base::MessagePumpForUI::RunWithDispatcher() [0x8d0270]
	base::MessagePumpForUI::Run() [0x8d0ad2]
	MessageLoop::RunInternal() [0x87f29e]
	MessageLoop::RunHandler() [0x87f13c]
	MessageLoop::Run() [0x87f0cd]
	webkit_support::RunMessageLoop() [0x584c91]
	TestShell::waitTestFinished() [0x454fb9]
	TestShell::runFileTest() [0x44e5b1]
	runTest() [0x429685]
	main [0x429ff2]
	0x7fac40b9ec4d
	0x418c59

breakpoint in V8Proxy::didLeaveScriptContext shows m_frame has a refcount of -1 and its m_page is an invalid pointer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>302979</commentid>
    <comment_count>1</comment_count>
    <who name="Jenn Braithwaite">jennb</who>
    <bug_when>2010-11-01 15:11:10 -0700</bug_when>
    <thetext>Upon further testing, I can get this to crash with just fast/frames/iframe-reparenting-new-page.html if using DumpRenderTree directly (passes with new-run-webkit-tests):


 out/Debug/DumpRenderTree /work/WebKit/LayoutTests/fast/frames/iframe-reparenting-new-page.html

Content-Type: text/plain
The test verifies that the timer in iframe continues firing after iframe is adopted into a new window and the original window was closed.

On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.


PASS successfullyParsed is true

TEST COMPLETE
PASS Loaded iframe in window 1.
PASS iframe.contentWindow.counter is 1
PASS Loaded page 2.
PASS Page 2 adopted the iframe.
PASS Iframe transferred.
PASS iframe.contentWindow.counter is 2
PASS window2.location.href is iframe.contentWindow.parent.location.href
PASS Page 1 is closed.
PASS Received the timer beat from the adopted iframe - exiting.

#EOF
[14304:14304:1546383445592:ERROR:WebKit/chromium/base/process_util_posix.cc(105)] Received signal 11
        StackTrace::StackTrace() [0x86dfec]
        base::(anonymous namespace)::StackDumpSignalHandler() [0x89f04d]
        0x7f1780d51af0
        WebCore::Page::group() [0x4686c6]
        WebCore::V8Proxy::didLeaveScriptContext() [0xdc8a40]
        WebCore::V8Proxy::callFunction() [0xdc85b5]
        WebCore::ScheduledAction::execute() [0xd9947f]
        WebCore::ScheduledAction::execute() [0xd992ca]
        WebCore::DOMTimer::fired() [0x10cc2fc]
        WebCore::ThreadTimers::sharedTimerFiredInternal() [0xd06fe8]
        WebCore::ThreadTimers::sharedTimerFired() [0xd06f1b]
        webkit_glue::WebKitClientImpl::DoTimeout() [0x17ba2ae]
        DispatchToMethod&lt;&gt;() [0x17ba6d1]
        base::BaseTimer&lt;&gt;::TimerTask::Run() [0x17ba626]
        MessageLoop::RunTask() [0x87faea]
        MessageLoop::DeferOrRunPendingTask() [0x87fbce]
        MessageLoop::DoDelayedWork() [0x880351]
        base::MessagePumpForUI::HandleDispatch() [0x8d05e7]
        (anonymous namespace)::WorkSourceDispatch() [0x8cf9df]
        0x7f1783a278c2
        0x7f1783a2b748
        0x7f1783a2b8fc
        base::MessagePumpForUI::RunOnce() [0x8d0363]
        base::MessagePumpForUI::RunWithDispatcher() [0x8d01fc]
        base::MessagePumpForUI::Run() [0x8d0a5e]
        MessageLoop::RunInternal() [0x87f22a]
        MessageLoop::RunHandler() [0x87f0c8]
        MessageLoop::Run() [0x87f059]
        webkit_support::RunMessageLoop() [0x584c1d]
        TestShell::waitTestFinished() [0x454fb9]
        TestShell::runFileTest() [0x44e5b1]
        runTest() [0x429685]
        main [0x42a0d5]
        0x7f1780d3cc4d
        0x418c59</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>303074</commentid>
    <comment_count>2</comment_count>
    <who name="Jenn Braithwaite">jennb</who>
    <bug_when>2010-11-01 16:51:53 -0700</bug_when>
    <thetext>This is caused by javascript in fast/frames/resources/iframe-reparenting-new-page.js closing the window that contains the timer in the middle of processing that timer event.

I can make the crash disappear by delaying the window close until after the timer event has completed.

Should V8 handle this correctly and allow closing a window in the timer callback?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>303082</commentid>
    <comment_count>3</comment_count>
      <attachid>72601</attachid>
    <who name="Jenn Braithwaite">jennb</who>
    <bug_when>2010-11-01 16:57:56 -0700</bug_when>
    <thetext>Created attachment 72601
simple test case

This simple test case opens a window that contains a timer. When the timer fires, close the window that contains the timer. Crashes with similar stack track. Output included in zip file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>303375</commentid>
    <comment_count>4</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-11-02 08:37:49 -0700</bug_when>
    <thetext>Jenn,

thanks a lot for investigation and repro.

I don&apos;t immediately think it&apos;s an issue with v8 itself, rather with the bindings.  Still it might be pretty severe.  I&apos;ll try to investigate it next week, but would appreciate if Adam or Nate would have a look as well, as my experience with frame closing and times is pretty limited.

(In reply to comment #3)
&gt; Created an attachment (id=72601) [details]
&gt; simple test case
&gt; 
&gt; This simple test case opens a window that contains a timer. When the timer fires, close the window that contains the timer. Crashes with similar stack track. Output included in zip file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601807</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2012-04-12 21:19:49 -0700</bug_when>
    <thetext>The magic iframe feature and the test mentioned here have been removed. Closing.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>72601</attachid>
            <date>2010-11-01 16:57:56 -0700</date>
            <delta_ts>2010-11-01 16:57:56 -0700</delta_ts>
            <desc>simple test case</desc>
            <filename>fail-case.zip</filename>
            <type>application/octet-stream</type>
            <size>1856</size>
            <attacher name="Jenn Braithwaite">jennb</attacher>
            
              <data encoding="base64">UEsDBBQAAAAIAP2FYT2hJWQxgwEAAOwCAAARABwAd2luZG93LXRpbWVyLmh0bWxVVAkAA65Rz0yu
Uc9MdXgLAAEEfCsAAASIEwAAfVKxbtwwDN31FYQmH4LogKzxGWiuGTJlcZGli2rRZ6EyZUh0roeg
/17K9gUtkNSLJT6S7/FR9cBjaFSdu+QnbpR6tQnOnlw8390r5Xuo1psJ9hJnbjHzMRKnGAKmHbwp
kO8jzLh5nL7kFn9xtbv/PO1sPX8j9uFrJPxvZkY+WnqekF4WSbniNKNU/Faqn6ljHwlCPFUj5mxP
uFOrOhe7eURic0J+DFiOD5cnV2nJ1TvjiTAVmXBzgK0UbkB/J/1v696Tz0N1bVuYdOtHTIIkdAaO
IWZPp80/o7dhNjtNJ/D7hMXZDy1d0E89oMi+v1yt+lsdS+K7to0SDlctUVyrNBe1t31MtyXblN3r
tU29v76A+kd0F4gUonUHvXbVEp6advB5oYFuwO5nhvOAPMj4nkGQbHsEjrCMCQJs3HK0LKo6mcJ6
ymBh0VHKCQZLLhTTStYG4GvZ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