WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
Bug 277076
[GStreamer][DMABuf] eventfd and dmabuf leaks in media player
https://bugs.webkit.org/show_bug.cgi?id=277076
Summary
[GStreamer][DMABuf] eventfd and dmabuf leaks in media player
Philippe Normand
Reported
2024-07-25 05:20:44 PDT
.
Attachments
Valgrind log showing 250 open fds upon exit
(232.19 KB, text/plain)
2024-09-14 07:09 PDT
,
Nils K
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2024-07-25 05:23:35 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/31223
Philippe Normand
Comment 2
2024-07-25 07:23:57 PDT
==479386== Open file descriptor 138: ==479386== at 0x1B5B388B: eventfd (syscall-template.S:120) ==479386== by 0x11639A72: WebCore::DMABufReleaseFlag::DMABufReleaseFlag(WebCore::DMABufReleaseFlag::InitializeTag) (Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h:48) ==479386== by 0x116C46D4: auto WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1::operator()<WebCore::DMABufObject>(WebCore::DMABufObject&&) const (Source/WebCore/platform/graphics/gstreamer /MediaPlayerPrivateGStreamer.cpp:3516) ==479386== by 0x116C441C: WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPrivateGS treamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&)::{lambda()#1}::operator()() const (Source/ WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:94) ==479386== by 0x116C42C9: _ZN3WTF23HashMapEnsureTranslatorINS_7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEENS_11Defa ultHashImEENS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESC_E9translateIRKmNS_12KeyValuePairImSA_EETkNS_9InvocableIFNT_11ValueTraits9TraitTypeEvEEEZNS4_10p ushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKSR_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_deleteIS16_EEEUlvE_EEvRT0_ OSR_RKT1_ (HashMap.h:256) ==479386== by 0x116C3FA6: _ZN3WTF9HashTableImNS_12KeyValuePairImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEEEENS_24KeyValuePa irKeyExtractorISB_EENS_11DefaultHashImEENS_7HashMapImSA_SF_NS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESI_E3addINS_23HashMapEnsureTranslatorISN_SF_EERKmT kSt9invocableZNS4_10pushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKT_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_delete IS16_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorISO_mSB_SD_SF_SN_SI_EEEEOT0_RKT1_ (HashTable.h:942) ==479386== by 0x116C3D6F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE12inlineEnsureIRKmTkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12D MABufObjectERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteIS11_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24K eyValuePairKeyExtractorIS1B_EESB_NSH_18KeyValuePairTraitsESD_EEmS1B_S1D_SB_S1E_SD_EEEEOSU_RKT0_ (HashMap.h:429) ==479386== by 0x116C3C8F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE6ensureITkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12DMABufObjec tERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteISZ_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24KeyValuePair KeyExtractorIS19_EESB_NSH_18KeyValuePairTraitsESD_EEmS19_S1B_SB_S1C_SD_EEEERKmSU_ (HashMap.h:491) ==479386== by 0x1169259F: void WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPriv ateGStreamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&) (Source/WebCore/platform/graphics/tex map/TextureMapperPlatformLayerProxyDMABuf.h:92) ==479386== by 0x11691EC0: WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor() (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3486) ==479386== by 0x116940BF: WebCore::MediaPlayerPrivateGStreamer::triggerRepaint(WTF::GRefPtr<_GstSample>&&) (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3868) ==479386== by 0x1166180A: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::operator()(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) const (Source/WebCore/ platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x11661600: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::__invoke(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) (Source/WebCore/platform /graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x1E583055: ffi_call_unix64 (unix64.S:104) ==479386== by 0x1E57F69F: ffi_call_int.lto_priv.0 (ffi64.c:673) ==479386== by 0x1E5824ED: ffi_call (ffi64.c:710) ==479386== by 0x1AE8467F: g_cclosure_marshal_generic_va (gclosure.c:1652) ==479386== by 0x1AE9E253: signal_emit_valist_unlocked (gclosure.c:897) ==479386== by 0x1AE9E360: g_signal_emit_valist (gsignal.c:3263) ==479386== by 0x1AE9E422: g_signal_emit (gsignal.c:3583) ==479386== ==479386== Open file descriptor 139: ==479386== at 0x1B5A69A7: __fcntl64_nocancel_adjusted (fcntl_nocancel.c:63) ==479386== by 0x1B5A1694: fcntl (fcntl64.c:51) ==479386== by 0x18989762: WTF::dupCloseOnExec(int) (Source/WTF/wtf/unix/UniStdExtrasUnix.cpp:61) ==479386== by 0xC263FB1: WTF::UnixFileDescriptor::UnixFileDescriptor(int, WTF::UnixFileDescriptor::DuplicationTag) (UnixFileDescriptor.h:49) ==479386== by 0xC260AD3: WTF::UnixFileDescriptor::duplicate() const (UnixFileDescriptor.h:85) ==479386== by 0x11639F78: WebCore::DMABufReleaseFlag::dup() const (Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h:59) ==479386== by 0x116C4737: auto WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1::operator()<WebCore::DMABufObject>(WebCore::DMABufObject&&) const (Source/WebCore/platform/graphics/gstreamer /MediaPlayerPrivateGStreamer.cpp:3519) ==479386== by 0x116C441C: WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPrivateGS treamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&)::{lambda()#1}::operator()() const (Source/ WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:94) ==479386== by 0x116C42C9: _ZN3WTF23HashMapEnsureTranslatorINS_7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEENS_11Defa ultHashImEENS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESC_E9translateIRKmNS_12KeyValuePairImSA_EETkNS_9InvocableIFNT_11ValueTraits9TraitTypeEvEEEZNS4_10p ushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKSR_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_deleteIS16_EEEUlvE_EEvRT0_ OSR_RKT1_ (HashMap.h:256) ==479386== by 0x116C3FA6: _ZN3WTF9HashTableImNS_12KeyValuePairImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEEEENS_24KeyValuePa irKeyExtractorISB_EENS_11DefaultHashImEENS_7HashMapImSA_SF_NS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESI_E3addINS_23HashMapEnsureTranslatorISN_SF_EERKmT kSt9invocableZNS4_10pushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKT_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_delete IS16_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorISO_mSB_SD_SF_SN_SI_EEEEOT0_RKT1_ (HashTable.h:942) ==479386== by 0x116C3D6F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE12inlineEnsureIRKmTkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12D MABufObjectERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteIS11_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24K eyValuePairKeyExtractorIS1B_EESB_NSH_18KeyValuePairTraitsESD_EEmS1B_S1D_SB_S1E_SD_EEEEOSU_RKT0_ (HashMap.h:429) ==479386== by 0x116C3C8F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE6ensureITkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12DMABufObjec tERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteISZ_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24KeyValuePair KeyExtractorIS19_EESB_NSH_18KeyValuePairTraitsESD_EEmS19_S1B_SB_S1C_SD_EEEERKmSU_ (HashMap.h:491) ==479386== by 0x1169259F: void WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPriv ateGStreamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&) (Source/WebCore/platform/graphics/tex map/TextureMapperPlatformLayerProxyDMABuf.h:92) ==479386== by 0x11691EC0: WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor() (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3486) ==479386== by 0x116940BF: WebCore::MediaPlayerPrivateGStreamer::triggerRepaint(WTF::GRefPtr<_GstSample>&&) (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3868) ==479386== by 0x1166180A: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::operator()(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) const (Source/WebCore/ platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x11661600: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::__invoke(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) (Source/WebCore/platform /graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x1E583055: ffi_call_unix64 (unix64.S:104) ==479386== by 0x1E57F69F: ffi_call_int.lto_priv.0 (ffi64.c:673) ==479386== by 0x1E5824ED: ffi_call (ffi64.c:710) ==479386== ==479386== Open file descriptor 140: /dmabuf:479386-WebKitWebProcess ==479386== at 0x1B5A69A7: __fcntl64_nocancel_adjusted (fcntl_nocancel.c:63) ==479386== by 0x1B5A1694: fcntl (fcntl64.c:51) ==479386== by 0x18989762: WTF::dupCloseOnExec(int) (Source/WTF/wtf/unix/UniStdExtrasUnix.cpp:61) ==479386== by 0xC263FB1: WTF::UnixFileDescriptor::UnixFileDescriptor(int, WTF::UnixFileDescriptor::DuplicationTag) (UnixFileDescriptor.h:49) ==479386== by 0x116C482A: auto WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1::operator()<WebCore::DMABufObject>(WebCore::DMABufObject&&) const (Source/WebCore/platform/graphics/gstreamer /MediaPlayerPrivateGStreamer.cpp:3533) ==479386== by 0x116C441C: WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPrivateGS treamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&)::{lambda()#1}::operator()() const (Source/ WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:94) ==479386== by 0x116C42C9: _ZN3WTF23HashMapEnsureTranslatorINS_7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEENS_11Defa ultHashImEENS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESC_E9translateIRKmNS_12KeyValuePairImSA_EETkNS_9InvocableIFNT_11ValueTraits9TraitTypeEvEEEZNS4_10p ushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKSR_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_deleteIS16_EEEUlvE_EEvRT0_ OSR_RKT1_ (HashMap.h:256) ==479386== by 0x116C3FA6: _ZN3WTF9HashTableImNS_12KeyValuePairImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS5_EENS_21DefaultRefDerefTraitsIS5_EEEEEENS_24KeyValuePa irKeyExtractorISB_EENS_11DefaultHashImEENS_7HashMapImSA_SF_NS_29UnsignedWithZeroKeyHashTraitsImEENS_10HashTraitsISA_EENS_15HashTableTraitsEE18KeyValuePairTraitsESI_E3addINS_23HashMapEnsureTranslatorISN_SF_EERKmT kSt9invocableZNS4_10pushDMABufIZNS3_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS3_12DMABufObjectERKT_NS_9OptionSetINS3_18TextureMapperFlagsEEEOSt10unique_ptrINS3_7GLFenceESt14default_delete IS16_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorISO_mSB_SD_SF_SN_SI_EEEEOT0_RKT1_ (HashTable.h:942) ==479386== by 0x116C3D6F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE12inlineEnsureIRKmTkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12D MABufObjectERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteIS11_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24K eyValuePairKeyExtractorIS1B_EESB_NSH_18KeyValuePairTraitsESD_EEmS1B_S1D_SB_S1E_SD_EEEEOSU_RKT0_ (HashMap.h:429) ==479386== by 0x116C3C8F: _ZN3WTF7HashMapImNS_3RefIN7WebCore37TextureMapperPlatformLayerProxyDMABuf11DMABufLayerENS_12RawPtrTraitsIS4_EENS_21DefaultRefDerefTraitsIS4_EEEENS_11DefaultHashImEENS_29UnsignedWithZ eroKeyHashTraitsImEENS_10HashTraitsIS9_EENS_15HashTableTraitsEE6ensureITkNS_9InvocableIFNT3_9TraitTypeEvEEEZNS3_10pushDMABufIZNS2_27MediaPlayerPrivateGStreamer22pushDMABufToCompositorEvE3$_1EEvONS2_12DMABufObjec tERKT_NS_9OptionSetINS2_18TextureMapperFlagsEEEOSt10unique_ptrINS2_7GLFenceESt14default_deleteISZ_EEEUlvE_EENS_18HashTableAddResultINS_17HashTableIteratorINS_9HashTableImNS_12KeyValuePairImS9_EENS_24KeyValuePair KeyExtractorIS19_EESB_NSH_18KeyValuePairTraitsESD_EEmS19_S1B_SB_S1C_SD_EEEERKmSU_ (HashMap.h:491) ==479386== by 0x1169259F: void WebCore::TextureMapperPlatformLayerProxyDMABuf::pushDMABuf<WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor()::$_1>(WebCore::DMABufObject&&, WebCore::MediaPlayerPriv ateGStreamer::pushDMABufToCompositor()::$_1 const&, WTF::OptionSet<WebCore::TextureMapperFlags>, std::unique_ptr<WebCore::GLFence, std::default_delete<WebCore::GLFence> >&&) (Source/WebCore/platform/graphics/tex map/TextureMapperPlatformLayerProxyDMABuf.h:92) ==479386== by 0x11691EC0: WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor() (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3486) ==479386== by 0x116940BF: WebCore::MediaPlayerPrivateGStreamer::triggerRepaint(WTF::GRefPtr<_GstSample>&&) (Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3868) ==479386== by 0x1166180A: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::operator()(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) const (Source/WebCore/ platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x11661600: webKitVideoSinkSetMediaPlayerPrivate(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*)::$_1::__invoke(_GstElement*, WebCore::MediaPlayerPrivateGStreamer*) (Source/WebCore/platform /graphics/gstreamer/GStreamerVideoSinkCommon.cpp:144) ==479386== by 0x1E583055: ffi_call_unix64 (unix64.S:104) ==479386== by 0x1E57F69F: ffi_call_int.lto_priv.0 (ffi64.c:673) ==479386== by 0x1E5824ED: ffi_call (ffi64.c:710) ==479386== by 0x1AE8467F: g_cclosure_marshal_generic_va (gclosure.c:1652) ==479386== by 0x1AE9E253: signal_emit_valist_unlocked (gclosure.c:897) ==479386==
Philippe Normand
Comment 3
2024-07-25 07:25:13 PDT
This looks like an issue in the TextureMapper...
Michael Catanzaro
Comment 4
2024-07-25 07:37:51 PDT
(Aside: what tool was able to produce that output? Is that some mode of valgrind? That is incredible.)
Philippe Normand
Comment 5
2024-07-25 09:38:00 PDT
Yes, valgrind --tool=none --track-fds=yes, as WebProcess cmd prefix, loading an mp4 video.
Nils K
Comment 6
2024-09-09 08:22:23 PDT
How did you set valgrind as a prefix for spawning a WebProcess? I found `WEB_PROCESS_CMD_PREFIX` but that does not seem to do anything for me. Or does that have to be a compile-time define?
Philippe Normand
Comment 7
2024-09-09 08:32:21 PDT
(In reply to nilskemail+webkit from
comment #6
)
> How did you set valgrind as a prefix for spawning a WebProcess? I found > `WEB_PROCESS_CMD_PREFIX` but that does not seem to do anything for me. Or > does that have to be a compile-time define?
You need a dev build for that afaik. Pass -DENABLE_DEVELOPER_MODE=ON to cmake.
Michael Catanzaro
Comment 8
2024-09-09 10:32:28 PDT
Also note it's basically unusable currently due to
https://bugs.kde.org/show_bug.cgi?id=492422
so you'll also need to build your own valgrind using the patches in that bug report. (I have no clue how Phil managed to capture that useful output without a custom valgrind.)
Michael Catanzaro
Comment 9
2024-09-09 10:35:24 PDT
BTW you can use --trace-children=yes if you're willing to debug all processes. Then you don't need to rebuild WebKit in order to use WEB_PROCESS_CMD_PREFIX.
Nils K
Comment 10
2024-09-11 16:28:54 PDT
I compiled webkit with the development mode enabled (or at least tried to, see
https://github.com/septatrix/wpewebkit-fedora/blob/3fb5ce885e424766d14d676d6837e8cff11220eb/wpewebkit.spec#L125
). However, when running valgrind I mostly get double closes (o.O) and after a while valgrind actually crashes with the below message: " Use --max-threads=INT to specify a larger number of threads and rerun valgrind valgrind: the 'impossible' happened: Max number of threads is too low " I ran cog as follows: LD_LIBRARY_PATH=/usr/local/lib64 WEB_PROCESS_CMD_PREFIX="$(command -v valgrind) --tool=none --track-fds=yes" cog \ --platform=wl \ --webprocess-failure=exit \ --media-playback-requires-user-gesture=false \ '
http://localhost:7000/
' | tee valgrind.log Should I invoke it differently?
Nils K
Comment 11
2024-09-11 16:38:36 PDT
Oh an many symbols are just listed as ??? by valgrind even though it should be able to get them from DEBUGINFOD_URLS based on the man page. Does that not work within the bubblewrap sandbox?
Michael Catanzaro
Comment 12
2024-09-11 18:17:10 PDT
(In reply to nilskemail+webkit from
comment #11
)
> Oh an many symbols are just listed as ??? by valgrind even though it should > be able to get them from DEBUGINFOD_URLS based on the man page. Does that > not work within the bubblewrap sandbox?
Indeed, the sandbox doesn't have network access. You can run your application under gdb though; it will prompt you to install debuginfo with 'dnf debuginfo-install'. Then repeat because it takes two tries for some reason. Then you should be good. (In reply to nilskemail+webkit from
comment #10
)
> I compiled webkit with the development mode enabled (or at least tried to, > see >
https://github.com/septatrix/wpewebkit-fedora/blob/
> 3fb5ce885e424766d14d676d6837e8cff11220eb/wpewebkit.spec#L125). > > However, when running valgrind I mostly get double closes (o.O) and after a > while valgrind actually crashes with the below message:
That's what I warned about in
comment #8
. If you didn't build your own patched valgrind, you won't get anywhere. (But if you did and are still seeing double closes, then please participate in the valgrind bug report, because the valgrind developers have been very responsive!)
> Should I invoke it differently?
Try --max-threads= something higher :)
Nils K
Comment 13
2024-09-13 16:38:33 PDT
(In reply to Michael Catanzaro from
comment #12
)
> (In reply to nilskemail+webkit from
comment #11
) > > Oh an many symbols are just listed as ??? by valgrind even though it should > > be able to get them from DEBUGINFOD_URLS based on the man page. Does that > > not work within the bubblewrap sandbox? > > Indeed, the sandbox doesn't have network access. You can run your > application under gdb though; it will prompt you to install debuginfo with > 'dnf debuginfo-install'. Then repeat because it takes two tries for some > reason. Then you should be good.
Hm I do not quite follow how running the program under GDB should help valgrind get the debuginfo in any way? I tried downloading the debuginfo by opening a coredump in gdb which prompts to download them but they are placed in ones home directory which bwrap does not mount inside the sandbox. I might take a shot at setting $XDG_CACHE_HOME to /usr/local or something similar but I am not sure if valgrind respects that (at least debuginfod-find documents that). For now I am trying the --trace-children=yes variant.
> (In reply to nilskemail+webkit from
comment #10
) > > I compiled webkit with the development mode enabled (or at least tried to, > > see > >
https://github.com/septatrix/wpewebkit-fedora/blob/
> > 3fb5ce885e424766d14d676d6837e8cff11220eb/wpewebkit.spec#L125). > > > > However, when running valgrind I mostly get double closes (o.O) and after a > > while valgrind actually crashes with the below message: > > That's what I warned about in
comment #8
. If you didn't build your own > patched valgrind, you won't get anywhere. (But if you did and are still > seeing double closes, then please participate in the valgrind bug report, > because the valgrind developers have been very responsive!)
I did use the patched valgrind but I still seem to get some. I appended this to your bug report.
Nils K
Comment 14
2024-09-14 07:09:12 PDT
Created
attachment 472556
[details]
Valgrind log showing 250 open fds upon exit I got a valgrind run tracking opened fds (now with the correct patches) of running cog for a few hours with four videos being cycled. At the end there were 248 fds open in the WPEWebProcess of which the majority are likely leaked. I filtered out the other processes as they do not seem to leak fds and I started valgrind with --trace-children (though I can still upload the full log if that helps). The stacktraces also show ??? for the mesa va driver as that is installed from rpmfusion but I think I was able to get the debuginfo for that package installed afterwards so if they are relevant I will try to create a new log with those symbols resolved.
Philippe Normand
Comment 15
2024-09-14 07:30:44 PDT
Can you try
https://github.com/WebKit/WebKit/pull/33613
?
Nils K
Comment 16
2024-09-14 08:29:52 PDT
(In reply to Philippe Normand from
comment #15
)
> Can you try
https://github.com/WebKit/WebKit/pull/33613
?
Sure, when I have a bit of time to either figure out how to add patches to COPR/rpm or get around to set up building WebKit locally. I sadly cannot run the builds from
https://ews-build.webkit.org/#/builders/5/builds/70892
as they link against a different ICU version.
Nils K
Comment 17
2024-09-16 06:03:35 PDT
(In reply to Philippe Normand from
comment #15
)
> Can you try
https://github.com/WebKit/WebKit/pull/33613
?
Building that PR gets stuck for 10+ hours before timing out: -
https://copr.fedorainfracloud.org/coprs/septatrix/wpewebkit/build/8022523/
-
https://copr-dist-git.fedorainfracloud.org/cgit/septatrix/wpewebkit/wpewebkit.git/tree/?id=21c1b0e956a78e86bd2beea91fb95c129272af78
Nils K
Comment 18
2024-09-20 11:13:42 PDT
(In reply to Philippe Normand from
comment #15
)
> Can you try
https://github.com/WebKit/WebKit/pull/33613
?
I still get over a hundred leaked fds after a short while. Are you also interested in the valgrind log for that? I am currently on the move and did not want to download the debuginfo over mobile data so symbols might not be resolved properly but I could generate a new trace once I am at home.
Carlos Garcia Campos
Comment 19
2024-09-22 22:17:25 PDT
I remember I also had leaks that were fixed after a gst upgrade, but I don't know exactly the gst versions I had before and after.
Nils K
Comment 20
2024-09-23 06:24:32 PDT
(In reply to Carlos Garcia Campos from
comment #19
)
> I remember I also had leaks that were fixed after a gst upgrade, but I don't > know exactly the gst versions I had before and after.
I am running gst 1.24.7 which is the newest release (except .8 released just a few days ago). If there is some way to remove webkit from the equation and only test a gstreamer pipeline which is as close as possible to what webkit does internally I would also test that but I fear that constructing such a pipeline would be quite difficult. I also looked around in the existing gstreamer issues but it does not seem like someone has encountered an issue similar to what is happening here in webkit...
Carlos Garcia Campos
Comment 21
2024-09-23 06:31:33 PDT
1.24.7 is recent enough
Philippe Normand
Comment 22
2024-11-14 04:24:41 PST
The DMABuf sink was removed. Closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug