Exiting jami-qt segfaults (SIGSEGV) when the LRC is built with -DENABLE_LIBWRAP=true
EDIT: This original finding no longer holds for version 20210606.1.e2f9490. The only crash now seems to be upon exiting jami-qt. See the 2nd comment.
I found this issue building with the recently released 20210326.1.cfba013 code.
Adding -DENABLE_LIBWRAP=true
as a CMake option would cause the following segfault when attempting to do a video call:
[1617377403.268|27762|manager.cpp :2989 ] Did not find conference 7014912808852927
[1617377403.300|28030|accel.cpp :180 ] Device type vaapi successfully created.
[1617377403.300|28030|accel.cpp :213 ] -- Init passed for vaapi with default device.
[1617377403.303|28030|media_decoder.cpp :489 ] Using hardware decoding for h264 with vaapi
[1617377403.303|28030|media_decoder.cpp :496 ] Decoding video using H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (h264)
[1617377403.303|28030|sinkclient.cpp :191 ] ShmHolder[Jami Daemon_shm_27762_1]: new sizes: f=0, a=103
[1617377403.303|28030|sinkclient.cpp :158 ] ShmHolder: new holder 'Jami Daemon_shm_27762_1'
[1617377403.303|28030|sinkclient.cpp :429 ] Start sink <7014912808852927 / Jami Daemon_shm_27762_1>, size=1280x720, mixer=0
[1617377403.303|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.304|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.305|28030|accel.cpp :151 ] Found compatible hardware format for h264 decoder with vaapi
[1617377403.305|28030|media_decoder.cpp :568 ] Decoding error falling back to software
[New Thread 0x7fff21283700 (LWP 28061)]
[Thread 0x7fff23c87700 (LWP 28057) exited]
[Thread 0x7fff22c85700 (LWP 28059) exited]
[Thread 0x7fff22484700 (LWP 28060) exited]
[Thread 0x7fff23486700 (LWP 28058) exited]
[1617377403.388|28030|media_decoder.cpp :496 ] Decoding video using H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (h264)
[1617377403.388|28030|media_decoder.cpp :506 ] Not using hardware decoding for h264
[New Thread 0x7fff22484700 (LWP 28062)]
[New Thread 0x7fff22c85700 (LWP 28063)]
[1617377403.391|27811|sipcall.cpp :419 ] Sending video keyframe request via SIP INFO
[1617377403.540|28030|sinkclient.cpp :191 ] ShmHolder[Jami Daemon_shm_27762_1]: new sizes: f=3686400, a=7372903
--Type <RET> for more, q to quit, c to continue without paging--c
Thread 1 "..jami-qt-real-" received signal SIGSEGV, Segmentation fault.
0x00007fffeeab4710 in __memmove_ssse3 () from /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib/libc.so.6
(gdb) bt
#0 0x00007fffeeab4710 in __memmove_ssse3 () from /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib/libc.so.6
#1 0x0000000000452d3d in FrameWrapper::slotFrameUpdated(QString const&) ()
#2 0x00007fffef105914 in void doActivate<false>(QObject*, int, void**) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#3 0x00007ffff7d93c55 in lrc::api::AVModel::frameUpdated(QString const&) () from /gnu/store/3scnwm1jlhpxii7261p6zifbj1r9a1ah-libringclient-20210326.1.cfba013/lib/libringclient.so.1.0.0
#4 0x00007fffef0fc763 in QObject::event(QEvent*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#5 0x00007ffff7155c3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Widgets.so.5
#6 0x00007ffff715c57f in QApplication::notify(QObject*, QEvent*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Widgets.so.5
#7 0x00007fffef0ca373 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#8 0x00007fffef0cd521 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#9 0x00007fffef129d53 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#10 0x00007ffff769908a in g_main_context_dispatch () from /gnu/store/1m34rwlhv2pyjbp69n63grlncnkjyi31-glib-2.62.6/lib/libglib-2.0.so.0
#11 0x00007ffff7699288 in g_main_context_iterate.isra () from /gnu/store/1m34rwlhv2pyjbp69n63grlncnkjyi31-glib-2.62.6/lib/libglib-2.0.so.0
#12 0x00007ffff769930c in g_main_context_iteration () from /gnu/store/1m34rwlhv2pyjbp69n63grlncnkjyi31-glib-2.62.6/lib/libglib-2.0.so.0
#13 0x00007fffef12944c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#14 0x00007fffef0c8d2a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#15 0x00007fffef0d1e53 in QCoreApplication::exec() () from /gnu/store/sbf77k7xzwhkx4ygqjzgkviz9vy4qhf6-qtbase-5.15.2/lib/libQt5Core.so.5
#16 0x00000000004280a6 in main ()
Simply setting this option to false resolves the issue (no longer segfaults and the video call proceeds normally).
Interestingly, audio calls are not affected and the jami-qt client works normally otherwise.
Edited by Maxim Cournoyer