Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

kurento crash #615

Open
logcy opened this issue Dec 5, 2021 · 1 comment
Open

kurento crash #615

logcy opened this issue Dec 5, 2021 · 1 comment

Comments

@logcy
Copy link

logcy commented Dec 5, 2021

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

Issue description

When I used kurento for stress testing, I found that kurento would crash randomly

I looked at the core log and found that it was retry = !sinkLock.try_lock_for (millisRand ()); this line of code went down

How can is fix this bug?

Context

[New LWP 13703]
[New LWP 28121]
[New LWP 8369]
[New LWP 6204]
[New LWP 30445]
[New LWP 13553]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/kurento-media-server /bin/bash'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __GI_abort () at abort.c:125
125 abort.c: No such file or directory.
[Current thread is 1 (Thread 0x7f6ffef05700 (LWP 19672))]
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0x00007f72e20d61a6 in __GI_abort () at abort.c:125
#1 0x000055f415544769 in Debug::DeathHandler::SignalHandler(int, void*, void*) () at /build/server/death_handler.cpp:299
#2 0x000055f415544769 in Debug::DeathHandler::SignalHandler(int, void*, void*) (sig=, secret=)
at /build/server/death_handler.cpp:600
#3 0x00007f72e4b4e390 in () at /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f72e4b47672 in pthread_mutex_timedlock () at /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f72e3678a20 in __gthread_mutex_timedlock(__gthread_mutex_t*, __gthread_time_t const*) (__mutex=0x208, __abs_timeout=0x7f6ffef02c30)
at /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:768
#6 0x00007f72e369a773 in std::__timed_mutex_implstd::recursive_timed_mutex::_M_try_lock_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x208, __atime=...)
at /usr/include/c++/5/mutex:234
#7 0x00007f72e3696454 in std::__timed_mutex_implstd::recursive_timed_mutex::_M_try_lock_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x208, __atime=...) at /usr/include/c++/5/mutex:242
#8 0x00007f72e3690afc in std::__timed_mutex_implstd::recursive_timed_mutex::_M_try_lock_for<long, std::ratio<1l, 1000l> >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) (this=0x208, __rtime=...) at /usr/include/c++/5/mutex:217
#9 0x00007f72e368c8bb in std::recursive_timed_mutex::try_lock_for<long, std::ratio<1l, 1000l> >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) (this=0x208, __rtime=...) at /usr/include/c++/5/mutex:332
#10 0x00007f72e3688efa in std::unique_lockstd::recursive_timed_mutex::try_lock_for<long, std::ratio<1l, 1000l> >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) (this=0x7f6ffef02df0, __rtime=...) at /usr/include/c++/5/mutex:529
#11 0x00007f72e36793bb in kurento::_media_element_pad_added(_GstElement*, GstPad*, void*) (elem=0x7f72ba1f61e0 [KmsRtpEndpoint], pad=0x7f54a0a58540 [GstGhostPad], data=0x7f54eef1b700) at /webapps/kms-omni-build/kms-omni-build/kms-core/src/server/implementation/objects/MediaElementImpl.cpp:311
#12 0x00007f72e3d22057 in g_cclosure_marshal_VOID__OBJECTv (closure=0x7f54edfa0cf0, return_value=, instance=, args=, marshal_data=0x0, n_params=, param_types=0x55f416e4bc10) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gmarshal.c:2102
#13 0x00007f72e3d1f184 in g_closure_invoke_va (closure=closure@entry=0x7f54edfa0cf0, return_value=return_value@entry=0x0, instance=instance@entry=0x7f72ba1f61e0, args=args@entry=0x7f6ffef031a0, n_params=, param_types=0x55f416e4bc10) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gclosure.c:867
#14 0x00007f72e3d39986 in g_signal_emit_valist (instance=0x7f72ba1f61e0, signal_id=, detail=0, var_args=var_args@entry=0x7f6ffef031a0)
at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3295
#15 0x00007f72e3d3a06f in g_signal_emit (instance=instance@entry=0x7f72ba1f61e0, signal_id=, detail=detail@entry=0)
at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3442
#16 0x00007f72e3fb8008 in gst_element_add_pad (element=0x7f72ba1f61e0 [KmsRtpEndpoint], pad=0x7f54a0a58540 [GstGhostPad]) at gstelement.c:704
#17 0x00007f72e10cfb65 in kms_element_add_src_pad (self=0x7f72ba1f61e0 [KmsRtpEndpoint], element=0x7f7104c61550 [KmsAgnosticBin2], pad_name=0x7f727e0f6260 "audio_src_default_0", templ_name=0x7f72e10eca80 "audio_src
%s
%u") at /webapps/kms-omni-build/kms-omni-build/kms-core/src/gst-plugins/commons/kmselement.c:498
#18 0x00007f72e10cfcb4 in kms_element_create_pending_src_pads (self=0x7f72ba1f61e0 [KmsRtpEndpoint], type=KMS_ELEMENT_PAD_TYPE_AUDIO, description=0x7f72e10ed24---Type to continue, or q to quit---
3 "default", element=0x7f7104c61550 [KmsAgnosticBin2]) at /webapps/kms-omni-build/kms-omni-build/kms-core/src/gst-plugins/commons/kmselement.c:535
#19 0x00007f72e10d07f7 in kms_element_get_output_element (self=0x7f72ba1f61e0 [KmsRtpEndpoint], pad_type=KMS_ELEMENT_PAD_TYPE_AUDIO, description=0x0)
at /webapps/kms-omni-build/kms-omni-build/kms-core/src/gst-plugins/commons/kmselement.c:787
#20 0x00007f72e10d08da in kms_element_get_audio_output_element (self=0x7f72ba1f61e0 [KmsRtpEndpoint], description=0x0)
at /webapps/kms-omni-build/kms-omni-build/kms-core/src/gst-plugins/commons/kmselement.c:821
#21 0x00007f72e10c735c in kms_base_rtp_endpoint_rtpbin_pad_added (rtpbin=0x7f713a77ae90 [GstRtpBin], pad=0x7f72a2898050 [GstGhostPad], self=0x7f72ba1f61e0 [KmsRtpEndpoint]) at /webapps/kms-omni-build/kms-omni-build/kms-core/src/gst-plugins/commons/kmsbasertpendpoint.c:1942
#22 0x00007f72e3d22057 in g_cclosure_marshal_VOID__OBJECTv (closure=0x7f54efc9f290, return_value=, instance=, args=, marshal_data=0x0, n_params=, param_types=0x55f416e4bc10) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gmarshal.c:2102
#23 0x00007f72e3d1f184 in _g_closure_invoke_va (closure=closure@entry=0x7f54efc9f290, return_value=return_value@entry=0x0, instance=instance@entry=0x7f713a77ae90, args=args@entry=0x7f6ffef03710, n_params=, param_types=0x55f416e4bc10) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gclosure.c:867
#24 0x00007f72e3d39986 in g_signal_emit_valist (instance=0x7f713a77ae90, signal_id=, detail=0, var_args=var_args@entry=0x7f6ffef03710)
at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3295
#25 0x00007f72e3d3a06f in g_signal_emit (instance=instance@entry=0x7f713a77ae90, signal_id=, detail=detail@entry=0)
at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3442
#26 0x00007f72e3fb8008 in gst_element_add_pad (element=0x7f713a77ae90 [GstRtpBin], pad=0x7f72a2898050 [GstGhostPad]) at gstelement.c:704
#27 0x00007f72e1787e40 in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#28 0x00007f72e17878ab in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#33 0x00007f72e3d3a06f in <emit signal ??? on instance 0x7f71e4068000 [GstRtpPtDemux]> (instance=instance@entry=0x7f71e4068000, signal_id=, detail=detail@entry=0) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3442
#29 0x00007f72e3d1f779 in g_cclosure_marshal_generic (closure=0x7f717e68dd40, return_gvalue=0x0, n_param_values=, param_values=0x7f6ffef03c60, invocation_hint=, marshal_data=0x0) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gclosure.c:1490
#30 0x00007f72e3d1ef55 in g_closure_invoke (closure=0x7f717e68dd40, return_value=return_value@entry=0x0, n_param_values=3, param_values=param_values@entry=0x7f6ffef03c60, invocation_hint=invocation_hint@entry=0x7f6ffef03be0) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gclosure.c:804
#31 0x00007f72e3d30f71 in signal_emit_unlocked_R (node=node@entry=0x7f7280015330, detail=detail@entry=0, instance=instance@entry=0x7f71e4068000, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7f6ffef03c60)
at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3630
#32 0x00007f72e3d39d3c in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7f6ffef03e40) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./gobject/gsignal.c:3386
#34 0x00007f72ca78fab8 in gst_rtp_pt_demux_chain (pad=, parent=0x7f71e4068000 [GstRtpPtDemux], buf=0x7f710c7c2670) at gstrtpptdemux.c:413
#35 0x00007f72e3fd05cf in gst_pad_push_data (data=0x7f710c7c2670, type=4112, pad=0x7f72b294fd80 [GstPad]) at gstpad.c:4183
#36 0x00007f72e3fd05cf in gst_pad_push_data (pad=pad@entry=0x7f70b8884030 [GstPad], type=type@entry=4112, data=data@entry=0x7f710c7c2670) at gstpad.c:4435
#37 0x00007f72e3fd8533 in gst_pad_push (pad=0x7f70b8884030 [GstPad], buffer=buffer@entry=0x7f710c7c2670) at gstpad.c:4554
#38 0x00007f72ca7899f0 in pop_and_push_next (jitterbuffer=jitterbuffer@entry=0x7f72744c5a80 [GstRtpJitterBuffer], seqnum=0) at gstrtpjitterbuffer.c:3058
---Type to continue, or q to quit---
#39 0x00007f72ca78aa1a in gst_rtp_jitter_buffer_loop (jitterbuffer=0x7f72744c5a80 [GstRtpJitterBuffer]) at gstrtpjitterbuffer.c:3157
#40 0x00007f72ca78aa1a in gst_rtp_jitter_buffer_loop (jitterbuffer=0x7f72744c5a80 [GstRtpJitterBuffer]) at gstrtpjitterbuffer.c:3593
#41 0x00007f72e4002c5b in gst_task_func (task=0x7f71c416f830 [GstTask]) at gsttask.c:344
#42 0x00007f72e3a6f6be in g_thread_pool_thread_proxy (data=) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./glib/gthreadpool.c:307
#43 0x00007f72e3a6ed25 in g_thread_proxy (data=0x7f72b0ae72d0) at /build/glib2.0-XBSKIw/glib2.0-2.48.2/./glib/gthread.c:780
#44 0x00007f72e4b446ba in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#45 0x00007f72e21a64dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

How to reproduce?

Expected & current behavior

(Optional) Possible solution

Info about your environment

About Kurento Media Server

About your Application Server

  • Programming Language:
  • Kurento Client version:

About end-user clients

  • Device(s):
  • OS(es):
  • Browser(s):

Run these commands

cat /etc/lsb-release
kurento-media-server --version
dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'
@github-actions
Copy link

github-actions bot commented Dec 5, 2021

Hello @logcy! 👋 we're sorry you found a bug... so first of all, thank you very much for reporting it.

To know about progress, check in Triage. All issues are considered Backlog Candidates until work priorities align and the issue is selected for development. It will then become part of our official Backlog.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant