microdns: gst-device-monitor-1.0 from current build Seg Faults always
Describe your issue
I have been trying to get a pipeline working with rtpjitterbuffer included (works without) and noticed occasional seg faults. Then I noticed that gst-device-monitor-1.0 seg faults every time on 2 different Macbooks with a different configuration of devices. It happens with or without command line args.
Observed Behavior
Each run of gst-device-monitor-1.0 ends with Segmentation Fault: 11.
Note that it seems to report all the devices correctly, it seems it is just the teardown that is faulting.
On further digging, it is pthread_mutex_lock that is returning an error, and Glib is bailing using g_abort (which is just a wrapper around abort()) which leads to the failure. See the stack trace below. I suspect the mutex being passed is bad? I'm a rank beginner w/ GStreamer so I've taken this about as far as I can. Happy to try things here.
Setup
- Macox 10.15.7 Catalina:
- Device: Computer - Macbook Pro
- GStreamer Version: git/main top of tree (42c1bcb0)
- Command line: $ gst-device-monitor-1.0
Build using meson, as follows:
$ export PKG_CONFIG=false
$ export CMAKE=false
Build Options: -Dgpl=enabled -DFFmpeg:version3=enabled -DFFmpeg:nonfree=enabled -Dprefix=/Users/chris/gstreamer-install
Then I installed using meson install
to the location --prefix above. I am not using the devenv. (As I was typing this, I verified that I can reproduce the issue using devenv as well.)
Steps to reproduce the bug
- open terminal (default system env)
- type <
path/to/gst-device-monitor-1.0
>
How reproducible is the bug?
Always
Screenshots if relevant
Solutions you have tried
Tried two different Macbooks, with different device configurations, both running top of tree.
Related non-duplicate issues
N/A
Additional Information
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
* frame #0: 0x00007fff6da105ad libsystem_pthread.dylib
pthread_mutex_lock`
frame #1: 0x00000001001a9fd7 libglib-2.0.0.dylib
g_mutex_lock(mutex=0x000000010350ace0) at gthread-posix.c:222:6 [opt]`
frame #2: 0x00000001026e65dc libgstmicrodns.dylib
gst_mdns_device_provider_stop(provider=) at gstmicrodnsdevice.c:406:3 [opt]`
frame #3: 0x000000010035c81b libgstreamer-1.0.0.dylib
gst_device_provider_stop(provider=0x000000010100b190) at gstdeviceprovider.c:536:7 [opt]`
frame #4: 0x000000010036e7eb libgstreamer-1.0.0.dylib
gst_device_monitor_stop(monitor=0x0000000101816740) at gstdevicemonitor.c:578:5 [opt]`
frame #5: 0x0000000100002e6e gst-device-monitor-1.0
main(argc=1, argv=0x00007ffeefbff958) at gst-device-monitor.c:393:3 [opt]`
frame #6: 0x00007fff6d810cc9 libdyld.dylib
start + 1`
frame #7: 0x00007fff6d810cc9 libdyld.dylib
start + 1`
(lldb)