versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.14k stars 1.12k forks source link

mediasoup-rs segfault #1446

Closed PaulOlteanu closed 3 days ago

PaulOlteanu commented 1 month ago

Bug Report

Your environment

Issue description

Got a segfault in prod from mediasoup. We've been running this version for a while without seeing any segfaults (and I've only seen this once).

(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x0000aaaabe85773c in RTC::Router::OnTransportProducerNewRtpStream(RTC::Transport*, RTC::Producer*, RTC::RtpStreamRecv*, unsigned int) ()
No symbol table info available.
#2  0x0000aaaabead1588 in RTC::Producer::ReceiveRtpPacket(RTC::RtpPacket*) ()
No symbol table info available.
#3  0x0000aaaabe86b884 in RTC::Transport::ReceiveRtpPacket(RTC::RtpPacket*) ()
No symbol table info available.
#4  0x0000aaaabe892a0c in RTC::WebRtcTransport::OnRtpDataReceived(RTC::TransportTuple*, unsigned char const*, unsigned long) ()
No symbol table info available.
#5  0x0000aaaabe88736c in RTC::WebRtcServer::OnUdpSocketPacketReceived(RTC::UdpSocket*, unsigned char const*, unsigned long, sockaddr const*) ()
No symbol table info available.
#6  0x0000aaaabe814e2c in uv.udp_recvmmsg ()
No symbol table info available.
#7  0x0000aaaabe8158b0 in uv.udp_io ()
No symbol table info available.
#8  0x0000aaaabe818928 in uv.io_poll ()
No symbol table info available.
#9  0x0000aaaabe80c3f4 in uv_run ()
No symbol table info available.
#10 0x0000aaaabe81c38c in DepLibUV::RunLoop() ()
No symbol table info available.
#11 0x0000aaaabe827054 in Worker::Worker(Channel::ChannelSocket*) ()
No symbol table info available.
#12 0x0000aaaabe81af44 in mediasoup_worker_run ()
No symbol table info available.
#13 0x0000aaaabe29431c in std::sys_common::backtrace::__rust_begin_short_backtrace::h7dabe81003d8f4dc ()
No symbol table info available.
#14 0x0000aaaabe29b238 in core::ops::function::FnOnce::call_once{{vtable.shim}}::h0c06aa91d47f2cb3 ()
No symbol table info available.
#15 0x0000aaaabf4ac774 in std::sys::pal::unix::thread::Thread::new::thread_start::h019c418e2ea6211c ()
No symbol table info available.
#16 0x0000ffffbb4cee58 in start_thread (arg=0xffffcb02e837) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = 0xffffcb02e837
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {281473761895872, 281474087708912, 281474087708726, 0, 1662592, 281474087708727, 281473760231424, 281473761895872, 281473760231424, 281473761897728, 281473761893728, 9144509796762608023, 0, 9144509796975038515, 0, 0, 0, 0, 0, 0, 
                0, 0}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#17 0x0000ffffbb537f9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79
No locals.
ibc commented 1 month ago

Didn't you get any error log immediately before the "worker died" log?

PaulOlteanu commented 1 month ago

No, I actually don't even see the "worker died" log (I do know what log you're talking about - I've seen it in the past). It's possible it's missing from our logs but unfortunately all I can provide right now is that core dump.

nazar-pc commented 1 month ago

I don't think you'll see any logs after segfault since it runs in the same process

ibc commented 4 days ago

I don't think we have anything to investigate here and we cannot have non actionable bugs forever open here.

PaulOlteanu commented 3 days ago

Yeah no problem. I haven't seen this happen again anyway, I'll just reopen if it ever happens again and I get more details.