Bug 214810

Summary: [GStreamer] Crash in gstbuffer.c on meet.gnome.org
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, jan.brummer, mcatanzaro, pnormand, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   

Description Michael Catanzaro 2020-07-26 13:26:56 PDT
I've hit this twice testing WebRTC in my Ephy jhbuild on https://meet.gnome.org (virtual GUADEC) after fixing bug #214806, but haven't figured out how to reproduce (hence no debug log). One time I think it happened when I tried to enable my video stream but then immediately afterwards cancelled it, but I failed to reproduce. It's deep in GStreamer, in fact there's no WebKit anywhere in the backtrace, so who knows if it's our bug. I'm not sure reporting directly upstream would be useful.

I didn't even realize we used GStreamer for WebRTC.

(gdb) bt full
#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383
#1  0x00007f679f7c27fe in memcpy (__len=172800, __src=<optimized out>, __dest=<optimized out>)
    at /usr/include/bits/string_fortified.h:34
        i = 0
        tocopy = 172800
        sinfo = 
            {memory = 0x43925c0 [GstMemory], flags = GST_MAP_READ, data = 0x7f6712633040 <error: Cannot access memory at address 0x7f6712633040>, size = 172800, maxsize = 172800, user_data = {0x45cf3e8, 0x1010, 0x7f679f7fedc0 <gst_pad_push_data+1680>, 0x0}, _gst_reserved = {0x0, 0x43eb4a8, 0x3b999b0, 0x3b999b0}}
        left = <optimized out>
        dinfo = 
            {memory = 0x7f6700187000 [GstMemory], flags = GST_MAP_WRITE, data = 0x7f6700187078 "tion\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.kurentoUtils ="..., size = 259200, maxsize = 259200, user_data = {0x7de8d6869bcc9d00, 0x7f66e27a5910, 0x45cf3d0, 0x3b97910}, _gst_reserved = {0x3ea25a0, 0xffffffffffffffff, 0x0, 0x7f679f8c7f28 <_priv_tracer_enabled>}}
        ptr = <optimized out>
        parent = <optimized out>
        size = <optimized out>
        poffset = <optimized out>
        mem = 0x4c98860
        result = 0x7f6700187000 [GstMemory]
        __PRETTY_FUNCTION__ = "_get_merged_memory"
#2  _get_merged_memory (buffer=0x4c987e0 [GstBuffer], idx=0, length=3) at gstbuffer.c:292
        i = 0
        tocopy = 172800
        sinfo = 
            {memory = 0x43925c0 [GstMemory], flags = GST_MAP_READ, data = 0x7f6712633040 <error: Cannot access memory at address 0x7f6712633040>, size = 172800, maxsize = 172800, user_data = {0x45cf3e8, 0x1010, 0x7f679f7fedc0 <gst_pad_push_data+1680>, 0x0}, _gst_reserved = {0x0, 0x43eb4a8, 0x3b999b0, 0x3b999b0}}
        left = <optimized out>
        dinfo = 
            {memory = 0x7f6700187000 [GstMemory], flags = GST_MAP_WRITE, data = 0x7f6700187078 "tion\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.kurentoUtils ="..., size = 259200, maxsize = 259200, user_data = {0x7de8d6869bcc9d00, 0x7f66e27a5910, 0x45cf3d0, 0x3b97910}, _gst_reserved = {0x3ea25a0, 0xffffffffffffffff, 0x0, 0x7f679f8c7f28 <_priv_tracer_enabled>}}
        ptr = <optimized out>
        parent = <optimized out>
        size = <optimized out>
        poffset = <optimized out>
        mem = 0x4c98860
        result = 0x7f6700187000 [GstMemory]
        __PRETTY_FUNCTION__ = "_get_merged_memory"
#3  0x00007f679f7c4188 in gst_buffer_map_range
    (buffer=buffer@entry=0x4c987e0 [GstBuffer], idx=idx@entry=0, length=3, 
    length@entry=-1, info=info@entry=0x4697880, flags=flags@entry=GST_MAP_READ) at gstbuffer.c:1810
        mem = <optimized out>
        nmem = <optimized out>
        write = 0
        writable = 1
        len = 3
--Type <RET> for more, q to quit, c to continue without paging--c
        __func__ = "gst_buffer_map_range"
        __PRETTY_FUNCTION__ = "gst_buffer_map_range"
#4  0x00007f679f7c43a6 in gst_buffer_map (buffer=buffer@entry=0x4c987e0 [GstBuffer], info=info@entry=0x4697880, flags=flags@entry=GST_MAP_READ) at gstbuffer.c:1754
#5  0x00007f679f60d1a3 in gst_video_frame_map_id (frame=frame@entry=0x46977a8, info=0x18958a0, buffer=buffer@entry=0x4c987e0 [GstBuffer], id=id@entry=-1, flags=flags@entry=GST_MAP_READ) at video-frame.c:117
        meta = 0x0
        i = <optimized out>
        __func__ = "gst_video_frame_map_id"
        __PRETTY_FUNCTION__ = "gst_video_frame_map_id"
#6  0x00007f679f60d661 in gst_video_frame_map (frame=frame@entry=0x46977a8, info=<optimized out>, buffer=buffer@entry=0x4c987e0 [GstBuffer], flags=flags@entry=GST_MAP_READ) at video-frame.c:246
#7  0x00007f679f59389d in _raw_upload_frame_new (buffer=0x4c987e0 [GstBuffer], raw=0x45a5db0) at gstglupload.c:1161
        frame = 0x46977a0
        info = <optimized out>
        i = <optimized out>
        raw = 0x45a5db0
        features = <optimized out>
#8  _raw_data_upload_accept (in_caps=<optimized out>, out_caps=<optimized out>, buffer=0x4c987e0 [GstBuffer], impl=0x45a5db0) at gstglupload.c:1260
        raw = 0x45a5db0
        features = <optimized out>
#9  _raw_data_upload_accept (impl=0x45a5db0, buffer=0x4c987e0 [GstBuffer], in_caps=<optimized out>, out_caps=<optimized out>) at gstglupload.c:1248
        raw = 0x45a5db0
        features = <optimized out>
#10 0x00007f679f5940f4 in gst_gl_upload_perform_with_buffer (upload=0x1895a10 [GstGLUpload|glupload4], buffer=buffer@entry=0x4c987e0 [GstBuffer], outbuf_ptr=outbuf_ptr@entry=0x7f66e27a5ae0) at gstglupload.c:1987
        ret = <optimized out>
        outbuf = 0x3b99640 [None]
        last_impl = 0x45a5db0
        __func__ = "gst_gl_upload_perform_with_buffer"
#11 0x00007f6717b9ec23 in gst_gl_upload_element_prepare_output_buffer (bt=0x3b99640 [GstGLUploadElement|gluploadelement4], buffer=0x4c987e0 [GstBuffer], outbuf=0x7f66e27a5ae0) at gstgluploadelement.c:242
        upload = 0x3b99640 [GstGLUploadElement|gluploadelement4]
        ret = <optimized out>
        bclass = 0x3b904b0
        __PRETTY_FUNCTION__ = "gst_gl_upload_element_prepare_output_buffer"
#12 0x00007f679f90fb58 in default_generate_output (trans=0x3b99640 [GstGLUploadElement|gluploadelement4], outbuf=0x7f66e27a5ae0) at gstbasetransform.c:2112
        bclass = 0x3b904b0
        priv = 0x3b99570
        ret = GST_FLOW_OK
        inbuf = 0x4c987e0 [GstBuffer]
        want_in_place = <optimized out>
        __PRETTY_FUNCTION__ = "default_generate_output"
#13 0x00007f679f90f4a4 in gst_base_transform_chain (pad=<optimized out>, parent=0x3b99640 [GstGLUploadElement|gluploadelement4], buffer=<optimized out>) at gstbasetransform.c:2294
        trans = 0x3b99640 [GstGLUploadElement|gluploadelement4]
        klass = 0x3b904b0
        priv = 0x3b99570
        ret = <optimized out>
        position = 18446744073709551615 [99:99:99.999999999]
        timestamp = <optimized out>
        duration = <optimized out>
        outbuf = 0x0
        __PRETTY_FUNCTION__ = "gst_base_transform_chain"
