<?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>211365</bug_id>
          
          <creation_ts>2020-05-03 21:08:27 -0700</creation_ts>
          <short_desc>[GTK] Tests exiting early due to TextureMapperShaderProgram variables ASSERTING isMainThread</short_desc>
          <delta_ts>2020-05-04 00:33:54 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>211355</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=161800</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=211264</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="Lauro Moura">lmoura</reporter>
          <assigned_to name="Zan Dobersek">zan</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>luiz</cc>
    
    <cc>noam</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1648438</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2020-05-03 21:08:27 -0700</bug_when>
    <thetext>From bug161800:

&gt;&gt; Since AtomString has thread-affinity, static NeverDestroyed&lt;const AtomString&gt; is basically only safe for the main-thread use.
&gt;&gt; We should ensure that this is only used in the main-thread. To do that, this patch introduces MainThreadNeverDestroyed and
&gt;&gt; MainThreadLazyNeverDestroyed. They are NeverDestroyed and LazyNeverDestroyed + main-thread assertions.

The patch for that bug changed the TEXMAP_DECLARE_VARIABLE field &apos;name&apos; type from NeverDestroyed to MainThreadNeverDestroyed.

Sample backtrace:

ASSERTION FAILED: isMainThread()
DerivedSources/ForwardingHeaders/wtf/NeverDestroyed.h(55) : static void WTF::MainThreadAccessTraits::assertAccess()
1   0x7efd83ffb94f WTFCrash
2   0x7efd91e1eb7a WTF::ConditionalCrashOnOverflow::setShouldCrashOnOverflow(bool)
3   0x7efd93529bcf WTF::MainThreadAccessTraits::assertAccess()
4   0x7efd9352ba49 WTF::NeverDestroyed&lt;WTF::AtomString const, WTF::MainThreadAccessTraits&gt;::NeverDestroyed&lt;char const (&amp;) [10], WTF::AtomString::ConstructFromLiteralTag&gt;(char const (&amp;) [10], WTF::AtomString::ConstructFromLiteralTag&amp;&amp;)
5   0x7efd9352a95e WebCore::TextureMapperShaderProgram::samplerLocation()
6   0x7efd9352812c WebCore::TextureMapperGL::drawTexturedQuadWithProgram(WebCore::TextureMapperShaderProgram&amp;, unsigned int, int, WebCore::IntSize const&amp;, WebCore::FloatRect const&amp;, WebCore::TransformationMatrix const&amp;, float)
7   0x7efd93526441 WebCore::TextureMapperGL::drawTexture(unsigned int, int, WebCore::IntSize const&amp;, WebCore::FloatRect const&amp;, WebCore::TransformationMatrix const&amp;, float, unsigned int)
8   0x7efd935260e7 WebCore::TextureMapperGL::drawTexture(WebCore::BitmapTexture const&amp;, WebCore::FloatRect const&amp;, WebCore::TransformationMatrix const&amp;, float, unsigned int)
9   0x7efd96643b2e WebCore::TextureMapperTile::paint(WebCore::TextureMapper&amp;, WebCore::TransformationMatrix const&amp;, float, unsigned int)
10  0x7efd9353ab45 WebCore::CoordinatedBackingStore::paintTilesToTextureMapper(WTF::Vector&lt;WebCore::TextureMapperTile*, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, WebCore::TextureMapper&amp;, WebCore::TransformationMatrix const&amp;, float, WebCore::FloatRect const&amp;)
11  0x7efd9353afe4 WebCore::CoordinatedBackingStore::paintToTextureMapper(WebCore::TextureMapper&amp;, WebCore::FloatRect const&amp;, WebCore::TransformationMatrix const&amp;, float)
12  0x7efd9351cf2c WebCore::TextureMapperLayer::paintSelf(WebCore::TextureMapperPaintOptions const&amp;)
13  0x7efd9351d4fa WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
14  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
15  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
16  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
17  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
18  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
19  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
20  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
21  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
22  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
23  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
24  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
25  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
26  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
27  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
28  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)
29  0x7efd9351dae6 WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions const&amp;)
30  0x7efd9351f8c9 WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions const&amp;)
31  0x7efd9351d77f WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions const&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648439</commentid>
    <comment_count>1</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2020-05-03 21:10:33 -0700</bug_when>
    <thetext>Sorry, the correct bug to be referenced is bug211264. (Which introduced this issue).

Bug 161800 is a previous fix for this specific TextureMapperShaderProgram piece regarding AtomString and threading (which solved the issues for a while but now needs some rework).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648449</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2020-05-03 23:39:33 -0700</bug_when>
    <thetext>(In reply to Lauro Moura from comment #1)
&gt; Sorry, the correct bug to be referenced is bug211264. (Which introduced this
&gt; issue).
&gt; 
&gt; Bug 161800 is a previous fix for this specific TextureMapperShaderProgram
&gt; piece regarding AtomString and threading (which solved the issues for a
&gt; while but now needs some rework).

That patch introduces assertions and found suspicious use. I&apos;ve uploaded the patch which fixes TextureMapperShaderProgram issue. https://bugs.webkit.org/show_bug.cgi?id=211355

*** This bug has been marked as a duplicate of bug 211355 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648459</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2020-05-04 00:21:04 -0700</bug_when>
    <thetext>Reopening to attach new patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648460</commentid>
    <comment_count>4</comment_count>
      <attachid>398350</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2020-05-04 00:21:07 -0700</bug_when>
    <thetext>Created attachment 398350
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648464</commentid>
    <comment_count>5</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2020-05-04 00:33:54 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 211355 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>398350</attachid>
            <date>2020-05-04 00:21:07 -0700</date>
            <delta_ts>2020-05-04 00:33:42 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-211365-20200504092106.patch</filename>
            <type>text/plain</type>
            <size>3749</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjYxMDcxCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYjc0MDliNjI3YzgzNzE2
NTBiNDQ0MzRiMGNkZGNiZWFkYzQ0YmFlMS4uMWEyNmYzN2E1N2M0OGVkMjllOTBmMGM4MjZjZDNm
MjIwZTU0ZTMzYiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE4IEBACisyMDIwLTA1LTA0ICBaYW4g
RG9iZXJzZWs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