srs icon indicating copy to clipboard operation
srs copied to clipboard

Edge: Crash when a large number of clients play concurrently.

Open han4235 opened this issue 4 years ago • 4 comments

Description'

Please ensure that the markdown structure is maintained.

Describe the problem you encountered here: srs generates a core dump.

  1. SRS version: xxxxxx'

Please make sure to maintain the markdown structure. 3.0.140

  1. The log of SRS is as follows: Please make sure to maintain the markdown structure.
Program terminated with signal 6, Aborted.
#0  0x000000301f6325e5 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 libgcc-4.4.7-17.el6.x86_64 libstdc++-4.4.7-17.el6.x86_64
(gdb) bt
#0  0x000000301f6325e5 in raise () from /lib64/libc.so.6
#1  0x000000301f633dc5 in abort () from /lib64/libc.so.6
#2  0x000000301f62b70e in __assert_fail_base () from /lib64/libc.so.6
#3  0x000000301f62b7d0 in __assert_fail () from /lib64/libc.so.6
#4  0x00000000004b331e in srs_close_stfd (stfd=@0x12177e8) at src/service/srs_service_st.cpp:87
#5  0x00000000004b6209 in SrsTcpClient::close (this=0x12177e0) at src/service/srs_service_st.cpp:638
#6  0x00000000004b5cfb in SrsTcpClient::~SrsTcpClient (this=0x12177e0, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at src/service/srs_service_st.cpp:608
#7  0x00000000004b6004 in SrsTcpClient::~SrsTcpClient (this=0x12177e0, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at src/service/srs_service_st.cpp:611
#8  0x00000000004be109 in SrsBasicRtmpClient::close (this=0x111ff60) at src/service/srs_service_rtmp_conn.cpp:98
#9  0x00000000004bdbb2 in SrsBasicRtmpClient::~SrsBasicRtmpClient (this=0x111ff60, __in_chrg=<value optimized out>) at src/service/srs_service_rtmp_conn.cpp:57
#10 0x00000000004cfc39 in SrsSimpleRtmpClient::~SrsSimpleRtmpClient (this=0x111ff60, __in_chrg=<value optimized out>) at src/app/srs_app_rtmp_conn.cpp:80
#11 0x00000000004cfc68 in SrsSimpleRtmpClient::~SrsSimpleRtmpClient (this=0x111ff60, __in_chrg=<value optimized out>) at src/app/srs_app_rtmp_conn.cpp:80
#12 0x0000000000578251 in SrsEdgeRtmpUpstream::close (this=0x111f690) at src/app/srs_app_edge.cpp:147
#13 0x0000000000577528 in SrsEdgeRtmpUpstream::~SrsEdgeRtmpUpstream (this=0x111f690, __in_chrg=<value optimized out>) at src/app/srs_app_edge.cpp:72
#14 0x00000000005775ea in SrsEdgeRtmpUpstream::~SrsEdgeRtmpUpstream (this=0x111f690, __in_chrg=<value optimized out>) at src/app/srs_app_edge.cpp:73
#15 0x0000000000578b69 in SrsEdgeIngester::do_cycle (this=0x111eb00) at src/app/srs_app_edge.cpp:264
#16 0x000000000057899d in SrsEdgeIngester::cycle (this=0x111eb00) at src/app/srs_app_edge.cpp:243
#17 0x0000000000506b3a in SrsSTCoroutine::cycle (this=0x111fbd0) at src/app/srs_app_st.cpp:198
#18 0x0000000000506baf in SrsSTCoroutine::pfn (arg=0x111fbd0) at src/app/srs_app_st.cpp:213
#19 0x00000000005bac6e in _st_thread_main () at sched.c:337
#20 0x00000000005bb408 in st_thread_create (start=0x11cc880, arg=0x7f141f6214a0, joinable=32532, stk_size=525639216) at sched.c:616
#21 0x0000000000000000 in ?? ()
2020-07-01 19:31:01.673][Trace][38621][1186] RTMP client ip=183.146.212.194, fd=14
[2020-07-01 19:31:01.694][Trace][38621][1187] RTMP client ip=116.163.15.4, fd=15
[2020-07-01 19:31:01.701][Trace][38621][1186] complex handshake success
[2020-07-01 19:31:01.701][Trace][38621][1186] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.701][Trace][38621][1186] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.711][Trace][38621][1187] complex handshake success
[2020-07-01 19:31:01.714][Trace][38621][1187] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.714][Trace][38621][1187] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.723][Trace][38621][1185] complex handshake success.
[2020-07-01 19:31:01.723][Trace][38621][1185] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.744][Trace][38621][1187] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.744][Trace][38621][1187] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.744][Trace][38621][1187] source url=videocc.lottery.gov.cn/live/stream, ip=116.163.15.4, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.744][Trace][38621][1187] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.744][Trace][38621][1187] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.744][Trace][38621][1187] set fd=15, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.744][Trace][38621][1187] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.749][Trace][38621][1186] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.749][Trace][38621][1186] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.749][Trace][38621][1186] source url=videocc.lottery.gov.cn/live/stream, ip=183.146.212.194, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.749][Trace][38621][1186] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.749][Trace][38621][1186] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.749][Trace][38621][1186] set fd=14, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.750][Trace][38621][1186] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.756][Trace][38621][1188] RTMP client ip=120.92.147.213, fd=16
[2020-07-01 19:31:01.757][Trace][38621][1189] RTMP client ip=222.140.6.229, fd=17
[2020-07-01 19:31:01.773][Trace][38621][1185] connected, version=3.0.140.0, ip=218.98.48.216, pid=5241, id=871, dsu=1
[2020-07-01 19:31:01.784][Trace][38621][1189] complex handshake success
[2020-07-01 19:31:01.785][Trace][38621][1189] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.785][Trace][38621][1189] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.788][Trace][38621][1188] complex handshake success
[2020-07-01 19:31:01.789][Trace][38621][1188] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.789][Trace][38621][1188] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.800][Trace][38621][1185] edge change from 100 to state 101 (pull).
[2020-07-01 19:31:01.804][Trace][38621][1190] RTMP client ip=60.9.4.69, fd=18
[2020-07-01 19:31:01.820][Trace][38621][1189] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.820][Trace][38621][1189] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.820][Trace][38621][1189] source url=videocc.lottery.gov.cn/live/stream, ip=222.140.6.229, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.820][Trace][38621][1189] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.820][Trace][38621][1189] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.820][Trace][38621][1189] set fd=17, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.820][Trace][38621][1189] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.828][Trace][38621][1191] RTMP client ip=42.56.93.132, fd=19
[2020-07-01 19:31:01.834][Trace][38621][1190] complex handshake success
[2020-07-01 19:31:01.834][Trace][38621][1190] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.835][Trace][38621][1190] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.841][Trace][38621][1192] RTMP client ip=60.9.4.68, fd=20
[2020-07-01 19:31:01.847][Trace][38621][1188] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.847][Trace][38621][1188] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.847][Trace][38621][1188] source url=videocc.lottery.gov.cn/live/stream, ip=120.92.147.213, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.847][Trace][38621][1188] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.847][Trace][38621][1188] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.847][Trace][38621][1188] set fd=16, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.847][Trace][38621][1188] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.848][Trace][38621][1193] RTMP client ip=42.56.93.133, fd=21
[2020-07-01 19:31:01.880][Trace][38621][1190] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.880][Trace][38621][1190] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.880][Trace][38621][1190] source url=videocc.lottery.gov.cn/live/stream, ip=60.9.4.69, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.880][Trace][38621][1190] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.880][Trace][38621][1190] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.880][Trace][38621][1190] set fd=18, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.880][Trace][38621][1190] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.889][Trace][38621][1192] complex handshake success
[2020-07-01 19:31:01.890][Trace][38621][1192] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.890][Trace][38621][1192] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.890][Trace][38621][1191] complex handshake success
[2020-07-01 19:31:01.891][Trace][38621][1191] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.891][Trace][38621][1191] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.915][Trace][38621][1193] complex handshake success
[2020-07-01 19:31:01.932][Trace][38621][1193] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:31:01.932][Trace][38621][1193] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:31:01.960][Trace][38621][1192] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.960][Trace][38621][1192] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.960][Trace][38621][1192] source url=videocc.lottery.gov.cn/live/stream, ip=60.9.4.68, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.960][Trace][38621][1192] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.960][Trace][38621][1192] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.960][Trace][38621][1192] set fd=20, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.960][Trace][38621][1192] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:01.987][Trace][38621][1191] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:01.987][Trace][38621][1191] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:01.987][Trace][38621][1191] source url=videocc.lottery.gov.cn/live/stream, ip=42.56.93.132, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:01.987][Trace][38621][1191] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:01.987][Trace][38621][1191] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:01.987][Trace][38621][1191] set fd=19, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:01.987][Trace][38621][1191] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:02.021][Trace][38621][1193] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:31:02.021][Trace][38621][1193] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:31:02.021][Trace][38621][1193] source url=videocc.lottery.gov.cn/live/stream, ip=42.56.93.133, cache=1, is_edge=1, source_id=1185[1185]
[2020-07-01 19:31:02.021][Trace][38621][1193] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:31:02.021][Trace][38621][1193] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:31:02.021][Trace][38621][1193] set fd=21, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:31:02.021][Trace][38621][1193] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:31:03.909][Trace][38621][1194] RTMP client ip=210.22.153.26, fd=22
[2020-07-01 19:31:04.009][Warn][38621][1194][104] client disconnect peer. ret=1008
[2020-07-01 19:31:06.474][Warn][38621][1183][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.548][Warn][38621][1184][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.651][Warn][38621][1186][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.686][Warn][38621][1187][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.732][Warn][38621][1188][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.742][Warn][38621][1189][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.780][Warn][38621][1191][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.782][Trace][38621][1190] -> PLA time=0, msgs=0, okbps=6,0,0, ikbps=5,0,0, mw=100
[2020-07-01 19:31:06.782][Warn][38621][1190][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.804][Warn][38621][1193][104] client disconnect peer. ret=1007
[2020-07-01 19:31:06.854][Warn][38621][1185][62] EdgeIngester: Ignore error, code=1011 : recv message : recv interlaced message : read basic header : basic header requires 1 bytes : read bytes : timeout 5000 ms
thread [38621][1185]: ingest() [src/app/srs_app_edge.cpp:333][errno=62]
thread [38621][1185]: recv_message() [src/protocol/srs_rtmp_stack.cpp:389][errno=62]
thread [38621][1185]: recv_interlaced_message() [src/protocol/srs_rtmp_stack.cpp:871][errno=62]
thread [38621][1185]: read_basic_header() [src/protocol/srs_rtmp_stack.cpp:966][errno=62]
thread [38621][1185]: grow() [src/protocol/srs_protocol_stream.cpp:179][errno=62]
thread [38621][1185]: read() [src/service/srs_service_st.cpp:483][errno=62]
[2020-07-01 19:31:06.866][Trace][38621][1192] -> PLA time=0, msgs=0, okbps=6,0,0, ikbps=5,0,0, mw=100
[2020-07-01 19:31:06.866][Trace][38621][1192] cleanup when unpublish
[2020-07-01 19:31:06.866][Trace][38621][1192] edge change from 101 to state 0 (init).
[2020-07-01 19:31:06.866][Warn][38621][1192][4] client disconnect peer. ret=1007
[2020-07-01 19:31:23.787][Trace][38621][1195] RTMP client ip=210.22.153.26, fd=11
[2020-07-01 19:31:23.888][Warn][38621][1195][104] client disconnect peer. ret=1008
[2020-07-01 19:31:43.873][Trace][38621][1196] RTMP client ip=210.22.153.26, fd=11
[2020-07-01 19:31:43.973][Warn][38621][1196][104] client disconnect peer. ret=1008
[2020-07-01 19:32:01.417][Trace][38621][1197] RTMP client ip=101.69.177.130, fd=11
[2020-07-01 19:32:01.448][Trace][38621][1197] complex handshake success
[2020-07-01 19:32:01.448][Trace][38621][1197] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:01.448][Trace][38621][1197] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.500][Trace][38621][1197] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:01.500][Trace][38621][1197] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:01.500][Trace][38621][1197] source url=videocc.lottery.gov.cn/live/stream, ip=101.69.177.130, cache=1, is_edge=1, source_id=-1[-1]
[2020-07-01 19:32:01.500][Trace][38621][1197] create consumer, active=0, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:01.500][Trace][38621][1197] ignore disabled exec for vhost=videocc.lottery.gov.cn
[2020-07-01 19:32:01.500][Trace][38621][1197] set fd=11, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:01.500][Trace][38621][1197] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:01.500][Trace][38621][1197] update source_id=1198[1198]
[2020-07-01 19:32:01.510][Trace][38621][1199] RTMP client ip=222.140.6.228, fd=13
[2020-07-01 19:32:01.536][Trace][38621][1199] complex handshake success
[2020-07-01 19:32:01.537][Trace][38621][1199] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:01.537][Trace][38621][1199] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.573][Trace][38621][1198] complex handshake success.
[2020-07-01 19:32:01.573][Trace][38621][1198] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.580][Trace][38621][1199] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:01.580][Trace][38621][1199] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:01.580][Trace][38621][1199] source url=videocc.lottery.gov.cn/live/stream, ip=222.140.6.228, cache=1, is_edge=1, source_id=1198[1198]
[2020-07-01 19:32:01.580][Trace][38621][1199] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:32:01.580][Trace][38621][1199] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:01.580][Trace][38621][1199] set fd=13, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:01.580][Trace][38621][1199] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:01.624][Trace][38621][1198] connected, version=3.0.140.0, ip=218.98.48.215, pid=12750, id=462, dsu=1
[2020-07-01 19:32:01.658][Trace][38621][1198] edge change from 100 to state 101 (pull).
[2020-07-01 19:32:01.683][Trace][38621][1198] got metadata, width=720, height=576
[2020-07-01 19:32:01.683][Trace][38621][1198] 68B video sh,  codec(7, profile=Baseline, level=3.1, 720x576, 0kbps, 0.0fps, 0.0s)
[2020-07-01 19:32:01.703][Trace][38621][1200] RTMP client ip=218.60.55.245, fd=14
[2020-07-01 19:32:01.726][Trace][38621][1201] RTMP client ip=220.197.176.84, fd=15
[2020-07-01 19:32:01.732][Warn][38621][1199][4] client disconnect peer. ret=1009
[2020-07-01 19:32:01.736][Trace][38621][1202] RTMP client ip=119.6.237.228, fd=13
[2020-07-01 19:32:01.756][Warn][38621][1198][4] origin disconnected, retry, error code=1007 : recv message : recv interlaced message : read message payload : read 3617 bytes payload : read bytes : read
thread [38621][1198]: ingest() [src/app/srs_app_edge.cpp:333][errno=4]
thread [38621][1198]: recv_message() [src/protocol/srs_rtmp_stack.cpp:389][errno=4]
thread [38621][1198]: recv_interlaced_message() [src/protocol/srs_rtmp_stack.cpp:905][errno=4]
thread [38621][1198]: read_message_payload() [src/protocol/srs_rtmp_stack.cpp:1290][errno=4]
thread [38621][1198]: grow() [src/protocol/srs_protocol_stream.cpp:179][errno=4]
thread [38621][1198]: read() [src/service/srs_service_st.cpp:490][errno=4]
[2020-07-01 19:32:01.761][Trace][38621][1200] complex handshake success
[2020-07-01 19:32:01.767][Trace][38621][1200] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:01.767][Trace][38621][1200] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.768][Trace][38621][1201] complex handshake success
[2020-07-01 19:32:01.768][Trace][38621][1201] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:01.768][Trace][38621][1201] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.784][Trace][38621][1202] complex handshake success
[2020-07-01 19:32:01.784][Trace][38621][1202] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:01.784][Trace][38621][1202] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:01.843][Trace][38621][1201] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:01.843][Trace][38621][1201] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:01.843][Trace][38621][1201] source url=videocc.lottery.gov.cn/live/stream, ip=220.197.176.84, cache=1, is_edge=1, source_id=1198[1198]
[2020-07-01 19:32:01.843][Trace][38621][1201] dispatch cached gop success. count=28, duration=433
[2020-07-01 19:32:01.843][Trace][38621][1201] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:01.843][Trace][38621][1201] set fd=15, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:01.843][Trace][38621][1201] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:01.867][Trace][38621][1200] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:01.867][Trace][38621][1200] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:01.867][Trace][38621][1200] source url=videocc.lottery.gov.cn/live/stream, ip=218.60.55.245, cache=1, is_edge=1, source_id=1198[1198]
[2020-07-01 19:32:01.867][Trace][38621][1200] dispatch cached gop success. count=28, duration=433
[2020-07-01 19:32:01.867][Trace][38621][1200] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:01.867][Trace][38621][1200] set fd=14, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:01.867][Trace][38621][1200] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:01.867][Trace][38621][1202] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:01.867][Trace][38621][1202] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:01.867][Trace][38621][1202] source url=videocc.lottery.gov.cn/live/stream, ip=119.6.237.228, cache=1, is_edge=1, source_id=1198[1198]
[2020-07-01 19:32:01.867][Trace][38621][1202] dispatch cached gop success. count=28, duration=433
[2020-07-01 19:32:01.867][Trace][38621][1202] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:01.867][Trace][38621][1202] set fd=13, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:01.867][Trace][38621][1202] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:02.193][Warn][38621][1201][104] client disconnect peer. ret=1007
[2020-07-01 19:32:02.217][Warn][38621][1202][104] client disconnect peer. ret=1007
[2020-07-01 19:32:02.217][Trace][38621][1200] cleanup when unpublish
[2020-07-01 19:32:02.217][Trace][38621][1200] edge change from 101 to state 0 (init).
[2020-07-01 19:32:02.217][Warn][38621][1200][4] client disconnect peer. ret=1007
[2020-07-01 19:32:02.665][Trace][38621][1203] RTMP client ip=124.165.122.4, fd=12
[2020-07-01 19:32:02.730][Trace][38621][1203] complex handshake success
[2020-07-01 19:32:02.732][Trace][38621][1203] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:02.732][Trace][38621][1203] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:02.844][Trace][38621][1203] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:02.844][Trace][38621][1203] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:02.844][Trace][38621][1203] source url=videocc.lottery.gov.cn/live/stream, ip=124.165.122.4, cache=1, is_edge=1, source_id=-1[-1]
[2020-07-01 19:32:02.844][Trace][38621][1203] create consumer, active=0, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:02.844][Trace][38621][1203] ignore disabled exec for vhost=videocc.lottery.gov.cn
[2020-07-01 19:32:02.844][Trace][38621][1203] set fd=12, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:02.844][Trace][38621][1203] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:02.844][Trace][38621][1203] update source_id=1204[1204]
[2020-07-01 19:32:02.898][Trace][38621][1205] RTMP client ip=42.56.93.133, fd=14
[2020-07-01 19:32:02.907][Trace][38621][1204] complex handshake success.
[2020-07-01 19:32:02.907][Trace][38621][1204] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:02.947][Trace][38621][1205] complex handshake success
[2020-07-01 19:32:02.947][Trace][38621][1205] connect app, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, args=null
[2020-07-01 19:32:02.947][Trace][38621][1205] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2020-07-01 19:32:02.959][Trace][38621][1204] connected, version=3.0.140.0, ip=218.98.48.216, pid=5241, id=872, dsu=1
[2020-07-01 19:32:02.985][Trace][38621][1204] edge change from 100 to state 101 (pull).
[2020-07-01 19:32:03.125][Trace][38621][1205] client identified, type=Play, vhost=videocc.lottery.gov.cn, app=live, stream=stream, param=, duration=-1ms
[2020-07-01 19:32:03.126][Trace][38621][1205] connected stream, tcUrl=rtmp://videocc.lottery.gov.cn:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=videocc.lottery.gov.cn, port=1935, app=live, stream=stream, param=, args=null
[2020-07-01 19:32:03.126][Trace][38621][1205] source url=videocc.lottery.gov.cn/live/stream, ip=42.56.93.133, cache=1, is_edge=1, source_id=1204[1204]
[2020-07-01 19:32:03.126][Trace][38621][1205] dispatch cached gop success. count=0, duration=-1
[2020-07-01 19:32:03.126][Trace][38621][1205] create consumer, active=1, queue_size=0.00, jitter=11000000
[2020-07-01 19:32:03.126][Trace][38621][1205] set fd=14, SO_SNDBUF=40960=>50000, buffer=100ms
[2020-07-01 19:32:03.126][Trace][38621][1205] start play smi=0ms, mw_sleep=100, mw_enabled=1, realtime=1, tcp_nodelay=0
[2020-07-01 19:32:04.355][Trace][38621][1206] RTMP client ip=210.22.153.26, fd=15
[2020-07-01 19:32:04.453][Warn][38621][1206][104] client disconnect peer. ret=1008
[2020-07-01 19:32:30.395][Trace][38911][0] SRS/3.0.140(OuXuli), The MIT License (MIT)
[2020-07-01 19:32:30.395][Trace][38911][0] contributors: ossrs
[2020-07-01 19:32:30.395][Trace][38911][0] cwd=/usr/local/srs/objs, work_dir=./, build: 2020-06-29 22:32:03, configure: --x86-x64 , uname: Linux 12 2.6.32-642.13.1.el6.x86_64 #1 SMP Wed Jan 11 20:56:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux, osx: 0
[2020-07-01 19:32:30.395][Trace][38911][0] configure detail: --prefix=/usr/local/srs --with-hls --with-hds --with-dvr --with-ssl --with-transcode --with-ingest --with-stat --with-http-callback --with-http-server --with-stream-caster --with-http-api --with-librtmp --without-research --without-utest --without-gperf --without-gmc --without-gmd --without-gmp --without-gcp --without-gprof --log-trace --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2020-07-01 19:32:30.395][Trace][38911][0] srs checking config...
[2020-07-01 19:32:30.396][Trace][38911][0] ips, iface[0] p4p2 ipv4 0x11043 220.202.154.37, iface[1] p4p2:1 ipv4 0x11043 220.202.154.36, iface[2] p4p2.21 ipv4 0x11043 220.202.154.51, iface[3] p4p2 ipv6 0x11043 fe80::92e2:baff:fe34:535f0x623a326532393a3a4p2, iface[4] p4p2.21 ipv6 0x11043 fe80::92e2:baff:fe34:535f0x343365663a6666614p2.21
[2020-07-01 19:32:30.396][Trace][38911][0] devices, internet p4p2 220.202.154.37, internet p4p2:1 220.202.154.36, internet p4p2.21 220.202.154.51, intranet p4p2 fe80::92e2:baff:fe34:535f0x6532393a3a3038654p2, intranet p4p2.21 fe80::92e2:baff:fe34:535f0x663a666661623a324p2.21
[2020-07-01 19:32:30.396][Warn][38911][0][0] stats network use index=0, ip=220.202.154.37
[2020-07-01 19:32:30.396][Warn][38911][0][0] stats disk list: sda md0 
[2020-07-01 19:32:30.396][Trace][38911][0] write log to file /usr/local/srs/log/error.log
[2020-07-01 19:32:30.396][Trace][38911][0] you can: tailf /usr/local/srs/log/error.log
[2020-07-01 19:32:30.396][Trace][38911][0] @see: https://github.com/ossrs/srs/wiki/v1_CN_SrsLog
[2020-07-01 19:32:30.396][Trace][38911][0] features, rch:on, dash:on, hls:on, hds:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2020-07-01 19:32:30.396][Trace][38911][0] SRS on  amd64 x86_64, conf:/usr/local/srs/conf/customers.conf, limit:20480, writev:1024, encoding:little-endian, HZ:100
[2020-07-01 19:32:30.396][Trace][38911][0] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2020-07-01 19:32:30.396][Trace][38911][0] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2020-07-01 19:32:30.396][Trace][38911][0] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2020-07-01 19:32:30.396][Warn][38911][0][0] SRS/3.0.140 is beta
[2020-07-01 19:32:30.397][Trace][38911][0] http flv live stream, vhost=flv.live-yiyun.rela.me, mount=[vhost]/[app]/[stream].flv
[2020-07-01 19:32:30.397][Trace][38911][0] http: root mount to /var/www/html/zhibo
[2020-07-01 19:32:30.397][Trace][38911][0] start daemon mode...
[2020-07-01 19:32:30.397][Trace][38912][0] father process exit
[2020-07-01 19:32:30.397][Trace][38913][0] son(daemon) process running.

error.log'

Please make sure to maintain the markdown structure.

  1. The configuration of SRS is as follows (Config):
vhost videocc.lottery.gov.cn {
    min_latency     on;
    mr {
        enabled     off;
    }

    mw_latency      100;
    gop_cache       on;
    queue_length    11;

    mode            remote;
    origin          218.xxx.xxx.xxx:1935;
    vhost           videocc.lottery.gov.cn;
}

Replay

How to replay bug?

A large number of clients access the system.

Expected behavior (Expect)

Normal playback.

TRANS_BY_GPT3

han4235 avatar Jul 02 '20 02:07 han4235

It should be the failure of the backend upstream to release the file descriptor that caused the assertion to fail.

TRANS_BY_GPT3

han4235 avatar Jul 02 '20 08:07 han4235

Can this issue be taken up? I think it wont be much work, but fixing it can resolve our issue in production.

xoraingroup avatar Oct 13 '20 13:10 xoraingroup

Does it seem like a problem caused by concurrent origin fetching?

TRANS_BY_GPT3

winlinvip avatar Dec 01 '20 10:12 winlinvip

Is there any expert with a solution? I also encountered this problem when calling the delete_stream_channel interface. Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) #0 0x00007fb69efae387 in raise () from /lib64/libc.so.6 #1 0x00007fb69efafa78 in abort () from /lib64/libc.so.6 #2 0x00007fb69efa71a6 in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007fb69efa7252 in __assert_fail () from /lib64/libc.so.6 #4 0x00000000004cc1a8 in srs_close_stfd (stfd=@0x330acc8: 0x2b271b0) at src/protocol/srs_service_st.cpp:96 #5 0x00000000004ce913 in SrsTcpClient::close (this=0x330acc0) at src/protocol/srs_service_st.cpp:672 #6 0x00000000004ce511 in SrsTcpClient::~SrsTcpClient (this=0x330acc0, __in_chrg=, __vtt_parm=) at src/protocol/srs_service_st.cpp:642 #7 0x00000000004ce6f5 in SrsTcpClient::~SrsTcpClient (this=0x330acc0, __in_chrg=, __vtt_parm=) at src/protocol/srs_service_st.cpp:645 #8 0x00000000004d78b3 in SrsBasicRtmpClient::close (this=0x3d98300) at src/protocol/srs_service_rtmp_conn.cpp:99 #9 0x00000000004d7397 in SrsBasicRtmpClient::~SrsBasicRtmpClient (this=0x3d98300, __in_chrg=) at src/protocol/srs_service_rtmp_conn.cpp:57 #10 0x00000000004f6080 in SrsSimpleRtmpClient::~SrsSimpleRtmpClient (this=0x3d98300, __in_chrg=) at src/app/srs_app_rtmp_conn.cpp:78 #11 0x00000000004f609d in SrsSimpleRtmpClient::~SrsSimpleRtmpClient (this=0x3d98300, __in_chrg=) at src/app/srs_app_rtmp_conn.cpp:80 #12 0x000000000067952d in SrsGb28181RtmpMuxer::close (this=0x352a140) at src/app/srs_app_gb28181.cpp:2266 #13 0x0000000000676a27 in SrsGb28181RtmpMuxer::stop (this=0x352a140) at src/app/srs_app_gb28181.cpp:1623 #14 0x000000000067e53b in SrsGb28181Manger::delete_stream_channel (this=0x2894030, id="34000005510000040181", chid="34020000001310000001") at src/app/srs_app_gb28181.cpp:2787 #15 0x0000000000592aa2 in SrsGoApiGb28181::do_serve_http (this=0x2a9fae0, w=0x59ff4c0, r=0x2fb8c40) at src/app/srs_app_http_api.cpp:1498 #16 0x0000000000591d28 in SrsGoApiGb28181::serve_http (this=0x2a9fae0, w=0x59ff4c0, r=0x2fb8c40) at src/app/srs_app_http_api.cpp:1435 #17 0x00000000004b5057 in SrsHttpServeMux::serve_http (this=0x27efd00, w=0x59ff4c0, r=0x2fb8c40) at src/protocol/srs_http_stack.cpp:732 #18 0x00000000004b5d97 in SrsHttpCorsMux::serve_http (this=0x2f73e20, w=0x59ff4c0, r=0x2fb8c40) at src/protocol/srs_http_stack.cpp:880 #19 0x000000000059a02e in SrsHttpConn::process_request (this=0x2b2d990, w=0x59ff4c0, r=0x2fb8c40, rid=1) at src/app/srs_app_http_conn.cpp:250 #20 0x0000000000599d0e in SrsHttpConn::process_requests (this=0x2b2d990, preq=0x59ff5e0) at src/app/srs_app_http_conn.cpp:223 #21 0x00000000005998fe in SrsHttpConn::do_cycle (this=0x2b2d990) at src/app/srs_app_http_conn.cpp:177 #22 0x000000000059930c in SrsHttpConn::cycle (this=0x2b2d990) at src/app/srs_app_http_conn.cpp:122 #23 0x000000000052bb0f in SrsFastCoroutine::cycle (this=0x34f52f0) at src/app/srs_app_st.cpp:270 #24 0x000000000052bb92 in SrsFastCoroutine::pfn (arg=0x34f52f0) at src/app/srs_app_st.cpp:285 #25 0x00000000006e3c48 in _st_thread_main () at sched.c:363 #26 0x00000000006e44c2 in st_thread_create (start=0x6e8a54 <_st_epoll_pollset_add+746>, arg=0x3b48870, joinable=1, stk_size=65536) at sched.c:694 Backtrace stopped: previous frame inner to this frame (corrupt stack?) delete_channel

TRANS_BY_GPT3

ZhouMin216 avatar May 14 '21 03:05 ZhouMin216

Dup to #1941

winlinvip avatar Apr 22 '24 00:04 winlinvip