The program crash when calling ZoomVideoService::ReleaseSDK

On Ubuntu 20.04, I developed a video software base on VideoSDK. When I want to release SDK, the program stucked. Here is the stack trace for analysis. Would you help me to analyze it?

#0 0x00007ffff6f19aff in __GI___poll (fds=0x7fffffffc1c0, nfds=1, timeout=-1) at …/sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fffc9cbfa3c in ssb::notifier_pipe_t::wait(int, bool) () from lib/
#2 0x00007fffc9ca4f7b in ssb::msg_queue_t::send_msg(ssb::msg_it*, ssb::msg_queue_sink_it*, int) () from lib/
#3 0x00007fffc9caf94a in ssb::thread_wrapper_t::stop() () from lib/
#4 0x00007fffc9cafba7 in ssb::thread_io_t::stop() () from lib/
#5 0x00007fffc9cb32e1 in ssb::thread_mgr_t::stop_threads_by_type(unsigned int) () from lib/
#6 0x00007fffc9c134ca in ssb::dns_provider_t::stop() () from lib/
#7 0x00007fffc9bfb90e in tp_uninit () from lib/
#8 0x00007fffc8d45ed5 in CSBWebServiceModuleClient::~CSBWebServiceModuleClient() () from lib/
#9 0x00007fffc8d45fe9 in CSBWebServiceModuleClient::~CSBWebServiceModuleClient() () from lib/
#10 0x00007fffc8d45b2b in TermWebServiceModule () from lib/
#11 0x00007fffc82afa4a in ZOOMLITESDK::iOSZoomRTCModuleMgr::UnloadInternal(bool) () from lib/
#12 0x00007fffc82ae4a3 in ZOOMLITESDK::CZoomRTCModuleMgr::Unload(bool) () from lib/
#13 0x00007fffc82a385c in ZOOMLITESDK::CZoomLITESDKContext::Uninit() () from lib/
#14 0x00007fffc82a0aeb in ZOOMLITESDK::CZoomRTCMgr::Shutdown(bool) () from lib/
#15 0x00007fffc82a0c30 in ZOOMLITESDK::CZoomRTCMgr::Cleanup() () from lib/
#16 0x00007fffc829484b in ZOOMVIDEOSDK::ZoomVideoSDK::UNInitialize() () from lib/
#17 0x00007fffc8296fb2 in ZOOMVIDEOSDK::ZoomVideoSDK::~ZoomVideoSDK() () from lib/
#18 0x00007fffc8297159 in ZOOMVIDEOSDK::ZoomVideoSDK::~ZoomVideoSDK() () from lib/
#19 0x00007fffc8298e06 in DestroyZoomVideoSDKObj () from lib/
#20 0x00007fffd3bacf2a in ZoomVideoService::ReleaseSDK() () from lib/
#21 0x00007fffd3b82219 in ReleaseResourceService::ReleaseResourceService(QObject*) () from lib/

@ chunsiong.zoom Would you help me to analyze it?

@Wang ,

I’m in midst of publishing a sample app for Video SDK Linux, I’ll tag you when it is published

Thank you very much!

The SDK version is 1.8.10. And there is another case, when I call joinSession, don’t wait for onSessionJoin event then call leaveSession(true) and DestoryZoomVideoSDKObj(), it will receive SIGSEGV.

By the way, the Qt version is 5.15.2

@Wang ,

I’ve just published the sample app, could you check it out here?

Thank you! I will try run this sample, and then replies you to confirm the result.

I have studied this demo, the process is consistent with my App, but my audio and video function is only a sub-function of the original App. When I exit this sub-function, the DestroyZoomVideoSDKObj is called, and there is a 1/20 chance that I get stuck inside the SDK ssb::notifier_pipe_t::wait.

@Wang , what you say subfunction, do you mean it is running on a different thread?

@ chunsiong.zoom Create ZoomSDK object, join session, leave session and destroy SDK object all run on main thread

@Wang try to run the cleanup function first, then destroysdkobject function

I’ve tried to test it 25 times, and I’ve stuck once and crashed four times. Please also help analyze and locate the problem.
The crash stack is as follows:

Core was generated by `./zoom_v-sdk_linux_bot’.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f6313d681ca in ssb::thread_mgr_t::find_by_type(unsigned int) const () from
[Current thread is 1 (Thread 0x7f630b05c9c0 (LWP 8888))]
(gdb) bt
#0 0x00007f6313d681ca in ssb::thread_mgr_t::find_by_type(unsigned int) const () from
#1 0x00007f6313d68bbe in ssb::thread_mgr_t::stop_threads_by_type(unsigned int) () from
#2 0x00007f6313cc1c57 in ssb::dns_provider_t::~dns_provider_t() () from
#3 0x00007f6313cc1ce9 in ssb::dns_provider_t::~dns_provider_t() () from
#4 0x00007f6313caf894 in ssb::singleton_t<ssb::dns_provider_t, ssb::thread_mutex_recursive>::reset_all() () from
#5 0x00007f6313d5ef23 in ssb::singleton_life_t::cleanup() () from
#6 0x00007f6313d74913 in util_uninit () from
#7 0x00007f6313d74961 in sdk_global_exit () from
#8 0x00007f6312031ebc in ZOOMVIDEOSDK::ZoomVideoSDK::UNInitialize() () from
#9 0x00007f6312031ff9 in ZOOMVIDEOSDK::ZoomVideoSDK::cleanup() () from
#10 0x00005631524cb1bd in destroySDKObj () at /home/wangsheng/zoomvideodemo/videosdk-linux-raw-recording-sample-main/src/zoom_v-sdk_linux_bot.cpp:388
#11 0x00005631524d0958 in ZoomVideoSDKDelegate::onSessionLeave (this=0x56315430f220) at /home/wangsheng/zoomvideodemo/videosdk-linux-raw-recording-sample-main/src/zoom_v-sdk_linux_bot.cpp:130
#12 0x00007f6312031daf in ZOOMVIDEOSDK::ZoomVideoSDK::onConferenceLeftNotification() () from
#13 0x00007f6312054970 in ZOOMVIDEOSDK::CZoomLiteRTCConfStatusHandler::ProcConferenceLeftNotification(bool) () from
#14 0x00007f63120cc28b in ZMMeetingBridgeAsyncHelper::RunDelayTaskList(bool) () from
#15 0x00007f63120cc587 in non-virtual thunk to ZMMeetingBridgeAsyncHelper::OnTimer(void*, unsigned int, unsigned int, unsigned long) () from
#16 0x00007f6311fe31ee in Cmm::GLIBTimer_Notify(void*) () from
#17 0x00007f6310a6dbe8 in ?? () from /lib/x86_64-linux-gnu/
#18 0x00007f6310a6d04e in g_main_context_dispatch () from /lib/x86_64-linux-gnu/
#19 0x00007f6310a6d400 in ?? () from /lib/x86_64-linux-gnu/
#20 0x00007f6310a6d6f3 in g_main_loop_run () from /lib/x86_64-linux-gnu/
#21 0x00005631524cd3da in main (argc=1, argv=0x7ffe905fce18) at /home/wangsheng/zoomvideodemo/videosdk-linux-raw-recording-sample-main/src/zoom_v-sdk_linux_bot.cpp:680

@Wang could you capture the log using this?

  • How to enable SDK log

When initializing the SDK, set InitParam.enableLog to be true, then the log feature will be enabled, the default log size will be 5MB

ZoomVideoSDKInitParams initParam;
initParam.domain = L"";
initParam.enableLog = true;
  • Where to find SDK log
    • The SDK log files are encrypted files that end with the extension “.log”
    • Location: ~/.zoomvideosdk/logs or ~/.zoomsdk/logs/