Assert fail in webrtc::PacedSender::SetPacingRates
Bug Report
Your environment
- Operating system: CentOS 7.9
- Node version: v16.13.2
- npm version: 8.1.2
- gcc/clang version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
- mediasoup version: 3.9.6
- mediasoup-client version: 3.6.50
Issue description
I'm building an application where multiple peers could join into a room. Each peer has a send and receive transport. On the send transport there is a video producer, data producer and audio producer. On the receive transport there is a data consumer, and video + audio consumers for each other peer.
Sometimes on a test server which runs on a ppc64le architecture (a POWER9 processor) the worker process crashes when a peer with Safari (15.1) is involved. However when there are only Firefox and Chrome peers it works great.
This is what I see in the logs:
mediasoup:Consumer resume() +128ms
mediasoup:Channel request() [method:consumer.resume, id:136] +128ms
mediasoup:ERROR:Channel [pid:25299 webrtc::GoogCcNetworkController::ClampConstraints() | start bitrate smaller than min bitrate [starting_rate_:600000, min_data_rate_:3759722167506709858] +2s
mediasoup:ERROR:Worker (stderr) (ABORT) webrtc::PacedSender::SetPacingRates() | failed assertion `pacing_rate_bps > 0': pacing rate must be > 0 +0ms
mediasoup:PayloadChannel Consumer PayloadChannel ended by the worker process +15ms
mediasoup:PayloadChannel Producer PayloadChannel ended by the worker process +1ms
mediasoup:Channel Consumer Channel ended by the worker process +4ms
mediasoup:ERROR:Channel Producer Channel error: Error: read ECONNRESET +4ms
mediasoup:ERROR:Worker worker process died unexpectedly [pid:25299, code:null, signal:SIGABRT] +0ms
mediasoup:Worker died() [error:Error: [pid:25299, code:null, signal:SIGABRT]] +2m
And this is the backtrace from the core dump:
#0 0x00007fff95bdfcb0 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007fff95be200c in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x000000013fd0e2b4 in webrtc::PacedSender::SetPacingRates(unsigned int, unsigned int) ()
No symbol table info available.
#3 0x000000013fd07360 in webrtc::RtpTransportControllerSend::PostUpdates(webrtc::NetworkControlUpdate) ()
No symbol table info available.
#4 0x000000013fd07968 in webrtc::RtpTransportControllerSend::UpdateControllerWithTimeInterval() ()
No symbol table info available.
#5 0x000000013fd07c88 in webrtc::RtpTransportControllerSend::MaybeCreateControllers() ()
No symbol table info available.
#6 0x000000013fd07de8 in webrtc::RtpTransportControllerSend::RegisterTargetTransferRateObserver(webrtc::TargetTransferRateObserver*) ()
No symbol table info available.
#7 0x000000013f9b7ca8 in RTC::TransportCongestionControlClient::InitializeController() ()
No symbol table info available.
#8 0x000000013f9b8334 in RTC::TransportCongestionControlClient::TransportConnected() ()
No symbol table info available.
#9 0x000000013f99f510 in RTC::Transport::Connected() ()
No symbol table info available.
#10 0x000000013f9cc4d0 in RTC::WebRtcTransport::OnDtlsTransportConnected(RTC::DtlsTransport const*, RTC::SrtpSession::CryptoSuite, unsigned char*, unsigned long, unsigned char*, unsigned long, std::string&) ()
No symbol table info available.
#11 0x000000013f907ea0 in RTC::DtlsTransport::ProcessDtlsData(unsigned char const*, unsigned long) ()
No symbol table info available.
#12 0x000000013f9c8afc in RTC::WebRtcTransport::OnUdpSocketPacketReceived(RTC::UdpSocket*, unsigned char const*, unsigned long, sockaddr const*) ()
No symbol table info available.
#13 0x000000013f9be284 in RTC::UdpSocket::UserOnUdpDatagramReceived(unsigned char const*, unsigned long, sockaddr const*) ()
No symbol table info available.
#14 0x000000013f8aeba8 in onRecv(uv_udp_s*, long, uv_buf_t const*, sockaddr const*, unsigned int) ()
No symbol table info available.
#15 0x000000013fc6ef38 in uv__udp_recvmmsg ()
No symbol table info available.
#16 0x000000013fc6fecc in uv__udp_io ()
No symbol table info available.
#17 0x000000013fc74ce4 in uv__io_poll ()
No symbol table info available.
#18 0x000000013fc626ac in uv_run ()
No symbol table info available.
#19 0x000000013f88c258 in DepLibUV::RunLoop() ()
No symbol table info available.
#20 0x000000013f89bec0 in Worker::Worker(Channel::ChannelSocket*, PayloadChannel::PayloadChannelSocket*) ()
No symbol table info available.
#21 0x000000013f88a58c in mediasoup_worker_run ()
No symbol table info available.
#22 0x000000013f8892dc in main ()
No symbol table info available.
Thanks for the report,
Definitely the issue is within the libwebrtc code dependency that we are willing to get rid of when possible. I don't think we can get the resources to dig into this one, being related to a specific architecture, but feel free to provide the corresponding PR.
Ok, thank you. I will try to look into the issue.
@VictoriousV I had the same issue. I think the problem is your gcc version, as per installation instructions, you need gcc and g++ >= 4.9. You can install the devtoolset 9.
sudo yum install devtoolset-9
scl enable devtoolset-9 -- bash
After that, remove your node_modules folder and try installing again mediasoup.
@RoCkAs Thank you for the suggestion! It seems that it solved the issue. Thanks again! :)