<?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>253638</bug_id>
          
          <creation_ts>2023-03-09 02:50:14 -0800</creation_ts>
          <short_desc>[GTK] Minibrowser in flatpak crashes with http://get.webgl.org/</short_desc>
          <delta_ts>2023-09-17 12:08:39 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>258831</dup_id>
          
          <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="Przemyslaw Gorszkowski">pgorszkowski</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mcatanzaro</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1940010</commentid>
    <comment_count>0</comment_count>
    <who name="Przemyslaw Gorszkowski">pgorszkowski</who>
    <bug_when>2023-03-09 02:50:14 -0800</bug_when>
    <thetext>There is a crash when I start:
Tools/Scripts/run-minibrowser --gtk --debug http://get.webgl.org/

Log from console:
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied

Stack trace:
#0  0x00007f43317d7f54 in  ()
#1  0x00007f434b2fec53 in WebCore::GBMBufferSwapchain::getBuffer(WebCore::GBMBufferSwapchain::BufferDescription const&amp;) (this=0x7f43271ac0e0, description=...) at /app/webkit/Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.cpp:109
#2  0x00007f434b30879b in WebCore::GraphicsContextGLGBM::allocateDrawBufferObject() (this=0x7f432705ccb0) at /app/webkit/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:294
#3  0x00007f434b30846a in WebCore::GraphicsContextGLGBM::reshapeDisplayBufferBacking() (this=0x7f432705ccb0) at /app/webkit/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:275
#4  0x00007f43470a92cb in WebCore::GraphicsContextGLANGLE::reshapeFBOs(WebCore::IntSize const&amp;) (this=0x7f432705ccb0, size=...) at /app/webkit/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:268
#5  0x00007f43470aad13 in WebCore::GraphicsContextGLANGLE::reshape(int, int) (this=0x7f432705ccb0, width=140, height=150) at /app/webkit/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:636
#6  0x00007f434a5bf0b0 in WebCore::WebGLRenderingContextBase::initializeNewContext() (this=0x7f42c6009d80) at /app/webkit/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:749
#7  0x00007f434a5b8d9b in WebCore::WebGLRenderingContext::create(WebCore::CanvasBase&amp;, WTF::Ref&lt;WebCore::GraphicsContextGL, WTF::RawPtrTraits&lt;WebCore::GraphicsContextGL&gt; &gt;&amp;&amp;, WebCore::GraphicsContextGLAttributes) (canvas=..., context=..., attributes=...)
    at /app/webkit/Source/WebCore/html/canvas/WebGLRenderingContext.cpp:108
#8  0x00007f434a5bd982 in WebCore::WebGLRenderingContextBase::create(WebCore::CanvasBase&amp;, WebCore::GraphicsContextGLAttributes&amp;, WebCore::GraphicsContextGLWebGLVersion) (canvas=..., attributes=..., type=WebCore::GraphicsContextGLWebGLVersion::WebGL1)
    at /app/webkit/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:566
#9  0x00007f434a2eece6 in WebCore::HTMLCanvasElement::createContextWebGL(WebCore::GraphicsContextGLWebGLVersion, WebCore::GraphicsContextGLAttributes&amp;&amp;) (this=0x7f42c6005730, type=WebCore::GraphicsContextGLWebGLVersion::WebGL1, attrs=...)
    at /app/webkit/Source/WebCore/html/HTMLCanvasElement.cpp:443
#10 0x00007f434a2ee280 in WebCore::HTMLCanvasElement::getContext(JSC::JSGlobalObject&amp;, WTF::String const&amp;, WTF::FixedVector&lt;JSC::Strong&lt;JSC::Unknown, (JSC::ShouldStrongDestructorGrabLock)0&gt; &gt;&amp;&amp;) (this=0x7f42c6005730, state=..., contextId=..., arguments=...)
    at /app/webkit/Source/WebCore/html/HTMLCanvasElement.cpp:293
#11 0x00007f4347d313ab in WebCore::jsHTMLCanvasElementPrototypeFunction_getContextBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::IDLOperation&lt;WebCore::JSHTMLCanvasElement&gt;::ClassParameter)
    (lexicalGlobalObject=0x7f42d61ce068, callFrame=0x7ffc77391b30, castedThis=0x7f432700f708) at /app/webkit/WebKitBuild/Debug/WebCore/DerivedSources/JSHTMLCanvasElement.cpp:320
#12 0x00007f4347d42d3e in WebCore::IDLOperation&lt;WebCore::JSHTMLCanvasElement&gt;::call&lt;WebCore::jsHTMLCanvasElementPrototypeFunction_getContextBody&gt;(JSC::JSGlobalObject&amp;, JSC::CallFrame&amp;, char const*)
    (lexicalGlobalObject=..., callFrame=..., operationName=0x7f433f1c0a01 &quot;getContext&quot;) at /app/webkit/Source/WebCore/bindings/js/JSDOMOperation.h:63
#13 0x00007f4347d3146e in WebCore::jsHTMLCanvasElementPrototypeFunction_getContext(JSC::JSGlobalObject*, JSC::CallFrame*) (lexicalGlobalObject=0x7f42d61ce068, callFrame=0x7ffc77391b30) at /app/webkit/WebKitBuild/Debug/WebCore/DerivedSources/JSHTMLCanvasElement.cpp:325
#14 0x00007f42e5cf8038 in  ()
#15 0x00007ffc77391bc0 in  ()
#16 0x00007f433970a3a8 in op_call_slow_return_location () at /app/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1191
#17 0x0000000000000000 in  ()

It seems that: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.cpp#L108, gbm_bo_create returns nullptr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940365</commentid>
    <comment_count>1</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2023-03-10 05:32:30 -0800</bug_when>
    <thetext>I cannot reproduce on my system, inside flatpak.

Any additional information about your environment? Wayland, X11? Which graphics driver?

I think DRM_IOCTL_MODE_CREATE_DUMB message is relevant. It&apos;s failing to create a dumb buffer (i.e. something that&apos;s supposedly used for software rasterization), and the EPERM error indicates it&apos;s not allowed. So I think the underlying issue could be something permissions-related, but it would also be interesting to understand why non-dumb buffers are not being allocated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940731</commentid>
    <comment_count>2</comment_count>
    <who name="Przemyslaw Gorszkowski">pgorszkowski</who>
    <bug_when>2023-03-12 13:21:10 -0700</bug_when>
    <thetext>I run it on Ubuntu 20.04, X11, NVidia driver 525.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942041</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2023-03-17 02:44:52 -0700</bug_when>
    <thetext>I can get a crash on WebGL content in Ubuntu 22.10, X11, NVIDIA 525, outside flatpak.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977930</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-09-17 12:08:39 -0700</bug_when>
    <thetext>I think this is probably a duplicate of bug #258831. It&apos;s not still happening, is it?

*** This bug has been marked as a duplicate of bug 258831 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>