Failed to process the bundled m= section.

This is a problem with probability, sometimes it is no problem.

  1. PeerConnection::Options was not changed.

(audio_coding_module.cc:333): Created
(audio_receive_stream.cc:117): AudioReceiveStream: 641788442
(audio_receive_stream.cc:352): AudioReceiveStream::ConfigureStream: {rtp: {remote_ssrc: 641788442, local_ssrc: 4195875351, transport_cc: off, nack: {rtp_history_ms: 0}, extensions: []}, rtcp_send_transport: (Transport), media_transport: null, sync_group: P0Vd3mBgXXwcw8tt}
(call.cc:1118): UpdateAggregateNetworkState: aggregate_state=up
(rtp_transport_controller_send.cc:259): SignalNetworkState Up
(channel.cc:723): Add remote ssrc: 641788442
(channel.cc:867): Changing voice state, recv=0 send=0
(jsep_transport_controller.cc:319): Not adding candidate because the JsepTransport doesn’t exist. Ignore it.
(peer_connection.cc:6141): 2 is not ready to use the remote candidate because the local or remote description is not set.
(peer_connection.cc:5428): Non-rejected SCTP m= section is needed to get the SSL Role of the SCTP transport.
(peer_connection.cc:2687): Processing the MSIDs for MID=0 (streams=[SinD0/U6yQho0UrN]).
(peer_connection.cc:2687): Processing the MSIDs for MID=1 (streams=[SinD0/U6yQho0UrN]).
(peer_connection.cc:2687): Processing the MSIDs for MID=2 (streams=[P0Vd3mBgXXwcw8tt]).
(peer_connection.cc:2698): Processing the addition of a remote track for MID=2.
(webrtc_voice_engine.cc:1972): SetOutputVolume() to 1 for recv stream with ssrc 641788442
(peer_connection.cc:4033): Changing IceConnectionState 3 => 5
OnConnectionStateChange: connectionState: disconnected
[DEBUG] PeerConnection::OnIceGatheringChange() | new IceGatheringState:[gathering]
[DEBUG] Handler::Receive() | calling pc->SetLocalDescription() aaaa [answer:v=0
o=- 3217638325344239962 4 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
a=group:BUNDLE 0 1 2
m=audio 56164 UDP/TLS/RTP/SAVPF 100
c=IN IP4 10.0.31.174
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=mid:0
a=recvonly
a=ice-ufrag:Wt+9
a=ice-pwd:JJ9unRfqHEXxR1woqdP6KJSV
a=fingerprint:sha-256 D1:72:D1:6C:E9:AB:0D:18:52:C0:F2:DB:C8:15:89:BF:B2:C9:95:43:4C:60:7E:89:C8:35:A9:4F:CF:EA:94:32
a=candidate:681815194 1 udp 2122260223 10.0.31.174 56164 typ host generation 0 network-id 1 network-cost 50
a=ice-options:trickle
a=rtcp-mux
m=video 9 UDP/TLS/RTP/SAVPF 101 102
c=IN IP4 0.0.0.0
a=rtpmap:101 VP8/90000
a=rtpmap:102 rtx/90000
a=fmtp:102 apt=101
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=extmap:12 urn:ietf:params:rtp-hdrext:toffset
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:11 urn:3gpp:video-orientation
a=extmap:6 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=setup:active
a=mid:1
a=recvonly
a=ice-ufrag:Wt+9
a=ice-pwd:JJ9unRfqHEXxR1woqdP6KJSV
a=fingerprint:sha-256 D1:72:D1:6C:E9:AB:0D:18:52:C0:F2:DB:C8:15:89:BF:B2:C9:95:43:4C:60:7E:89:C8:35:A9:4F:CF:EA:94:32
a=ice-options:trickle
a=rtcp-mux
a=rtcp-rsize
m=audio 9 UDP/TLS/RTP/SAVPF 100
c=IN IP4 0.0.0.0
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=mid:2
a=recvonly
a=ice-ufrag:Wt+9
a=ice-pwd:JJ9unRfqHEXxR1woqdP6KJSV
a=fingerprint:sha-256 D1:72:D1:6C:E9:AB:0D:18:52:C0:F2:DB:C8:15:89:BF:B2:C9:95:43:4C:60:7E:89:C8:35:A9:4F:CF:EA:94:32
a=ice-options:trickle
a=rtcp-mux
]
[DEBUG] PeerConnection::SetLocalDescription() | /media/ubuntu/6BDFAB643475AD94/KKSource/mywork/thirdparty/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/PeerConnection.cpp SetLocalDescription 147