#14 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x45cece0 [GstPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f90f400 <gst_base_transform_chain>
        ret = <optimized out>
        parent = 0x3b99640 [GstGLUploadElement|gluploadelement4]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#15 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x45ca830 [GstProxyPad|proxypad128], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x45cece0 [GstPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#16 0x00007f679f805f12 in gst_pad_push (pad=pad@entry=0x45ca830 [GstProxyPad|proxypad128], buffer=buffer@entry=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#17 0x00007f679f7eb883 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x4c987e0 [GstBuffer]) at gstghostpad.c:127
        res = <optimized out>
        internal = 0x45ca830 [GstProxyPad|proxypad128]
        __func__ = "gst_proxy_pad_chain_default"
#18 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x458c870 [GstGhostPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f7eb7f0 <gst_proxy_pad_chain_default>
        ret = <optimized out>
        parent = 0x3b87a90 [WebKitGLVideoSink|webkitglvideosink4]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#19 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x45caa90 [GstProxyPad|proxypad129], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x458c870 [GstGhostPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#20 0x00007f679f805f12 in gst_pad_push (pad=pad@entry=0x45caa90 [GstProxyPad|proxypad129], buffer=buffer@entry=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#21 0x00007f679f7eb883 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x4c987e0 [GstBuffer]) at gstghostpad.c:127
        res = <optimized out>
        internal = 0x45caa90 [GstProxyPad|proxypad129]
        __func__ = "gst_proxy_pad_chain_default"
#22 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x458caf0 [GstGhostPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f7eb7f0 <gst_proxy_pad_chain_default>
        ret = <optimized out>
        parent = 0x3baad20 [GstFPSDisplaySink|sink]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#23 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x47ccd20 [GstGhostPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x458caf0 [GstGhostPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#24 0x00007f679f805f12 in gst_pad_push (pad=pad@entry=0x47ccd20 [GstGhostPad|src], buffer=buffer@entry=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#25 0x00007f679f7eb883 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x4c987e0 [GstBuffer]) at gstghostpad.c:127
        res = <optimized out>
        internal = 0x47ccd20 [GstGhostPad|src]
        __func__ = "gst_proxy_pad_chain_default"
#26 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x47cec80 [GstProxyPad|proxypad139], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f7eb7f0 <gst_proxy_pad_chain_default>
        ret = <optimized out>
        parent = 0x47ccd20 [GstGhostPad|src]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#27 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x482c140 [GstPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x47cec80 [GstProxyPad|proxypad139]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#28 0x00007f679f805f12 in gst_pad_push (pad=0x482c140 [GstPad|src], buffer=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#29 0x00007f679f90f577 in gst_base_transform_chain (pad=<optimized out>, parent=0x4822340 [GstVideoConvert|conv2], buffer=<optimized out>) at gstbasetransform.c:2330
        position_out = <optimized out>
        trans = 0x4822340 [GstVideoConvert|conv2]
        klass = 0x44e4020
        priv = 0x4822270
        ret = <optimized out>
        position = 18446744073709551615 [99:99:99.999999999]
        timestamp = <optimized out>
        duration = <optimized out>
        outbuf = 0x4c987e0 [GstBuffer]
        __PRETTY_FUNCTION__ = "gst_base_transform_chain"
#30 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x482c390 [GstPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f90f400 <gst_base_transform_chain>
        ret = <optimized out>
        parent = 0x4822340 [GstVideoConvert|conv2]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#31 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x473bc90 [GstPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x482c390 [GstPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#32 0x00007f679f805f12 in gst_pad_push (pad=0x473bc90 [GstPad|src], buffer=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#33 0x00007f679f90f577 in gst_base_transform_chain (pad=<optimized out>, parent=0x4741170 [GstVideoBalance|videobalance], buffer=<optimized out>) at gstbasetransform.c:2330
        position_out = <optimized out>
        trans = 0x4741170 [GstVideoBalance|videobalance]
        klass = 0x44de380
        priv = 0x47410a0
        ret = <optimized out>
        position = 18446744073709551615 [99:99:99.999999999]
        timestamp = <optimized out>
        duration = <optimized out>
        outbuf = 0x4c987e0 [GstBuffer]
        __PRETTY_FUNCTION__ = "gst_base_transform_chain"
