<?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>164910</bug_id>
          
          <creation_ts>2016-11-18 04:07:21 -0800</creation_ts>
          <short_desc>[GTK] UI process crash in webkitWebViewBaseContainerAdd</short_desc>
          <delta_ts>2016-12-08 00:23:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1395352</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1399921</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=147297</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1401851</see_also>
    
    <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=775632</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>muhammetk</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1252640</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-18 04:07:21 -0800</bug_when>
    <thetext>UI process crash in webkitWebViewBaseContainerAdd:

Truncated backtrace:
Thread no. 1 (10 frames)
 #2 XGetWindowAttributes at GetWAttrs.c:150
 #3 gtk_socket_realize at gtksocket.c:420
 #4 _g_closure_invoke_va at gclosure.c:867
 #7 gtk_widget_realize at gtkwidget.c:5454
 #8 gtk_widget_set_parent at gtkwidget.c:9566
 #9 webkitWebViewBaseContainerAdd(GtkContainer*, GtkWidget*) at /usr/src/debug/webkitgtk-2.14.1/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:421
 #10 g_cclosure_marshal_VOID__OBJECTv at gmarshal.c:2102
 #11 _g_closure_invoke_va at gclosure.c:867
 #14 gtk_container_add at gtkcontainer.c:1875
 #15 WebKit::WebPageProxy::createPluginContainer(unsigned long&amp;) at /usr/src/debug/webkitgtk-2.14.1/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp:107

It looks exactly like bug #147297, but this crash is reported against 2.14.1 whereas that bug was fixed a while back. I&apos;ve asked the reporter to say whether he was running under Wayland or X11. Full backtrace downstream, as usual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252641</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-18 04:09:50 -0800</bug_when>
    <thetext>Note: I have 34 reports of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253074</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-19 06:47:49 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; I&apos;ve asked the reporter to say
&gt; whether he was running under Wayland or X11.

It was Wayland, of course. We should never have gotten here....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254734</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-11-30 03:14:25 -0800</bug_when>
    <thetext>Interesting, this should never happen. It would be interesting to have a bt of the WebProcess too. So, basically the WebProcess is sending the sync message CreatePluginContainer to the UI process. That happens from NetscapePluginX11::create(), but NetscapePluginX11 is only created by NetscapePluginUnix when the display is X11 one:

#if PLATFORM(X11)
    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
        m_impl = NetscapePluginX11::create(*this);
        if (!m_impl)
            return false;
    }
#endif

So, this means that for some reason in Wayland we have an X11 sharedDisplay at this point in the Web process. How is that possible? Could it be the fallback X11 display we create when GTK+ doesn&apos;t have an open display? See bug #164917. If that was the case, it&apos;s impossible that anything could be rendered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254810</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-30 09:44:01 -0800</bug_when>
    <thetext>Oh boy, I should have included the user report as it just makes this more confusing:

&quot;&quot;&quot;
Description of problem:
1. Opened the web application
2. Searched for &quot;Chip donanım test&quot; in google
3. Opened two new tabs from the search results: http://www.chip.com.tr/donanim/ and http://www.chip.com.tr/inceleme/
4. Web crashed.
&quot;&quot;&quot;

By &quot;opened the web application&quot; he means &quot;started Epiphany&quot;, the commandline is just &quot;epiphany&quot;.

So apparently he was able to display google.com successfully in the UI process, somehow with PlatformDisplay::Type::X11, running under Wayland, just not the tab that created a browser plugin. This is quite confusing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254811</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-30 09:45:46 -0800</bug_when>
    <thetext>Oh, I misread your comment. It must have been just the new web process that was somehow -- mysteriously -- started with the wrong PlatformDisplay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254821</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-30 10:01:21 -0800</bug_when>
    <thetext>Looks like I read my bugmail in the wrong order today. I have another Bugzilla report in today: https://bugzilla.redhat.com/show_bug.cgi?id=1399921

Our analysis service thinks this crash is identical to bug #147297, but of course the cause must be different as you&apos;ve since added guards that should avoid this.

Crazy and hopefully wrong theory: is it possible that XWayland is being used for the plugin process...?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255007</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-30 15:07:12 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Interesting, this should never happen. It would be interesting to have a bt
&gt; of the WebProcess too.

By the way, there are really two bugs here. One is that PlatformDisplay is set wrong in the web process (or plugin process?). The other is that that should never be able to crash the UI process, because the web process and the plugin process are both untrusted. So even though we don&apos;t know why the secondary process is broken, we should still fix the UI process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255331</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-01 11:45:34 -0800</bug_when>
    <thetext>Muhammet (the reporter) says he can reproduce this whenever he tries. &quot;Sometimes it crashed when I clicked the link to go to the next page of the website article, but mostly it crashed as soon as the page was loaded.&quot; I forgot he had a WebKit Bugzilla account, but of course he does because he submits Turkish translation updates here. CCing him now, so we don&apos;t have to play back-and-forth between Bugzillas anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1256798</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-06 08:03:41 -0800</bug_when>
    <thetext>I&apos;m up to 331 reports of this crash, bumping Importance field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1257060</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-06 16:24:08 -0800</bug_when>
    <thetext>I got a response in https://bugzilla.gnome.org/show_bug.cgi?id=775632, the user installed the Flash plugin and now dictionary.cambridge.org always crashes. The users in the other bugs did not respond but I kinda suspect Flash is to blame there too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1257663</commentid>
    <comment_count>11</comment_count>
    <who name="Muhammet Kara">muhammetk</who>
    <bug_when>2016-12-08 00:23:11 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; I got a response in https://bugzilla.gnome.org/show_bug.cgi?id=775632, the
&gt; user installed the Flash plugin and now dictionary.cambridge.org always
&gt; crashes. The users in the other bugs did not respond but I kinda suspect
&gt; Flash is to blame there too.

I have also verified that (via about:plugins) Flash plugin (Shockwave Flash 11.2 r202) was installed and enabled on my crashing epiphany browser. I removed the plugin (via dnf), and the browser hasn&apos;t crashed again so far.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>