[DEBUG] PeerConnection::SetLocalDescription() | /media/ubuntu/6BDFAB643475AD94/KKSource/mywork/thirdparty/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/PeerConnection.cpp SetLocalDescription 156

(webrtc_sdp.cc:3221): Ignored line: a=rtcp:9 IN IP4 0.0.0.0
(webrtc_sdp.cc:3221): Ignored line: a=rtcp:9 IN IP4 0.0.0.0
(webrtc_sdp.cc:3221): Ignored line: a=rtcp:9 IN IP4 0.0.0.0
[DEBUG] PeerConnection::SetLocalDescription() | /media/ubuntu/6BDFAB643475AD94/KKSource/mywork/thirdparty/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/PeerConnection.cpp SetLocalDescription 169

(dtls_srtp_transport.cc:61): Setting RTCP Transport on 0 transport 0
(dtls_srtp_transport.cc:66): Setting RTP Transport on 0 transport 5c087de0
(p2p_transport_channel.cc:432): Set ICE ufrag: Wt+9 pwd: JJ9unRfqHEXxR1woqdP6KJSV on transport 0
(dtls_transport.cc:241): DtlsTransport[0|1|_W]: Ignoring identical remote DTLS fingerprint
(rtp_transport.cc:153): Failed to register the sink for RTP demuxer.
(channel.cc:264): Failed to connect to the new RtpTransport.
(peer_connection.cc:2148): Failed to set local answer sdp: Failed to process the bundled m= section.
[WARN] PeerConnection::OnFailure() | webtc::SetSessionDescriptionObserver failure [INTERNAL_ERROR:Failed to set local answer sdp: Failed to process the bundled m= section.]
[DEBUG] PeerConnection::SetLocalDescription() | /media/ubuntu/6BDFAB643475AD94/KKSource/mywork/thirdparty/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/PeerConnection.cpp SetLocalDescription 171

terminate called after throwing an instance of ‘mediasoupclient::Exception’
what(): Failed to set local answer sdp: Failed to process the bundled m= section.
Aborted

Can you also paste the remote SDP offers generated by libmediasoupclient? I mean all SDP offers and answers, not just the failing one.

BTW are you using custom PeerConnection::Options?

@jmillan do you see anything wrong above? I don’t. We are extremely sure that Unified-Plan is enabled, right?

May I know why you have marked as “solution” my answer? It was just an answer.

BTW can you comment in a new answer instead of editing the original topic?

Sorry , I accidentally checked it. I have not solved yet.
I can’t show all the loggings , because of new user was forbidden to show "more links. "

Can you refresh the web and try again? BTW don’t forget to paste remote SDP offers.

Can you also uncomment the following line in order to get more logs from libwebrtc.

I mean, please add such line to your code.

when open the webrtc logs ,and upload my log message , the error is "Body is limited to 32000 characters; you entered 215177. "

Let’s please focus on the SDP offers and any suspicious error log.

OK.

when i was received the third “newConsumer” , the program was crashed.