#34 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x473ba40 [GstPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f90f400 <gst_base_transform_chain>
        ret = <optimized out>
        parent = 0x4741170 [GstVideoBalance|videobalance]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#35 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x482c5e0 [GstPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x473ba40 [GstPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#36 0x00007f679f805f12 in gst_pad_push (pad=0x482c5e0 [GstPad|src], buffer=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#37 0x00007f679f90f577 in gst_base_transform_chain (pad=<optimized out>, parent=0x4887eb0 [GstVideoScale|scale], buffer=<optimized out>) at gstbasetransform.c:2330
        position_out = <optimized out>
        trans = 0x4887eb0 [GstVideoScale|scale]
        klass = 0x44eb4b0
        priv = 0x4887de0
        ret = <optimized out>
        position = 18446744073709551615 [99:99:99.999999999]
        timestamp = <optimized out>
        duration = <optimized out>
        outbuf = 0x4c987e0 [GstBuffer]
        __PRETTY_FUNCTION__ = "gst_base_transform_chain"
#38 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x482c830 [GstPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f90f400 <gst_base_transform_chain>
        ret = <optimized out>
        parent = 0x4887eb0 [GstVideoScale|scale]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#39 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x482ccd0 [GstPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x482c830 [GstPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#40 0x00007f679f805f12 in gst_pad_push (pad=0x482ccd0 [GstPad|src], buffer=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#41 0x00007f679f90f577 in gst_base_transform_chain (pad=<optimized out>, parent=0x458acc0 [GstVideoConvert|conv], buffer=<optimized out>) at gstbasetransform.c:2330
        position_out = <optimized out>
        trans = 0x458acc0 [GstVideoConvert|conv]
        klass = 0x44e4020
        priv = 0x458abf0
        ret = <optimized out>
        position = 18446744073709551615 [99:99:99.999999999]
        timestamp = <optimized out>
        duration = <optimized out>
        outbuf = 0x4c987e0 [GstBuffer]
        __PRETTY_FUNCTION__ = "gst_base_transform_chain"
#42 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x482ca80 [GstPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f90f400 <gst_base_transform_chain>
        ret = <optimized out>
        parent = 0x458acc0 [GstVideoConvert|conv]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#43 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x47cea20 [GstProxyPad|proxypad138], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x482ca80 [GstPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#44 0x00007f679f805f12 in gst_pad_push (pad=pad@entry=0x47cea20 [GstProxyPad|proxypad138], buffer=buffer@entry=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#45 0x00007f679f7eb883 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x4c987e0 [GstBuffer]) at gstghostpad.c:127
        res = <optimized out>
        internal = 0x47cea20 [GstProxyPad|proxypad138]
        __func__ = "gst_proxy_pad_chain_default"
#46 0x00007f679f7fcb3d in gst_pad_chain_data_unchecked (pad=pad@entry=0x47ccaa0 [GstGhostPad|sink], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4327
        chainfunc = 0x7f679f7eb7f0 <gst_proxy_pad_chain_default>
        ret = <optimized out>
        parent = 0x45d22f0 [GstPlaySinkVideoConvert|vconv]
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_chain_data_unchecked"
#47 0x00007f679f7feca9 in gst_pad_push_data (pad=pad@entry=0x473b350 [GstPad|src], type=type@entry=4112, data=data@entry=0x4c987e0) at gstpad.c:4583
        peer = 0x47ccaa0 [GstGhostPad|sink]
        ret = GST_FLOW_OK
        handled = 0
        __PRETTY_FUNCTION__ = "gst_pad_push_data"
#48 0x00007f679f805f12 in gst_pad_push (pad=0x473b350 [GstPad|src], buffer=buffer@entry=0x4c987e0 [GstBuffer]) at gstpad.c:4702
        res = <optimized out>
        __func__ = "gst_pad_push"
#49 0x00007f671a6bc6a3 in gst_queue_push_one (queue=0x44d3810 [GstQueue|vqueue]) at gstqueue.c:1384
        buffer = 0x4c987e0 [GstBuffer]
        data = <optimized out>
        is_list = <optimized out>
        result = GST_FLOW_OK
        __PRETTY_FUNCTION__ = "gst_queue_push_one"
        queue = 0x44d3810 [GstQueue|vqueue]
        ret = <optimized out>
        __PRETTY_FUNCTION__ = "gst_queue_loop"
