Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC: Crash caused by inability to recognize sprop-parameter-sets in SDP offer. #3093

Closed
underthere opened this issue Jun 28, 2022 · 1 comment
Assignees
Labels
good first issue Easy to fix issues, good for newcomers help wanted Extra attention is needed TransByAI Translated by AI/GPT. WebRTC WebRTC, RTC2RTMP or RTMP2RTC.
Milestone

Comments

@underthere
Copy link

underthere commented Jun 28, 2022

Note: Please read FAQ before file an issue, see 2716

Note: Before asking a question, please refer to the FAQ, specifically 2716.

Description (描述)

Please describe your issue here (描述你遇到了什么问题)

post specific sdp content (generated by gstreamer 1.20 webrtcbin) to the /rtc/v1/publish/ interface, SRS crashed

  1. SRS Version: 4.0.252

  2. SRS log && coredump:

log file
coredump file

  1. SRS Config:
listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;

http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}

http_api {
    enabled         on;
    listen          1985;
}
stats {
    network         0;
}
rtc_server {
    enabled on;
    listen 8000; # UDP port
    # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
    candidate $CANDIDATE;
}

vhost __defaultVhost__ {
    rtc {
        enabled     on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
        rtmp_to_rtc off;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
        rtc_to_rtmp off;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
}

Replay:

> Please describe how to replay the bug? (重现Bug的步骤)

1. Post the following content to /rtc/v1/publish/

Please make sure to maintain the markdown structure.

{
    "api": "http://localhost:1985/rtc/v1/publish/",
    "streamurl": "webrtc://localhost:1985/live/cl_test",
    "sdp": "v=0\r\no=- 7414651349599764910 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=ice-options:trickle\r\na=group:BUNDLE video0\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=ice-ufrag:U89ws3ERBxsAKeHZaUGmA3ld9vYGY/v+\r\na=ice-pwd:lVD5bZvAsM0UJ3sZ+A8oXDYT/y/fVVF/\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=sendrecv\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 transport-cc\r\na=framerate:30\r\na=fmtp:96 packetization-mode=1;sprop-parameter-sets=Z0LAHtkAoD2wFqDAwNSgAAADACAAAAeR4sXJ,aMuMsg==;profile-level-id=42c01e;level-asymmetry-allowed=1\r\na=ssrc:2590406750 msid:user3440147996@host-798904ce webrtctransceiver0\r\na=ssrc:2590406750 cname:user3440147996@host-798904ce\r\na=mid:video0\r\na=fingerprint:sha-256 03:C8:7F:71:C2:86:D6:9A:70:FF:A7:7F:C7:07:B5:76:85:6F:31:DF:28:43:41:4C:76:B8:C7:7B:E6:45:AD:1D\r\na=rtcp-mux-only\r\n"
}

Expect (Expected Behavior)

Please make sure to maintain the markdown structure.

Please describe your expectation (Describe what you expect to happen)

Make sure to maintain the markdown structure.

TRANS_BY_GPT3

@underthere underthere changed the title post /rtc/v1/publish/ segmentation fault [segmentation fault][webrtc] post /rtc/v1/publish/ srs崩溃(附log&core) Jun 28, 2022
@underthere underthere changed the title [segmentation fault][webrtc] post /rtc/v1/publish/ srs崩溃(附log&core) [segmentation fault][webrtc] 不能识别sdp offer 中 fmtp 的 sprop-parameter-sets Jul 29, 2022
@winlinvip winlinvip self-assigned this Aug 7, 2022
@winlinvip winlinvip added the WebRTC WebRTC, RTC2RTMP or RTMP2RTC. label Aug 7, 2022
@winlinvip winlinvip changed the title [segmentation fault][webrtc] 不能识别sdp offer 中 fmtp 的 sprop-parameter-sets WebRTC: 不能识别sdp offer 中 fmtp 的 sprop-parameter-sets导致崩溃 Aug 7, 2022
@winlinvip winlinvip added good first issue Easy to fix issues, good for newcomers help wanted Extra attention is needed labels Aug 7, 2022
@winlinvip winlinvip added this to the 4.0 milestone Aug 7, 2022
@winlinvip
Copy link
Member

winlinvip commented Aug 7, 2022

This is a problem, it should not crash just because of illegal parameters.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title WebRTC: 不能识别sdp offer 中 fmtp 的 sprop-parameter-sets导致崩溃 WebRTC: Crash caused by inability to recognize sprop-parameter-sets in SDP offer. Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy to fix issues, good for newcomers help wanted Extra attention is needed TransByAI Translated by AI/GPT. WebRTC WebRTC, RTC2RTMP or RTMP2RTC.
Projects
None yet
Development

No branches or pull requests

2 participants