offer sdp :
offer:v=0
o=libmediasoupclient 10000 3 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-lite
a=fingerprint:sha-512 1C:78:0B:72:AD:74:68:D7:19:E9:E9:FF:E1:E1:8A:47:38:CA:2D:E2:EF:09:C7:3F:B3:33:87:DF:46:30:EA:D5:6E:9D:34:0A:D5:1C:1F:29:22:E5:8A:4D:A4:92:FC:F0:7F:7C:34:1A:1F:5D:53:0E:9F:E5:6B:3E:29:0B:C9:2C
**a=msid-semantic: WMS ***
a=group:BUNDLE 0 1 2
m=audio 7 UDP/TLS/RTP/SAVPF 100
c=IN IP4 127.0.0.1
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;sprop-stereo=1;usedtx=1;useinbandfec=1
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:actpass
a=mid:0
a=sendonly
a=ice-ufrag:u34z3jygzechbpri
a=ice-pwd:nc1c8cj5szl2ky0ro1y9dhw61gubtrpc
a=candidate:udpcandidate 1 udp 1076302079 10.0.31.174 46558 typ host
a=end-of-candidates
a=ice-options:renomination
a=ssrc:612531774 cname:n5Sxk0YnmiYd/u18
a=ssrc:612531774 msid:n5Sxk0YnmiYd/u18 1afd5a68-c627-43c1-bb4c-d776a3d686af
a=rtcp-mux
a=rtcp-rsize
m=video 7 UDP/TLS/RTP/SAVPF 101 102
c=IN IP4 127.0.0.1
a=rtpmap:101 VP8/90000
a=rtpmap:102 rtx/90000
a=fmtp:102 apt=101
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:6 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:11 urn:3gpp:video-orientation
a=extmap:12 urn:ietf:params:rtp-hdrext:toffset
a=setup:actpass
a=mid:1
a=sendonly
a=ice-ufrag:u34z3jygzechbpri
a=ice-pwd:nc1c8cj5szl2ky0ro1y9dhw61gubtrpc
a=candidate:udpcandidate 1 udp 1076302079 10.0.31.174 46558 typ host
a=end-of-candidates
a=ice-options:renomination
a=ssrc:614364845 cname:n5Sxk0YnmiYd/u18
a=ssrc:614364845 msid:n5Sxk0YnmiYd/u18 c4b4d526-5a52-4639-9b52-4536d8d7dd9c
a=ssrc:287440401 cname:n5Sxk0YnmiYd/u18
a=ssrc:287440401 msid:n5Sxk0YnmiYd/u18 c4b4d526-5a52-4639-9b52-4536d8d7dd9c
a=ssrc-group:FID 614364845 287440401
a=rtcp-mux
a=rtcp-rsize
m=audio 7 UDP/TLS/RTP/SAVPF 100
c=IN IP4 127.0.0.1
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;sprop-stereo=1;usedtx=1;useinbandfec=1
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:actpass
a=mid:2
a=sendonly
a=ice-ufrag:u34z3jygzechbpri
a=ice-pwd:nc1c8cj5szl2ky0ro1y9dhw61gubtrpc
a=candidate:udpcandidate 1 udp 1076302079 10.0.31.174 46558 typ host
a=end-of-candidates
a=ice-options:renomination
a=ssrc:137541641 cname:XcXP5SNoHgJL/Pjh
a=ssrc:137541641 msid:XcXP5SNoHgJL/Pjh c812ac9d-3b23-4390-935c-c218c48e7899
a=rtcp-mux
a=rtcp-rsize
]

answer sdp:
answer:v=0
o=- 7656808664248049667 4 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
a=group:BUNDLE 0 1 2
m=audio 40256 UDP/TLS/RTP/SAVPF 100
c=IN IP4 10.0.31.174
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=mid:0
a=recvonly
a=ice-ufrag:o+HL
a=ice-pwd:EhrLrEhQHZQAQhJXdXz3DXy4
a=fingerprint:sha-256 EF:30:EE:11:F1:64:0D:9D:34:47:56:20:CF:FE:88:10:95:B4:F9:16:88:10:AC:66:88:D3:C7:D9:32:39:D9:A2
a=candidate:681815194 1 udp 2122260223 10.0.31.174 40256 typ host generation 0 network-id 1 network-cost 50
a=ice-options:trickle
a=rtcp-mux
m=video 9 UDP/TLS/RTP/SAVPF 101 102
c=IN IP4 0.0.0.0
a=rtpmap:101 VP8/90000
a=rtpmap:102 rtx/90000
a=fmtp:102 apt=101
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=extmap:12 urn:ietf:params:rtp-hdrext:toffset
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:11 urn:3gpp:video-orientation
a=extmap:6 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=setup:active
a=mid:1
a=recvonly
a=ice-ufrag:o+HL
a=ice-pwd:EhrLrEhQHZQAQhJXdXz3DXy4
a=fingerprint:sha-256 EF:30:EE:11:F1:64:0D:9D:34:47:56:20:CF:FE:88:10:95:B4:F9:16:88:10:AC:66:88:D3:C7:D9:32:39:D9:A2
a=ice-options:trickle
a=rtcp-mux
a=rtcp-rsize
m=audio 9 UDP/TLS/RTP/SAVPF 100
c=IN IP4 0.0.0.0
a=rtpmap:100 opus/48000/2
a=fmtp:100 minptime=10;useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=extmap:10 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=mid:2
a=recvonly
a=ice-ufrag:o+HL
a=ice-pwd:EhrLrEhQHZQAQhJXdXz3DXy4
a=fingerprint:sha-256 EF:30:EE:11:F1:64:0D:9D:34:47:56:20:CF:FE:88:10:95:B4:F9:16:88:10:AC:66:88:D3:C7:D9:32:39:D9:A2
a=ice-options:trickle
a=rtcp-mux
]

Are you using any options when calling to recvTransport.Consume()?

The issue is reproducible easily as shown in a new added unit test. Let’s move to a GitHub issue here:

There is no issue:

So I expect that, in your case, you are eventually passing same remote Consumer parameters to recvTransport.Consumer() (as explained in the GitHub issue).

