<?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>241954</bug_id>
          
          <creation_ts>2022-06-23 20:55:20 -0700</creation_ts>
          <short_desc>[GTK] Segfault in firstChild when clicking on a pull request on GitHub while logged in</short_desc>
          <delta_ts>2022-08-07 03:44:36 -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>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>238429</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=238429</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="antoyo">bouanto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>fujii</cc>
    
    <cc>iamleot+webkit-bugzilla</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>svillar</cc>
    
    <cc>xry111</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1878109</commentid>
    <comment_count>0</comment_count>
    <who name="antoyo">bouanto</who>
    <bug_when>2022-06-23 20:55:20 -0700</bug_when>
    <thetext>Hi.

Reproduction steps:

 * Login to GitHub in Epiphany
 * Navigate to https://github.com/GNOME/gtk/pulls?q=is:pr+is:closed
 * Click on a PR link.
 * The page crash with the message: &quot;Something went wrong while displaying this page. Please reload or visit a different page to continue.&quot;

It reproduces 100% of the time (assuming you are logged in; when logged out, the problem doesn&apos;t happen).

Here&apos;s the stacktrace:

Core was generated by `/usr/lib/webkit2gtk-4.0/WebKitWebProcess 16 32&apos;.
Program terminated with signal SIGSEGV, Segmentation fault.

#0  WebCore::ContainerNode::firstChild() const () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/ContainerNode.h:43
#1  WebCore::RenderFileUploadControl::uploadButton() const () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/RenderFileUploadControl.cpp:246
#2  WebCore::RenderFileUploadControl::updateFromElement() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/RenderFileUploadControl.cpp:78
#3  0x00007f0137fbfe36 in WebCore::HTMLFormControlElement::didAttachRenderers() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/html/HTMLFormControlElement.cpp:215
#4  WebCore::HTMLInputElement::didAttachRenderers() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/html/HTMLInputElement.cpp:875
#5  0x00007f01386a48b6 in WebCore::RenderTreeUpdater::updateAfterDescendants(WebCore::Element&amp;, WebCore::Style::ElementUpdates const*) ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:272
#6  WebCore::RenderTreeUpdater::popParent() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:237
#7  0x00007f01386a4cb8 in WebCore::RenderTreeUpdater::popParentsToDepth(unsigned int) ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:250
#8  WebCore::RenderTreeUpdater::updateRenderTree(WebCore::ContainerNode&amp;) () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:158
#9  0x00007f0137e0206b in WebCore::RenderTreeUpdater::commit(std::unique_ptr&lt;WebCore::Style::Update const, std::default_delete&lt;WebCore::Style::Update const&gt; &gt;) ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:125
#10 WebCore::RenderTreeUpdater::commit(std::unique_ptr&lt;WebCore::Style::Update const, std::default_delete&lt;WebCore::Style::Update const&gt; &gt;) ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:113
#11 WebCore::Document::updateRenderTree(std::unique_ptr&lt;WebCore::Style::Update const, std::default_delete&lt;WebCore::Style::Update const&gt; &gt;) ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Document.cpp:1983
#12 0x00007f0137e02b0b in WebCore::Document::resolveStyle(WebCore::Document::ResolveStyleType) () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Document.cpp:2087
#13 0x00007f0137e03545 in WebCore::Document::updateStyleIfNeeded() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Document.cpp:2182
#14 0x00007f0137e03729 in WebCore::Document::updateLayout() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Document.cpp:2203
#15 0x00007f0138b301b5 in WebCore::Document::updateLayoutIgnorePendingStylesheets(WebCore::Document::RunPostLayoutTasks) [clone .constprop.0] ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Document.cpp:2229
#16 0x00007f0137e254b2 in WebCore::Element::offsetParent() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Element.cpp:1322
#17 WebCore::Element::offsetParentForBindings() () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/dom/Element.cpp:1312
#18 0x00007f0137599361 in jsHTMLElement_offsetParentGetter () at /usr/src/debug/build/WebCore/DerivedSources/JSHTMLElement.cpp:4105
#19 get&lt;WebCore::jsHTMLElement_offsetParentGetter, (WebCore::CastedThisErrorBehavior)3&gt; () at /usr/src/debug/webkitgtk-2.36.3/Source/WebCore/bindings/js/JSDOMAttribute.h:88
#20 jsHTMLElement_offsetParent() () at /usr/src/debug/build/WebCore/DerivedSources/JSHTMLElement.cpp:4110
#21 0x00007f0135531c58 in JSC::PropertySlot::customGetter(JSC::VM&amp;, JSC::PropertyName) const ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/JavaScriptCore/runtime/PropertySlot.cpp:47
#22 0x00007f013528b64e in JSC::PropertySlot::getValue(JSC::JSGlobalObject*, JSC::PropertyName) const ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/JavaScriptCore/runtime/PropertySlot.h:408
#23 JSC::JSValue::get(JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&amp;) const ()
    at /usr/src/debug/webkitgtk-2.36.3/Source/JavaScriptCore/runtime/JSCJSValueInlines.h:1021
#24 performLLIntGetByID() () at /usr/src/debug/webkitgtk-2.36.3/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:814
#25 0x00007f013528c443 in llint_slow_path_get_by_id() () at /usr/src/debug/webkitgtk-2.36.3/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:888
#26 0x00007f01349569a8 in llint_op_get_by_id () at /usr/lib/libjavascriptcoregtk-4.0.so.18
#27 0xfffe000000000002 in  ()
#28 0x00007f00d7fff1d8 in  ()
#29 0x00007fff2da790b0 in  ()
#30 0x00007f01349697a9 in op_call_slow_return_location () at /usr/lib/libjavascriptcoregtk-4.0.so.18
#31 0x0000000000000000 in  ()

Thanks to fix this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878110</commentid>
    <comment_count>1</comment_count>
    <who name="antoyo">bouanto</who>
    <bug_when>2022-06-23 21:01:17 -0700</bug_when>
    <thetext>Epiphany version: Web 42.2
Webkit2gtk version: webkit2gtk-4.1 2.36.3-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878162</commentid>
    <comment_count>2</comment_count>
    <who name="Leonardo Taccari">iamleot+webkit-bugzilla</who>
    <bug_when>2022-06-24 06:48:22 -0700</bug_when>
    <thetext>I&apos;m seeing that too with WebKitGTK 2.36.3 on NetBSD (not 100% reproducible but happens very often).

Possible interesting data point: this started only recently (less than 24 hours ago, i.e. probably since today (2022-06-24)) so I think that some github.com change started triggering that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878861</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-06-28 13:43:48 -0700</bug_when>
    <thetext>*** Bug 242066 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888150</commentid>
    <comment_count>4</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2022-08-01 13:15:08 -0700</bug_when>
    <thetext>I hit this constantly as well, seems weird that only GTK is affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888836</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-08-04 05:36:12 -0700</bug_when>
    <thetext>I&apos;ve done a bisection to find the commit which fixed this issue, because
it is not a problem anymore in ToT. After some churning, the patch from
bug #238429 seems to fix this in my limited testing. I am doing now a
release build with the patch applied on top of the 2.36 branch to use
it for a few hours to be completely certain before closing this bug :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888850</commentid>
    <comment_count>6</comment_count>
    <who name="Leonardo Taccari">iamleot+webkit-bugzilla</who>
    <bug_when>2022-08-04 06:48:26 -0700</bug_when>
    <thetext>Wow, great catch!

Thank you Adrian!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888856</commentid>
    <comment_count>7</comment_count>
    <who name="Xi Ruoyao">xry111</who>
    <bug_when>2022-08-04 07:35:05 -0700</bug_when>
    <thetext>Can we merge the patch for 2.36.6 then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889089</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-08-05 02:51:44 -0700</bug_when>
    <thetext>(In reply to Xi Ruoyao from comment #7)
&gt; Can we merge the patch for 2.36.6 then?

I have been testing a build with the patch applied (and additionally
a related patch on top) and in half a day of continuous usage I have
not hit any crashes in GitHub anymore. I have pushed both to the 2.36
release branch, so version 2.36.6 will have this resolved =)

*** This bug has been marked as a duplicate of bug 238429 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889092</commentid>
    <comment_count>9</comment_count>
    <who name="Leonardo Taccari">iamleot+webkit-bugzilla</who>
    <bug_when>2022-08-05 03:12:37 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #8)
&gt; (In reply to Xi Ruoyao from comment #7)
&gt; &gt; Can we merge the patch for 2.36.6 then?
&gt; 
&gt; I have been testing a build with the patch applied (and additionally
&gt; a related patch on top) and in half a day of continuous usage I have
&gt; not hit any crashes in GitHub anymore. I have pushed both to the 2.36
&gt; release branch, so version 2.36.6 will have this resolved =)
&gt; 
&gt; *** This bug has been marked as a duplicate of bug 238429 ***

That&apos;s great!

Thank you very much again Adrian for bisecting and backporting it!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889499</commentid>
    <comment_count>10</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-08-07 03:44:36 -0700</bug_when>
    <thetext>(In reply to Leonardo Taccari from comment #9)
&gt; (In reply to Adrian Perez from comment #8)
&gt; &gt; (In reply to Xi Ruoyao from comment #7)
&gt; &gt; &gt; Can we merge the patch for 2.36.6 then?
&gt; &gt; 
&gt; &gt; I have been testing a build with the patch applied (and additionally
&gt; &gt; a related patch on top) and in half a day of continuous usage I have
&gt; &gt; not hit any crashes in GitHub anymore. I have pushed both to the 2.36
&gt; &gt; release branch, so version 2.36.6 will have this resolved =)
&gt; &gt; 
&gt; &gt; *** This bug has been marked as a duplicate of bug 238429 ***
&gt; 
&gt; That&apos;s great!
&gt; 
&gt; Thank you very much again Adrian for bisecting and backporting it!

You&apos;re welcome! The new release that includes the fix has been published:

  https://webkitgtk.org/2022/08/07/webkitgtk2.36.6-released.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>