Bug 217959

Summary: [GStreamer] Device monitor issue in AudioDestination
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: MediaAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 218021    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Philippe Normand 2020-10-20 08:45:15 PDT
Some clean-up is not happening as it should. For now I will by-pass this code by returning a hard-coded value from maximumNumberOfOutputChannels().


STDERR: (WebKitWebProcess:114376): GStreamer-CRITICAL **: 07:04:33.644: Trying to stop a GstDeviceProvider alsadeviceprovider0 which is already stopped

Thread 1 (Thread 0x7f74db2ee9c0 (LWP 114376)):
#0  g_logv (log_domain=0x7f74de0a7240 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1377
#1  0x00007f74dd6cead3 in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f74de0afac8 "Trying to stop a GstDeviceProvider %s which is already stopped") at ../glib/gmessages.c:1415
#2  0x00007f74de01db7e in gst_device_provider_stop (provider=0x1cf2300 [GstAlsaDeviceProvider|alsadeviceprovider0]) at ../gst/gstdeviceprovider.c:534
#3  0x00007f74de02f6bc in gst_device_monitor_stop (monitor=0x7f5f84086db0 [GstDeviceMonitor|devicemonitor0]) at ../gst/gstdevicemonitor.c:581
#4  0x00007f74e4bb4a90 in std::call_once<WebCore::maximumNumberOfOutputChannels()::$_1>(std::once_flag&, WebCore::maximumNumberOfOutputChannels()::$_1&&)::{lambda()#2}::__invoke() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007f74de7c3aaf in __pthread_once_slow (once_control=0x7f74e807f230 <WebCore::maximumNumberOfOutputChannels()::onceFlag>, init_routine=0x7f74dc613810 <std::__once_proxy()>) at pthread_once.c:116
#6  0x00007f74e4bb4213 in WebCore::AudioDestination::maxChannelCount() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#7  0x00007f74e655462e in WebCore::jsAudioDestinationNode_maxChannelCount(JSC::JSGlobalObject*, long, JSC::PropertyName) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#8  0x00007f74e1631dfb in JSC::operationGetByVal(JSC::JSGlobalObject*, long, long) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#9  0x00007f749a88252c in  ()
#10 0xfffe000000000000 in  ()
#11 0xfffe000000000002 in  ()
#12 0x00007ffefc666e00 in  ()
#13 0x00007f749a881ecb in  ()
#14 0x00007f746f6aa9a0 in  ()
#15 0x00007f74884ea2e0 in  ()
#16 0x0000010e00000003 in  ()
#17 0x00007f7488491ca0 in  ()
#18 0x00007f74880798d8 in  ()
#19 0x00007f5f1c4999b0 in  ()
#20 0x00007f5fbc697570 in  ()
#21 0x00007f746c934aa0 in  ()
#22 0x00007f74880798d8 in  ()
#23 0x00007f5fbc697570 in  ()
#24 0x0000000000000006 in  ()
#25 0x000000000000000a in  ()
#26 0x00007f5fbc697570 in  ()
#27 0x00007f5fbc697570 in  ()
#28 0x00007f747747f610 in  ()
#29 0x00007f746d923200 in  ()
#30 0xfffe000000000000 in  ()
#31 0xfffe000000000002 in  ()
#32 0x00007ffefc666e40 in  ()
#33 0x00007f749a70f057 in  ()
#34 0x00007f746f6aa880 in  ()
#35 0x00007f7474e97c00 in  ()
#36 0x000001d100000002 in  ()
#37 0x00007f5f1c458d70 in  ()
#38 0x00007f5f446fc0a0 in  ()
#39 0x00007f749a9865f4 in  ()
#40 0x00007ffefc666fc0 in  ()
#41 0x00007f749a987c0a in  ()
#42 0x0000000000000000 in  ()
Comment 1 Philippe Normand 2020-10-20 08:49:25 PDT
https://trac.webkit.org/changeset/268732/webkit
Comment 2 Philippe Normand 2020-10-21 02:43:42 PDT
The warnings are false-positive, fixed by this MR: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679

I will cherry-pick it in the SDK after it lands upstream.
Comment 3 Philippe Normand 2020-10-26 04:30:26 PDT
Created attachment 412306 [details]
Patch
Comment 4 EWS 2020-10-27 06:01:17 PDT
Committed r269034: <https://trac.webkit.org/changeset/269034>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412306 [details].
Comment 5 Radar WebKit Bug Importer 2020-10-27 06:02:21 PDT
<rdar://problem/70719491>