I pass the remote Consumer parameters by receiving the “newConsumer” msg content.
void RoomClient::PorcessNewConsumer(nlohmann::json newConsumer, int msgId) {
if (newConsumer.find(“id”)
== newConsumer.end()) {
std::cout << “‘id’ missing in response” << std::endl;
return;
} else if (newConsumer.find(“producerId”)
== newConsumer.end()) {
std::cout << “‘iceParametersd’ missing in response” << std::endl;

	return;
} else if (newConsumer.find("kind")
		== newConsumer.end()) {
	std::cout << "'iceCandidates' missing in response" << std::endl;

	return;
} else if (newConsumer.find("rtpParameters")
		== newConsumer.end()) {
	std::cout << "'dtlsParameters' missing in response" << std::endl;
	return;
}
std::string peerId = newConsumer["peerId"].get<std::string>();

std::list<struct Participant>::iterator iter;

// struct Participant participant;
// participant.setPeerId(peerId);
// iter = std::find(participants_.begin(), participants_.end(), participant);
int channel;
iter = std::find_if(participants_.begin(), participants_.end(),
[&peerId](decltype(*(participants_.begin())) & vt){
return (strcmp(vt.peerId.c_str(), peerId.c_str()) ==0);
});
if (iter != participants_.end()) {
channel = iter->idx;
} else {
std::cout << “can not find the peer information” << " : peerId " << peerId.c_str() << std::endl;
return ;
}
recv_transport_->Consume(/channel,
this,
/
this,
newConsumer[“id”],
newConsumer[“producerId”],
newConsumer[“kind”],
&newConsumer[“rtpParameters”]);

I use the newest libmediasoup-client version from github , but the issue still exists.

Please print the id and rtpParameters of all new consumers until it fails.

1:
recv msg:{“request”:true,“id”:5242967,“method”:“newConsumer”,“data”:{“peerId”:“ug1vefaw”,“producerId”:“1230cb96-9b94-4fd2-8534-43ba6c56051e”,“id”:“49bd38d9-4938-4552-a7ff-6e2523d122d9”,“kind”:“audio”,“rtpParameters”:{“codecs”:[{“mimeType”:“audio/opus”,“clockRate”:48000,“payloadType”:100,“channels”:2,“rtcpFeedback”:[],“parameters”:{“minptime”:10,“useinbandfec”:1,“sprop-stereo”:1,“usedtx”:1}}],“headerExtensions”:[{“uri”:“http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",“id”:4},{“uri”:“urn:ietf:params:rtp-hdrext:ssrc-audio-level”,“id”:10}],“encodings”:[{“ssrc”:994350334}],“rtcp”:{“cname”:“twlICLiNTiYySQwG”,“reducedSize”:true,“mux”:true}},“type”:“simple”,“appData”:{“peerId”:“ug1vefaw”},"producerPaused”:false}}

2:
recv msg:{“request”:true,“id”:8524214,“method”:“newConsumer”,“data”:{“peerId”:“ug1vefaw”,“producerId”:“15ad635c-1829-461f-9690-083f173716cb”,“id”:“18d413d8-e916-4a40-9eb2-5b3af0e937c6”,“kind”:“video”,“rtpParameters”:{“codecs”:[{“mimeType”:“video/VP8”,“clockRate”:90000,“payloadType”:101,“rtcpFeedback”:[{“type”:“goog-remb”},{“parameter”:“fir”,“type”:“ccm”},{“type”:“nack”},{“parameter”:“pli”,“type”:“nack”}],“parameters”:{}},{“mimeType”:“video/rtx”,“clockRate”:90000,“payloadType”:102,“rtcpFeedback”:[],“parameters”:{“apt”:101}}],“headerExtensions”:[{“uri”:“http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",“id”:4},{“uri”:“http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07”,“id”:6},{“uri”:“urn:3gpp:video-orientation”,“id”:11},{“uri”:“urn:ietf:params:rtp-hdrext:toffset”,“id”:12}],“encodings”:[{“ssrc”:869916720,“rtx”:{“ssrc”:998007240},“scalabilityMode”:“S3T3”}],“rtcp”:{“cname”:“twlICLiNTiYySQwG”,“reducedSize”:true,“mux”:true}},“type”:“simulcast”,“appData”:{“peerId”:“ug1vefaw”},"producerPaused”:false}}

3:
recv msg:{“request”:true,“id”:36081,“method”:“newConsumer”,“data”:{“peerId”:“tk804bas”,“producerId”:“84545906-fc9d-47de-830a-e81d7a52b784”,“id”:“56a18acc-138b-49a5-925b-a12ab37e3dca”,“kind”:“audio”,“rtpParameters”:{“codecs”:[{“mimeType”:“audio/opus”,“clockRate”:48000,“payloadType”:100,“channels”:2,“rtcpFeedback”:[],“parameters”:{“minptime”:10,“useinbandfec”:1,“sprop-stereo”:1,“usedtx”:1}}],“headerExtensions”:[{“uri”:“http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",“id”:4},{“uri”:“urn:ietf:params:rtp-hdrext:ssrc-audio-level”,“id”:10}],“encodings”:[{“ssrc”:848431512}],“rtcp”:{“cname”:“fj/HX2plkrsO7yKt”,“reducedSize”:true,“mux”:true}},“type”:“simple”,“appData”:{“peerId”:“tk804bas”},"producerPaused”:false}}

Ok, we’ll reopen the issue in GitHub to handle this issue, although right now I’ve no idea of why it happens in your case.

Please, subscribe to the issue in GitHub and track it for notifications.

This problem is easy to reproduce, use the browser to open two the same url(EG. https://10.0.31.174:3000/?roomId=9nhl6r9k), and then manually start a client (libmediasoupclient), then receive the peers, and then process each peer’s newConsumer message, when processing By the time of the third newConsumer message, the program will have a probabilistic crash.

Can we please move to the GitHub issue?

Also, can you share your libmediasoup based app that connects to the mediasoup-demo server and consumers all producers? (please answer in the GitHub issue so we track the bug there).

Issue explained here.