Bug 264705

Summary: [GStreamer][EME][Debug] Flaky assertions on weak pointer
Product: WebKit Reporter: Philippe Normand <philn>
Component: PlatformAssignee: Philippe Normand <philn>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Philippe Normand 2023-11-12 06:13:45 PST
Not sure what's the point of asserting on a pointer that can be null?

Thread 1 (Thread 0x7f2c5affd640 (LWP 415363)):
#0  WTFCrash() () at /app/webkit/Source/WTF/wtf/Assertions.cpp:333
#1  0x00007f2e24761f91 in WTFCrashWithInfo(int, char const*, char const*, int) () at /app/webkit/WebKitBuild/WPE/Debug/WTF/Headers/wtf/Assertions.h:778
#2  0x00007f2e2c9d7c5a in WebCore::CDMInstanceProxy::startedWaitingForKey() (this=0x7f2e093832e0) at /app/webkit/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp:356
#3  0x00007f2e2c9d7258 in WebCore::CDMProxy::startedWaitingForKey() const (this=0x7f2e09383330) at /app/webkit/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp:274
#4  0x00007f2e2c9d74ec in WebCore::CDMProxy::tryWaitForKeyHandle(WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::WeakPtr<WebCore::CDMProxyDecryptionClient, WTF::DefaultWeakPtrImpl>&&) const (this=0x7f2e09383330, keyID=..., client=...) at /app/webkit/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp:293
#5  0x00007f2e2c9d7963 in WebCore::CDMProxy::getOrWaitForKeyHandle(WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::WeakPtr<WebCore::CDMProxyDecryptionClient, WTF::DefaultWeakPtrImpl>&&) const (this=0x7f2e09383330, keyID=..., client=...) at /app/webkit/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp:339
#6  0x00007f2e2cd6b0a8 in WebCore::CDMProxyThunder::getDecryptionSession(WebCore::CDMProxyThunder::DecryptionContext&) const (this=0x7f2e09383330, in=...) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:57
#7  0x00007f2e2cd6b435 in WebCore::CDMProxyThunder::decrypt(WebCore::CDMProxyThunder::DecryptionContext&) (this=0x7f2e09383330, input=...) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:85
#8  0x00007f2e2cd88226 in decrypt(WebKitMediaCommonEncryptionDecrypt*, GstBuffer*, GstBuffer*, GstBuffer*, unsigned int, GstBuffer*) (decryptor=0x7f2c5000fab0 [WebKitMediaCommonEncryptionDecrypt|webkitmediathunderdecrypt1], ivBuffer=0x7f2c540523d0 [None], keyIDBuffer=0x7f2c54003930 [None], buffer=0x7f2c5405e940 [None], subsampleCount=1, subsamplesBuffer=0x7f2c540525b0 [None]) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:163
#9  0x00007f2e2cd8ff6b in transformInPlace(GstBaseTransform*, GstBuffer*) (base=0x7f2c5000fab0 [GstBaseTransform|webkitmediathunderdecrypt1], buffer=0x7f2c5405e940 [None]) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:343
#10 0x00007f2e16b2907a in default_generate_output (trans=0x7f2c5000fab0 [GstBaseTransform|webkitmediathunderdecrypt1], outbuf=0x7f2c5affc320) at ../libs/gst/base/gstbasetransform.c:2197
#11 0x00007f2e16b297f6 in gst_base_transform_chain (pad=<optimized out>, parent=0x7f2c5000fab0 [GstObject|webkitmediathunderdecrypt1], buffer=<optimized out>) at ../libs/gst/base/gstbasetransform.c:2355
#12 0x00007f2e19b1c7a5 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7f2c5000d620 [GstPad|sink], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4463
#13 0x00007f2e19b20194 in gst_pad_push_data (pad=pad@entry=0x7f2c50004ba0 [GstPad|src], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4739
#14 0x00007f2e19b2055e in gst_pad_push (pad=0x7f2c50004ba0 [GstPad|src], buffer=0x7f2c5405e940 [None]) at ../gst/gstpad.c:4858
#15 0x00007f2e19b1c7a5 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7f2c500046a0 [GstPad|sink], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4463
#16 0x00007f2e19b20194 in gst_pad_push_data (pad=pad@entry=0x7f2c50006620 [GstPad|proxypad8], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4739
#17 0x00007f2e19b2055e in gst_pad_push (pad=0x7f2c50006620 [GstPad|proxypad8], buffer=0x7f2c5405e940 [None]) at ../gst/gstpad.c:4858
#18 0x00007f2e19b0665b in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7f2c5405e940 [None]) at ../gst/gstghostpad.c:127
#19 0x00007f2e19b1c7a5 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7f2c50006240 [GstPad|sink], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4463
#20 0x00007f2e19b20194 in gst_pad_push_data (pad=pad@entry=0x5614d8f40480 [GstPad|src], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4739
#21 0x00007f2e19b2055e in gst_pad_push (pad=0x5614d8f40480 [GstPad|src], buffer=0x7f2c5405e940 [None]) at ../gst/gstpad.c:4858
#22 0x00007f2e19b1c7a5 in gst_pad_chain_data_unchecked (pad=pad@entry=0x5614d8f3ff80 [GstPad|sink], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4463
#23 0x00007f2e19b20194 in gst_pad_push_data (pad=pad@entry=0x5614d8f3bbc0 [GstPad|src_A0], type=type@entry=4112, data=data@entry=0x7f2c5405e940) at ../gst/gstpad.c:4739
#24 0x00007f2e19b2055e in gst_pad_push (pad=0x5614d8f3bbc0 [GstPad|src_A0], buffer=0x7f2c5405e940 [None]) at ../gst/gstpad.c:4858
#25 0x00007f2e2cdb7782 in webKitMediaSrcLoop(void*) (userData=0x5614d8f3bbc0) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:555
#26 0x00007f2e19b54911 in gst_task_func (task=0x5614d8f3f000 [GstTask|webkitmediasrc0:src_A0]) at ../gst/gsttask.c:384
#27 0x00007f2e19d5dfb2 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:350
#28 0x00007f2e19d58c02 in g_thread_proxy (data=0x7f2da8001090) at ../glib/gthread.c:831
#29 0x00007f2e195a825a in start_thread (arg=<optimized out>) at pthread_create.c:442
#30 0x00007f2e19630fc4 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Comment 1 Philippe Normand 2023-11-12 06:15:30 PST
Pull request: https://github.com/WebKit/WebKit/pull/20390
Comment 2 EWS 2023-11-13 01:32:53 PST
Committed 270627@main (d0b51b0807c8): <https://commits.webkit.org/270627@main>

Reviewed commits have been landed. Closing PR #20390 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-11-13 01:33:15 PST
<rdar://problem/118321657>