<?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>274152</bug_id>
          
          <creation_ts>2024-05-14 06:56:12 -0700</creation_ts>
          <short_desc>[DRM] DRMDeviceManager::mainDeviceNode() should be made thread-safe</short_desc>
          <delta_ts>2024-06-18 00:50:59 -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>275583</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="Philippe Normand">philn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2035236</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2024-05-14 06:56:12 -0700</bug_when>
    <thetext>And usable from non-main threads. That&apos;s a requirement for the media backend.

ASSERTION FAILED: Unsafe to ref/deref from different threads                                                                                                                                                       
m_isOwnedByMainThread == isMainThread()                                                                                                                                                                            
/var/home/phil/WebKit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefCounted.h(119) : void WTF::RefCountedBase::applyRefDerefThreadingCheck() const                                                                      
1   0x7fbc642f5729 WTFCrash                                                                                                                                                                                        
2   0x7fbc6c4c3e8a WTF::RefCountedBase::applyRefDerefThreadingCheck() const                                                                                                                                        
3   0x7fbc6c4e9729 WTF::RefCountedBase::refAllowingPartiallyDestroyed() const                                                                                                                                      
4   0x7fbc6c4e9700 WTF::RefCountedBase::ref() const                                                                                                                                                                
5   0x7fbc6dcdc78e WTF::DefaultRefDerefTraits&lt;WebCore::DRMDeviceNode&gt;::refIfNotNull(WebCore::DRMDeviceNode*)                                                                                                       
6   0x7fbc6dcdc749 WTF::RefPtr&lt;WebCore::DRMDeviceNode, WTF::RawPtrTraits&lt;WebCore::DRMDeviceNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::DRMDeviceNode&gt; &gt;::RefPtr(WTF::RefPtr&lt;WebCore::DRMDeviceNode, WTF::RawPtrTrait
s&lt;WebCore::DRMDeviceNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::DRMDeviceNode&gt; &gt; const&amp;)                                                                                                                            
7   0x7fbc720921b6 WebCore::DRMDeviceManager::mainDeviceNode(WebCore::DRMDeviceManager::NodeType) const                                                                                                            
8   0x7fbc72092239 WebCore::DRMDeviceManager::mainGBMDeviceNode(WebCore::DRMDeviceManager::NodeType) const                                                                                                         
9   0x7fbc7209c165 WebCore::GBMBufferSwapchain::getBuffer(WebCore::GBMBufferSwapchain::BufferDescription const&amp;)                                                                                                   
10  0x7fbc720e1e4f WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()                                                                                                                                  
11  0x7fbc720e4024 WebCore::MediaPlayerPrivateGStreamer::triggerRepaint(WTF::GRefPtr&lt;_GstSample&gt;&amp;&amp;)                                                                                                                
12  0x7fbc720ba05b webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_2::operator()(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) const                           
13  0x7fbc720b9e51 webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_2::__invoke(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)                                   
14  0x7fbc5ae70056 ffi_call_unix64                                                                                                                                                                                 
15  0x7fbc5ae6c6a0 ffi_call_int.lto_priv.0                                                                                                                                                                         
16  0x7fbc5ae6f4ee ffi_call                                                                                                                                                                                        
17  0x7fbc64def5e0 g_cclosure_marshal_generic_va                                                                                                                                                                   
18  0x7fbc64e08e14 signal_emit_valist_unlocked                                                                                                                                                                     
19  0x7fbc64e08f21 g_signal_emit_valist                                                                                                                                                                            
20  0x7fbc64e08fe3 g_signal_emit                                                                                                                                                                                   
21  0x7fbc5d8695bc gst_app_sink_preroll                                                                                                                                                                            
22  0x7fbc5d813cd4 gst_base_sink_do_preroll                                                                                                                                                                        
23  0x7fbc5d814694 gst_base_sink_do_sync                                                                                                                                                                           
24  0x7fbc5d81587b gst_base_sink_chain_unlocked                                                                                                                                                                    
25  0x7fbc5d8182d7 gst_base_sink_chain_main                                                                                                                                                                        
26  0x7fbc5d70929e gst_pad_chain_data_unchecked                                                                                                                                                                    
27  0x7fbc5d70b66e gst_pad_push_data                                                                                                                                                                               
28  0x7fbc5d713058 gst_pad_push                                                                                                                                                                                    
29  0x7fbc5d6f5406 gst_proxy_pad_chain_default                                                                                                                                                                     
30  0x7fbc5d70929e gst_pad_chain_data_unchecked                                                                                                                                                                    
31  0x7fbc5d70b66e gst_pad_push_data</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041826</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2024-06-18 00:50:59 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>