Closed miroslavpejic85 closed 4 months ago
As @snnz said in the forum, this looks like the culprit:
https://mediasoup.discourse.group/t/mediasoup-worker-died-exiting-in-2-seconds/6035/7
It looks like after this commit 1 IceServer::OnTimer may end up calling IceServer::RemoveTuple, in the same way IceServer::~IceServer does.
I am on it.
@miroslavpejic85, PR here: https://github.com/versatica/mediasoup/pull/1393
However I may need your help if possible. Let's please follow up here in the PR: https://github.com/versatica/mediasoup/pull/1393#issuecomment-2100882064
Bug Report
System Information and Environment:
For reference: mediasoup.discourse.group
Issue Description:
Since upgrading to Mediasoup version
3.14.5
, our system has encountered frequent instances of Mediasoup workers terminating unexpectedly. This behavior is indicated by the messageMediasoup worker died, exiting in 2 seconds...
.Troubleshooting Steps:
Following the documentation, we managed obtained a core dump of the worker, which will be provided as an attachment for further analysis.
(gdb) bt
```bash (gdb) bt #0 0x000055604c64eb58 in RTC::TransportTuple::GetProtocol (this=0x556518627283) at ../../../include/RTC/TransportTuple.hpp:92 #1 0x000055604c766313 in RTC::WebRtcTransport::OnIceServerTupleRemoved (this=0x55604e65a2b0, tuple=0x556518627283) at ../../../src/RTC/WebRtcTransport.cpp:1183 #2 0x000055604c64ef97 in RTC::IceServer::OnTimer (this=0x55604e615820, timer=0x55604e67fa90) at ../../../src/RTC/IceServer.cpp:935 #3 0x000055604c5ff52e in TimerHandle::OnUvTimer (this=0x55604e67fa90) at ../../../src/handles/TimerHandle.cpp:162 #4 0x000055604c5fe87b in onTimer (handle=0x55604e692230) at ../../../src/handles/TimerHandle.cpp:13 #5 0x000055604cb49005 in uv__run_timers (loop=0x55604e53bff0) at ../../../subprojects/libuv-v1.48.0/src/timer.c:193 #6 0x000055604cb4ec72 in uv_run (loop=0x55604e53bff0, mode=UV_RUN_DEFAULT) at ../../../subprojects/libuv-v1.48.0/src/unix/core.c:466 #7 0x000055604c5cda83 in DepLibUV::RunLoop () at ../../../src/DepLibUV.cpp:98 #8 0x000055604c5e06ed in Worker::Worker (this=0x7fff8c7dd100, channel=0x55604e53c5d0) at ../../../src/Worker.cpp:56 #9 0x000055604c5c3414 in mediasoup_worker_run (argc=16, argv=0x7fff8c7dd348, version=0x7fff8c7dd200 "3.14.5", consumerChannelFd=3, producerChannelFd=4, channelReadFn=0x0, channelReadCtx=0x0, channelWriteFn=0x0, channelWriteCtx=0x0) at ../../../src/lib.cpp:142 #10 0x000055604c80ed5f in main (argc=16, argv=0x7fff8c7dd348) at ../../../src/main.cpp:25 ```
(gdb) bt full
```bash #0 0x000055604c64eb58 in RTC::TransportTuple::GetProtocol (this=0x556518627283) at ../../../include/RTC/TransportTuple.hpp:92 No locals. #1 0x000055604c766313 in RTC::WebRtcTransport::OnIceServerTupleRemoved (this=0x55604e65a2b0, tuple=0x556518627283) at ../../../src/RTC/WebRtcTransport.cpp:1183 No locals. #2 0x000055604c64ef97 in RTC::IceServer::OnTimer (this=0x55604e615820, timer=0x55604e67fa90) at ../../../src/RTC/IceServer.cpp:935 storedTuple = 0x556518627283 it =