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

SRT: SRS will crash if streamid is too long #2770

Closed
allanlei opened this issue Dec 6, 2021 · 0 comments · Fixed by #2786
Closed

SRT: SRS will crash if streamid is too long #2770

allanlei opened this issue Dec 6, 2021 · 0 comments · Fixed by #2786
Assignees
Labels
Bug It might be a bug. SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Milestone

Comments

@allanlei
Copy link

allanlei commented Dec 6, 2021

Description'

Please ensure that the markdown structure is maintained.

Please describe the issue you encountered here.
'
Make sure to maintain the markdown structure.

SRS will crash if the streamid is too long

  1. SRS version: v4.0-b0

  2. SRS log:

$ docker run -it --rm --network=host -p 10080:10080/udp -v "$(pwd)/srs.conf:/usr/local/srs/conf/docker.conf:ro" ossrs/srs:v4.0-b0
WARNING: Published ports are discarded when using host network mode
[2021-12-06 13:23:59.780][Trace][1][n3pq1580] XCORE-SRS/4.0.201(Leo)
[2021-12-06 13:23:59.780][Trace][1][n3pq1580] config parse complete
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] write log to console
[2021-12-06 13:23:59.781][Trace][1][n3pq1580][MAIN] SRS/4.0.201(Leo), MIT
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] authors: https://github.com/ossrs/srs/blob/4.0release/trunk/AUTHORS.txt
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] contributors: Winlin<winlin@vip.126.com> Winlin<winterserver@126.com> Winlin<chengli.ycl@alibaba-inc.com> Wenjie<zhaowenjie@tal.com> Wenjie<740936897@qq.com> Wenjie<wenjie.zhao@chinacache.com> xiangcheng.liu<liuxc0116@foxmail.com> naijia.liu<youngcow@youngcow.net> alcoholyi<alcoholyi@qq.com> byteman<wangchen2011@gmail.com> chad.wang<chad.wang.cn@gmail.com> suhetao<suhetao@gmail.com> Johnny<fengjihu@163.com> karthikeyan<keyanmca@gmail.com> StevenLiu<lq@chinaffmpeg.org> zhengfl<zhengfl_1989@126.com> tufang14<breadbean1449@gmail.com> allspace<allspace@gmail.com> niesongsong<nie950@gmail.com> rudeb0t<nimrod@themanxgroup.tw> CallMeNP<np.liamg@gmail.com> synote<synote@qq.com> lovecat<littlefawn@163.com> panda1986<542638787@qq.com> YueHonghui<hongf.yue@hotmail.com> ThomasDreibholz<dreibh@simula.no> JuntaoLiu<juntliu@gmail.com> RocFang<fangpeng1986@gmail.com> MakarovYaroslav<yaroslav.makarov.97@mail.ru> MirkoVelic<mvelic@inoxx.net> HuiZhang(huzhang2)<huzhang2@cisco.com> OtterWa<simpleotter23@gmail.com> walkermi<172192667@qq.com> haofz<fuzhuang.hao@vhall.com> ME_Kun_Han<hanvskun@hotmail.com> ljx0305<ljx0305@gmail.com> cenxinwei<censhanhe@163.com> StarBrilliant<m13253@hotmail.com> xubin<xubin@chnvideo.com> intliang<yintiliang@gmail.com> flowerwrong<sysuyangkang@gmail.com> YLX<568414379@qq.com> J<guotaojiang@qq.com> Harlan<hailiang@gvrcraft.com> hankun<hankun@bravovcloud.com> JonathanBarratt<jonathan.barratt@gmail.com> KeeganH<keeganwharris@gmail.com> StevenLiu<lingjiujianke@gmail.com> liuxc0116<liuxc0116@gmail.com> ChengdongZhang<lmajzcd@sina.com> lovacat<lovecat@china.sina.com> qiang.li<qiang.li@verycdn.com.cn> HungMingWu<u9089000@gmail.com> Himer<xishizhaohua@qq.com> XiaLixin<xialixin@kanzhun.com> XiaLixin<68469352@qq.com> XiaLixin<xlx0625@163.com> XiaLixin<xialx@yuntongxun.com> alphonsetai<tyh_123@163.com> Michael.Ma<wnpllr@gmail.com> lam2003<linmin3@yy.com> ShiWei<shiwei05@kuaishou.com> ShiWei<shi.weibd@hotmail.com> XiaofengWang<wasphin@gmail.com> XiaoZhihong<hondaxiao@tencent.com> XiaoZhihong<xiaozhihong8@gmail.com> XiaoZhihong<xiaozhihong@huya.com> yanghuiwen<cainiaodj@qq.com> WuPengqiang<309554135@qq.com> WuPengqiang<pengqiang.wpq@alibaba-inc.com> l<22312935+lam2003@github> xfalcon<x-falcon@github> ChenGuanghua<jinxue.cgh@alibaba-inc.com> ChenGuanghua<chengh_math@126.com> LiPeng<mozhan.lp@alibaba-inc.com> LiPeng<lipeng19811218@gmail.com> yajun18<yajun18@staff.sina.com.cn> liulichuan<liulichuan@kuaishou.com> yapingcat<caoyapingneu@163.com> chenchengbin<chenchengbin@yy.com> ChenHaibo<495810242@qq.com> ChenHaibo<nmgchenhaibo@foxmail.com> jasongwq<jasongwq@gmail.com> yinjiaoyuan<yinjiaoyuan@163.com> PieerePi<pihuibin@hotmail.com> JesseXi<jesse.jinjin@wo.cn> PieerePi<40780488+PieerePi@github> ghostsf<ghost_sf@163.com> xbpeng121<53243357+xbpeng121@github> johzzy<hellojinqiang@gmail.com> stone<bluestn@163.com> cfw11<34058899+cfw11@github> Hung-YiChen<gaod.chen@gmail.com> long<liyalong12345@126.com> matthew1838<77285055+matthew1838@github> rise<rise.worlds@outlook.com> 
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] cwd=/usr/local/srs, work_dir=./, build: 2021-12-01 02:51:48, configure: --x86-x64 --srt=on --jobs=2, uname: Linux 2782268b34bb 5.11.0-1021-azure #22~20.04.1-Ubuntu SMP Fri Oct 29 01:11:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux, osx: 0
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] configure detail: --prefix=/usr/local/srs --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-caster=on --http-api=on --utest=off --cherrypy=off --srt=on --rtc=on --simulator=off --cxx11=on --cxx14=off --ffmpeg-fit=on --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --gcov=off --debug=off --debug-stats=off --cross-build=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] srs checking config...
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] ips, iface[0] wlp2s0 ipv4 0x11043 10.17.15.122, iface[1] br-f700b13dc506 ipv4 0x11043 192.168.48.1, iface[2] br-0c342ba9b3a7 ipv4 0x11043 192.168.32.1, iface[3] wlp2s0 ipv6 0x11043 fe80::d7d5:1231:fb8b:23e3%wlp2s0, iface[4] br-f700b13dc506 ipv6 0x11043 fe80::42:34ff:fe11:e40f%br-f700b13dc506, iface[5] br-0c342ba9b3a7 ipv6 0x11043 fc00:f853:ccd:e793::1, iface[6] br-0c342ba9b3a7 ipv6 0x11043 fe80::42:1eff:fe68:f25e%br-0c342ba9b3a7, iface[7] br-0c342ba9b3a7 ipv6 0x11043 fe80::1%br-0c342ba9b3a7, iface[8] vethabc40ad ipv6 0x11043 fe80::6829:8cff:fee9:2b85%vethabc40ad, iface[9] veth109cfbf ipv6 0x11043 fe80::f08e:89ff:fe9d:f68%veth109cfbf, iface[10] veth8f914c9 ipv6 0x11043 fe80::cc99:7ff:fe73:e9ee%veth8f914c9, iface[11] veth1cd197d ipv6 0x11043 fe80::a0df:cff:fe51:a94d%veth1cd197d, iface[12] veth6a87906 ipv6 0x11043 fe80::c05f:8cff:fe76:4ee6%veth6a87906, iface[13] veth8ac9678 ipv6 0x11043 fe80::cd9:30ff:fe95:5e20%veth8ac9678, iface[14] veth3d88463 ipv6 0x11043 fe80::83:8bff:fe38:77aa%veth3d88463, iface[15] vetha94f42d ipv6 0x11043 fe80::8c83:beff:fe96:d613%vetha94f42d, iface[16] vethec51656 ipv6 0x11043 fe80::800:2cff:fe76:cca6%vethec51656, iface[17] veth24f73f3 ipv6 0x11043 fe80::e87d:59ff:fee3:a20a%veth24f73f3, iface[18] veth31c7fdb ipv6 0x11043 fe80::3030:a4ff:fed0:8a9a%veth31c7fdb, iface[19] veth93a5af6 ipv6 0x11043 fe80::6011:b4ff:feeb:1bce%veth93a5af6, iface[20] veth8f54937 ipv6 0x11043 fe80::9c5e:e2ff:fe38:5713%veth8f54937, iface[21] veth4133fb3 ipv6 0x11043 fe80::3c04:d2ff:fe80:9e8c%veth4133fb3
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] devices, intranet wlp2s0 10.17.15.122, intranet br-f700b13dc506 192.168.48.1, intranet br-0c342ba9b3a7 192.168.32.1, intranet wlp2s0 fe80::d7d5:1231:fb8b:23e3%wlp2s0, intranet br-f700b13dc506 fe80::42:34ff:fe11:e40f%br-f700b13dc506, internet br-0c342ba9b3a7 fc00:f853:ccd:e793::1, intranet br-0c342ba9b3a7 fe80::42:1eff:fe68:f25e%br-0c342ba9b3a7, intranet br-0c342ba9b3a7 fe80::1%br-0c342ba9b3a7, intranet vethabc40ad fe80::6829:8cff:fee9:2b85%vethabc40ad, intranet veth109cfbf fe80::f08e:89ff:fe9d:f68%veth109cfbf, intranet veth8f914c9 fe80::cc99:7ff:fe73:e9ee%veth8f914c9, intranet veth1cd197d fe80::a0df:cff:fe51:a94d%veth1cd197d, intranet veth6a87906 fe80::c05f:8cff:fe76:4ee6%veth6a87906, intranet veth8ac9678 fe80::cd9:30ff:fe95:5e20%veth8ac9678, intranet veth3d88463 fe80::83:8bff:fe38:77aa%veth3d88463, intranet vetha94f42d fe80::8c83:beff:fe96:d613%vetha94f42d, intranet vethec51656 fe80::800:2cff:fe76:cca6%vethec51656, intranet veth24f73f3 fe80::e87d:59ff:fee3:a20a%veth24f73f3, intranet veth31c7fdb fe80::3030:a4ff:fed0:8a9a%veth31c7fdb, intranet veth93a5af6 fe80::6011:b4ff:feeb:1bce%veth93a5af6, intranet veth8f54937 fe80::9c5e:e2ff:fe38:5713%veth8f54937, intranet veth4133fb3 fe80::3c04:d2ff:fe80:9e8c%veth4133fb3
[2021-12-06 13:23:59.781][Warn][1][n3pq1580][22] stats network use index=0, ip=10.17.15.122, ifname=wlp2s0
[2021-12-06 13:23:59.781][Warn][1][n3pq1580][22] stats disk not configed, disk iops disabled.
[2021-12-06 13:23:59.781][Trace][1][n3pq1580] write log to console
[2021-12-06 13:23:59.782][Trace][1][n3pq1580] features, rch:on, dash:on, hls:on, hds:off, srt:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2021-12-06 13:23:59.782][Trace][1][n3pq1580] SRS on  amd64 x86_64, conf:conf/docker.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2021-12-06 13:23:59.782][Trace][1][n3pq1580] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2021-12-06 13:23:59.782][Trace][1][n3pq1580] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2021-12-06 13:23:59.782][Trace][1][n3pq1580] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2021-12-06 13:23:59.782][Warn][1][n3pq1580][22] SRS/4.0.201 is not stable
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] fingerprint=BF:F3:D8:9F:66:7B:AE:18:F8:83:26:C5:FF:D5:0E:57:50:79:2D:B1:E9:DC:81:35:39:84:FC:FC:09:FF:E6:26
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] http: root mount to ./objs/nginx/html
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] server main cid=n3pq1580, pid=1, ppid=0, asprocess=0
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] write pid=1 to ./objs/srs.pid success!
[2021-12-06 13:23:59.786][Trace][1][n3pq1580] RTMP listen at tcp://0.0.0.0:1935, fd=7
[2021-12-06 13:23:59.787][Trace][1][n3pq1580] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2021-12-06 13:23:59.787][Trace][1][n3pq1580] http: api mount /console to ./objs/nginx/html/console
[2021-12-06 13:23:59.787][Trace][1][n3pq1580] srt2rtmp start coroutine...
[2021-12-06 13:23:59.787][Trace][1][02775266] Hybrid cpu=0.00%,13MB
[2021-12-06 13:23:59.787][Warn][1][2865b43y][22] use public address as ip: fc00:f853:ccd:e793::1, ifname=br-0c342ba9b3a7
[2021-12-06 13:23:59.787][Trace][1][2865b43y] Startup query id=c5a8d3b4569711eca1d5b5cbec4b80ff, eip=fc00:f853:ccd:e793::1, wait=367s
[2021-12-06 13:23:59.787][Trace][1][0f1trj40] TCP: connection manager run, conns=0
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] srt server is enabled...
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] srt server listen port:10080
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] init srt parameter, maxbw:-1, mss:1500, tlpkdrop:1, connect timeout:3000, send buff:12058624, recv buff:12058624, payload size:1316, latency:120, recv latency:120, peer latency:0
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] srt server listen port=10080, server_fd=356715406
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] srt server is starting... port(10080)
[2021-12-06 13:23:59.788][Trace][1][n248d8mr] srt server is working port(10080)
[2021-12-06 13:23:59.788][Trace][1][b616wu56] RTC: connection manager run, conns=0
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srt connect construct streamid:#!::h=streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22,m=publish, mode:2, subpath:streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22, vhost:__default_host__
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] new srt connection streamid:#!::h=streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22,m=publish, fd:356715405, vhost:__default_host__
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_LATENCY=120
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_PEERLATENCY=120
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_RCVLATENCY=120
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_SNDBUF=12058624
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_RCVBUF=12058624
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srto SRTO_MAXBW=-1
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srt mix_correct is enable.
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srt h264 sei filter is enable.
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] srt_handle add new pusher streamid:#!::h=streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22,m=publish, subpath:streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22
[2021-12-06 13:24:01.153][Trace][1][n248d8mr] new conn added fd:356715405, event:0x00000009
[2021-12-06 13:24:01.275][Trace][1][n248d8mr] new rtmp client for srt upstream, key_path:streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22
[2021-12-06 13:24:01.275][Trace][1][n248d8mr] rtmp client construct url:rtmp://127.0.0.1:1935/streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22
*** Error in `./objs/srs': free(): invalid pointer: 0x00000000013a001a ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x7fee9a576299]
/lib64/libstdc++.so.6(_ZNSsD1Ev+0x43)[0x7fee9ae98e23]
./objs/srs[0x6350c9]
./objs/srs[0x641bf9]
./objs/srs[0x64175c]
./objs/srs[0x64133c]
./objs/srs[0x640af2]
./objs/srs[0x63ff31]
./objs/srs[0x63f508]
./objs/srs[0x63e89c]
./objs/srs[0x63d9f5]
./objs/srs[0x63c4de]
./objs/srs[0x63acc8]
./objs/srs[0x6396fc]
./objs/srs[0x638557]
./objs/srs[0x634558]
./objs/srs[0x63411a]
./objs/srs[0x5236d3]
./objs/srs[0x523756]
./objs/srs[0x64afb9]
./objs/srs[0x64b82c]
./objs/srs[0x523736]
======= Memory map: ========
00400000-00bbc000 r-xp 00000000 103:02 36709440                          /usr/local/srs/objs/srs
00dbc000-00ded000 r--p 007bc000 103:02 36709440                          /usr/local/srs/objs/srs
00ded000-00df6000 rw-p 007ed000 103:02 36709440                          /usr/local/srs/objs/srs
00df6000-00f1b000 rw-p 00000000 00:00 0 
01234000-013d9000 rw-p 00000000 00:00 0                                  [heap]
7fee80000000-7fee80021000 rw-p 00000000 00:00 0 
7fee80021000-7fee84000000 ---p 00000000 00:00 0 
7fee88000000-7fee88021000 rw-p 00000000 00:00 0 
7fee88021000-7fee8c000000 ---p 00000000 00:00 0 
7fee8c000000-7fee8c023000 rw-p 00000000 00:00 0 
7fee8c023000-7fee90000000 ---p 00000000 00:00 0 
7fee937ff000-7fee93800000 ---p 00000000 00:00 0 
7fee93800000-7fee94000000 rwxp 00000000 00:00 0 
7fee94000000-7fee94021000 rw-p 00000000 00:00 0 
7fee94021000-7fee98000000 ---p 00000000 00:00 0 
7fee9805d000-7fee9805e000 ---p 00000000 00:00 0 
7fee9805e000-7fee9885e000 rwxp 00000000 00:00 0 
7fee9885e000-7fee9885f000 ---p 00000000 00:00 0 
7fee9885f000-7fee9905f000 rwxp 00000000 00:00 0 
7fee9905f000-7fee99060000 ---p 00000000 00:00 0 
7fee99060000-7fee99860000 rwxp 00000000 00:00 0 
7fee99860000-7fee99861000 ---p 00000000 00:00 0 
7fee99861000-7fee9a061000 rwxp 00000000 00:00 0 
7fee9a061000-7fee9a4f5000 rw-p 00000000 00:00 0 
7fee9a4f5000-7fee9a6b9000 r-xp 00000000 103:02 36317314                  /usr/lib64/libc-2.17.so
7fee9a6b9000-7fee9a8b8000 ---p 001c4000 103:02 36317314                  /usr/lib64/libc-2.17.so
7fee9a8b8000-7fee9a8bc000 r--p 001c3000 103:02 36317314                  /usr/lib64/libc-2.17.so
7fee9a8bc000-7fee9a8be000 rw-p 001c7000 103:02 36317314                  /usr/lib64/libc-2.17.so
7fee9a8be000-7fee9a8c3000 rw-p 00000000 00:00 0 
7fee9a8c3000-7fee9a8d8000 r-xp 00000000 103:02 36317361                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fee9a8d8000-7fee9aad7000 ---p 00015000 103:02 36317361                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fee9aad7000-7fee9aad8000 r--p 00014000 103:02 36317361                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fee9aad8000-7fee9aad9000 rw-p 00015000 103:02 36317361                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fee9aad9000-7fee9abda000 r-xp 00000000 103:02 36317438                  /usr/lib64/libm-2.17.so
7fee9abda000-7fee9add9000 ---p 00101000 103:02 36317438                  /usr/lib64/libm-2.17.so
7fee9add9000-7fee9adda000 r--p 00100000 103:02 36317438                  /usr/lib64/libm-2.17.so
7fee9adda000-7fee9addb000 rw-p 00101000 103:02 36317438                  /usr/lib64/libm-2.17.so
7fee9addb000-7fee9aec4000 r-xp 00000000 103:02 36317563                  /usr/lib64/libstdc++.so.6.0.19
7fee9aec4000-7fee9b0c4000 ---p 000e9000 103:02 36317563                  /usr/lib64/libstdc++.so.6.0.19
7fee9b0c4000-7fee9b0cc000 r--p 000e9000 103:02 36317563                  /usr/lib64/libstdc++.so.6.0.19
7fee9b0cc000-7fee9b0ce000 rw-p 000f1000 103:02 36317563                  /usr/lib64/libstdc++.so.6.0.19
7fee9b0ce000-7fee9b0e3000 rw-p 00000000 00:00 0 
7fee9b0e3000-7fee9b0ea000 r-xp 00000000 103:02 36317541                  /usr/lib64/librt-2.17.so
7fee9b0ea000-7fee9b2e9000 ---p 00007000 103:02 36317541                  /usr/lib64/librt-2.17.so
7fee9b2e9000-7fee9b2ea000 r--p 00006000 103:02 36317541                  /usr/lib64/librt-2.17.so
7fee9b2ea000-7fee9b2eb000 rw-p 00007000 103:02 36317541                  /usr/lib64/librt-2.17.so
7fee9b2eb000-7fee9b302000 r-xp 00000000 103:02 36317522                  /usr/lib64/libpthread-2.17.so
7fee9b302000-7fee9b501000 ---p 00017000 103:02 36317522                  /usr/lib64/libpthread-2.17.so
7fee9b501000-7fee9b502000 r--p 00016000 103:02 36317522                  /usr/lib64/libpthread-2.17.so
7fee9b502000-7fee9b503000 rw-p 00017000 103:02 36317522                  /usr/lib64/libpthread-2.17.so
7fee9b503000-7fee9b507000 rw-p 00000000 00:00 0 
7fee9b507000-7fee9b509000 r-xp 00000000 103:02 36317343                  /usr/lib64/libdl-2.17.so
7fee9b509000-7fee9b709000 ---p 00002000 103:02 36317343                  /usr/lib64/libdl-2.17.so
7fee9b709000-7fee9b70a000 r--p 00002000 103:02 36317343                  /usr/lib64/libdl-2.17.so
7fee9b70a000-7fee9b70b000 rw-p 00003000 103:02 36317343                  /usr/lib64/libdl-2.17.so
7fee9b70b000-7fee9b72d000 r-xp 00000000 103:02 36317290                  /usr/lib64/ld-2.17.so
7fee9b88b000-7fee9b928000 rw-p 00000000 00:00 0 
7fee9b929000-7fee9b92c000 rw-p 00000000 00:00 0 
7fee9b92c000-7fee9b92d000 r--p 00021000 103:02 36317290                  /usr/lib64/ld-2.17.so
7fee9b92d000-7fee9b92e000 rw-p 00022000 103:02 36317290                  /usr/lib64/ld-2.17.so
7fee9b92e000-7fee9b92f000 rw-p 00000000 00:00 0 
7ffd4e808000-7ffd4e829000 rwxp 00000000 00:00 0                          [stack]
7ffd4e8eb000-7ffd4e8ef000 r--p 00000000 00:00 0                          [vvar]
7ffd4e8ef000-7ffd4e8f1000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]

  1. SRS configuration:
listen                  1935;
srs_log_tank            console;
srs_log_level           verbose;
daemon                  off;

srt_server {
  enabled             on;
  listen              10080;
}


vhost __defaultVhost__ {
}

Replay

How to replay bug?

Steps to reproduce the bug

  1. Run SRS
    docker run -it --rm --network=host -p 10080:10080/udp -v "$(pwd)/srs.conf:/usr/local/srs/conf/docker.conf:ro" ossrs/srs:v4.0-b0
    
  2. Publish SRT (this works) streamid=...OjE2
    docker run --rm --network=host registry.cn-hangzhou.aliyuncs.com/ossrs/srs:encoder \
        ffmpeg -v trace -re -i ./doc/source.flv -c copy -f mpegts 'srt://127.0.0.1:10080?streamid=#!::h=streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE2,m=publish'
    
  3. Publish SRT (this will crash). streamid=...OjE22
    docker run --rm --network=host registry.cn-hangzhou.aliyuncs.com/ossrs/srs:encoder \
        ffmpeg -v trace -re -i ./doc/source.flv -c copy -f mpegts 'srt://127.0.0.1:10080?streamid=#!::h=streams/5fcdf9f7b6b34431ef6a4ee8?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6IjdhNTNkMGNmIn01eyJzdWIiOiI1N2RkMDcxZGQyMGZjNDBjMGNiZWQ2YjciLCJpYXQiOjE22,m=publish'
    
  4. SRS will crash

Expect

Expected behavior

Please describe your expectation

Describe what you expect to happen

  • SRS does not crash
  • Connection will either publish successfully or error

TRANS_BY_GPT3

@winlinvip winlinvip added Bug It might be a bug. SRT It's about SRT protocol. labels Dec 8, 2021
@winlinvip winlinvip added this to the 4.0 milestone Dec 8, 2021
@winlinvip winlinvip changed the title SRS will crash if streamid is too long SRT: SRS will crash if streamid is too long Dec 8, 2021
@winlinvip winlinvip linked a pull request Dec 16, 2021 that will close this issue
@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
Bug It might be a bug. SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants