<?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>164916</bug_id>
          
          <creation_ts>2016-11-18 05:01:34 -0800</creation_ts>
          <short_desc>[GTK] Crash in IPC::GSocketMonitor::start</short_desc>
          <delta_ts>2016-11-30 09:35:34 -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>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1391778</see_also>
          <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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1252652</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-18 05:01:34 -0800</bug_when>
    <thetext>Web process crash in IPC::GSocketMonitor::start, we try to g_source_attach on a NULL GSource*:

Truncated backtrace:
Thread no. 1 (6 frames)
 #0 g_source_attach at gmain.c:1163
 #1 IPC::GSocketMonitor::start(_GSocket*, GIOCondition, WTF::RunLoop&amp;, std::function&lt;int (GIOCondition)&gt;&amp;&amp;) at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp:54
 #2 IPC::Connection::open at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:394
 #3 WebKit::ChildProcess::initialize at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Shared/ChildProcess.cpp:73
 #4 WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Shared/unix/ChildProcessMain.h:60
 #6 _start

Full backtrace downstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252653</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-18 05:02:55 -0800</bug_when>
    <thetext>Bug tracker system says &quot;probably fixed in 2.12.4&quot; but I don&apos;t know if I believe it or not, there&apos;s only 7 reports of this total.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254741</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-11-30 04:16:31 -0800</bug_when>
    <thetext>This is super weird, I would like see the WebKitWebProcess cmdline. Because what happens is that the connectionIdentifier is 0 in ChildProcessInitializationParameters.

#4  0x00007f95ea114ab4 in WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=&lt;optimized out&gt;, argv=0x7ffc494af528) at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Shared/unix/ChildProcessMain.h:60
        childMain = {&lt;WebKit::ChildProcessMainBase&gt; = {_vptr.ChildProcessMainBase = 0x7f95ebcc95b8 &lt;vtable for WebKit::WebProcessMain+16&gt;, m_parameters = {uiProcessName = {m_impl = {m_ptr = 0x0}}, clientIdentifier = {m_impl = {m_ptr = 0x0}}, connectionIdentifier = 0, extraInitializationData = {m_impl = {static m_maxLoad = &lt;optimized out&gt;, static m_minLoad = &lt;optimized out&gt;, m_table = 0x0, m_tableSize = 0, m_tableSizeMask = 0, m_keyCount = 0, m_deletedCount = 0}}}}, &lt;No data fields&gt;}

connectionIdentifier = 0. Than can only happen if argc &lt; 2 or atoi returns 0, and:

0x00007f95dfd78731 in __libc_start_main (main=0x56518f624c20 &lt;main(int, char**)&gt;, argc=2, argv=0x7ffc494af528, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffc494af518) at ../csu/libc-start.c:289

argc = 2, as expected. So, for some reason atoi is returning 0, that&apos;s because 0 was passed or because it failed to convert I guess, we should probably use strtol instead, but we assumed that atoid would never fail because the web process is only spawned by the UI process. The other option could be that the UI process failed to created the sockets, but that would have crashed the UI process even before trying to spawn the web process, because socketpair is called inside a RELEASE_ASSERT. So, I have no idea what&apos;s going on here, but it&apos;s very weird.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254743</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-11-30 05:29:25 -0800</bug_when>
    <thetext>Ok, I see the problem now:

Core was generated by `./WebKitWebProcess --help&apos;.

This is definitely not our fault, WebKitWebProcess is not a process expected to be manually run by a user, that&apos;s why it&apos;s not in /usr/bin, but in libexec. All WebKit processes should *only* be spawned by the UI process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1254802</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-11-30 09:35:34 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Ok, I see the problem now:
&gt; 
&gt; Core was generated by `./WebKitWebProcess --help&apos;.

TBH it&apos;s rare that cmdline is useful for a bug report, that&apos;s why I never copy it here. Excellent. :p</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>