#50 gst_queue_loop (pad=<optimized out>) at gstqueue.c:1537
        queue = 0x44d3810 [GstQueue|vqueue]
        ret = <optimized out>
        __PRETTY_FUNCTION__ = "gst_queue_loop"
#51 0x00007f679f834927 in gst_task_func (task=0x4826950 [GstTask|vqueue:src]) at gsttask.c:328
        lock = 0x473b3c0
        tself = 0x47dd120
        priv = 0x4826900
        __PRETTY_FUNCTION__ = "gst_task_func"
#52 0x00007f679eeeb0f4 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:354
        task = 0x4715610
        pool = <optimized out>
#53 0x00007f679eeea7f2 in g_thread_proxy (data=0x47dd120) at ../glib/gthread.c:807
        thread = 0x47dd120
        __func__ = "g_thread_proxy"
#54 0x00007f679ff51432 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140079863068416, 324295936973853109, 140079873548110, 140079873548111, 140079873548256, 140079863068416, -410419535352573515, -410075481890631243}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#55 0x00007f679d954913 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 1 Michael Catanzaro 2020-07-26 13:37:20 PDT
(In reply to Michael Catanzaro from comment #0)
> I've hit this twice testing WebRTC in my Ephy jhbuild on
> https://meet.gnome.org (virtual GUADEC) after fixing bug #214806, but
> haven't figured out how to reproduce (hence no debug log). One time I think
> it happened when I tried to enable my video stream but then immediately
> afterwards cancelled it, but I failed to reproduce. 

Hit it a third time after closing a browser tab while it was running https://meet.gnome.org, but again I've failed to reproduce it. If I could reproduce, then I could try to get a GStreamer log.
Comment 2 Philippe Normand 2020-07-27 03:17:34 PDT
Did you enable the media-stream setting in Ephy? I'd advise not to, because that enables only access to capture devices currently, which isn't very useful without a working webrtc backend at runtime.

GStreamer is used in the libwebrtc backend for accessing capture devices, and also for some encoders and decoders. libwebrtc (when enabled) is mostly used for the peer-connection handling (ICE, networking, RTP payloading, depayloading, data channel, etc).
Comment 3 Jan-Michael Brummer 2020-07-27 03:51:03 PDT
I think we can assume that Michael enabled media-stream as otherwise it wouldn't be possible to join a webrtc session. And this is actually our goal:

Enable webrtc within Epiphany as MiniBrowser works fine here for GUADEC and jitsi sessions.
Comment 4 Philippe Normand 2020-07-27 04:18:09 PDT
It works in MiniBrowser built using developer build CMake configuration because that enables WebRTC indeed. 

LibWebRTC is not enabled in release tarballs for several reasons:

- possible licensing issue due to BoringSSL
- bundling libwebrtc in tarballs significantly increases the tgz size
- on embedded devices libwebrtc currently doesn't support hw-decoding / encoding
- there's no upstream alternative to libwebrtc yet. 

I have a downstream branch adding a gstwebrtc backend to WebKit but it's highly experimental currently...
Comment 5 Michael Catanzaro 2020-07-27 06:37:02 PDT
(In reply to Philippe Normand from comment #4)
> It works in MiniBrowser built using developer build CMake configuration
> because that enables WebRTC indeed. 

I built WebKit trunk with -DDEVELOPER_MODE=ON -DENABLE_EXPERIMENTAL_FEATURES=ON and then changed ephy-embed-prefs.c to force on enable-media-stream.
Comment 6 Michael Catanzaro 2020-07-27 06:38:41 PDT
(In reply to Philippe Normand from comment #2)
> Did you enable the media-stream setting in Ephy? I'd advise not to, because
> that enables only access to capture devices currently, which isn't very
> useful without a working webrtc backend at runtime.

So far, I've only done this locally for experimentation. Of course the goal is to do it for real. :)
Comment 7 Philippe Normand 2020-07-27 06:43:33 PDT
(In reply to Michael Catanzaro from comment #6)
> (In reply to Philippe Normand from comment #2)
> > Did you enable the media-stream setting in Ephy? I'd advise not to, because
> > that enables only access to capture devices currently, which isn't very
> > useful without a working webrtc backend at runtime.
> 
> So far, I've only done this locally for experimentation. Of course the goal
> is to do it for real. :)

What do you mean with "for real"?
Comment 8 Michael Catanzaro 2020-07-27 06:51:14 PDT
In production releases, for users. We'd need to talk about how to get there, but I have a strawman proposal in bug #214813 that might suffice until the gstwebrtc work is ready. We got quite excited yesterday when Jan-Michael revealed he was connected to our video call using WebKitGTK MiniBrowser, and then again a bit later when I got it working in my Ephy. ;) Asides from the crashes and lack of pipewire screen sharing, it works surprisingly well.

Alternatively, if you want us to wait until the gstwebrtc work is ready, we have a community of Ephy users willing to help test various video calling sites. Yesterday we tried Jitsi Meet (broken), Big Blue Button (works), and BlueJeans (we think it will work after bug #214811 and bug #214812 are fixed). TODO: test Google Meet.
Comment 9 Jan-Michael Brummer 2020-07-27 06:53:32 PDT
At least for me and exalm Jitsi Meet worked fine.
Comment 10 Philippe Normand 2020-07-27 07:04:52 PDT
(In reply to Michael Catanzaro from comment #8)
> In production releases, for users. We'd need to talk about how to get there,
> but I have a strawman proposal in bug #214813 that might suffice until the
> gstwebrtc work is ready. We got quite excited yesterday when Jan-Michael
> revealed he was connected to our video call using WebKitGTK MiniBrowser, and
> then again a bit later when I got it working in my Ephy. ;) Asides from the
> crashes and lack of pipewire screen sharing, it works surprisingly well.
> 
> Alternatively, if you want us to wait until the gstwebrtc work is ready, we
> have a community of Ephy users willing to help test various video calling
> sites. Yesterday we tried Jitsi Meet (broken), Big Blue Button (works), and
> BlueJeans (we think it will work after bug #214811 and bug #214812 are
> fixed). TODO: test Google Meet.

I've been thinking about maintaining a flatpak browser app including my branch actually... but as this would be yet another hobby project for me, it's not very high priority, I try to do other things during my weekends :(
Comment 11 Jan-Michael Brummer 2020-07-27 08:13:41 PDT
FTR: Google Hangouts & Meets are working fine as well.

Is there something we can do in the meantime to enable it until the gst part is ready?
Comment 12 Jan-Michael Brummer 2020-07-28 07:30:04 PDT
@Philippe: I tried your current gstwebrtc-2020 branch and it works somehow. I can join my meetings but audio is delayed and during session hangup MiniBrowser freezed once. But overall this work is impressive as the cpu load is much lower at the moment (due to audio?). master branch ~ 150%, your branch ~ 55%. Keep going :)
Comment 13 Michael Catanzaro 2020-07-28 08:14:04 PDT
Anyway we are getting a bit off topic here. Let's continue general WebRTC discussion in bug #214813, which exists to explore whether we can expose the current libwebrtc implementation or not. Let's use this bug for the gst_buffer_map_range() crash.
Comment 14 Philippe Normand 2020-07-28 08:37:02 PDT
What is this GStreamer version anyway?

Looks like the GstMemory data points to some JS code, WTF?
Comment 15 Michael Catanzaro 2020-07-28 08:45:21 PDT
(In reply to Philippe Normand from comment #14)
> What is this GStreamer version anyway?

gstreamer1-1.16.2-2.fc32

> Looks like the GstMemory data points to some JS code, WTF?

Memory corruption?
Comment 16 Philippe Normand 2020-07-28 09:00:00 PDT
Maybe having https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/a91ab7908955aa57f4c9ca52765d7cbe1cf5e71f would help... It is in the 1.16 branch but not in any 1.16 release yet.
Comment 17 Philippe Normand 2020-08-14 02:46:48 PDT
Is this still an issue after patching gst-plugins-base?
Comment 18 Michael Catanzaro 2020-08-14 08:10:00 PDT
Problem is I don't know a way to reproduce this one. Sometimes I saw it several times in a row but other times I went half an hour or more without hitting this crash. I don't think we can be confident whether this is fixed or not until we do way more testing than I'm able to volunteer....