8000 CRASH: SRS2 crashed for TS encoder assert failed. · Issue #834 · ossrs/srs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CRASH: SRS2 crashed for TS encoder assert failed. #834
Closed
@winlinvip

Description

@winlinvip

I found SRS2 crashed for some special audio/video packets:

Program terminated with signal 6, Aborted.
#0  0x00007f285cf82625 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.149.el6_6.5.x86_64 libgcc-4.4.7-17.el6.x86_64 libstdc++-4.4.7-17.el6.x86_64
(gdb) bt
#0  0x00007f285cf82625 in raise () from /lib64/libc.so.6
#1  0x00007f285cf83e05 in abort () from /lib64/libc.so.6
#2  0x00007f285cf7b74e in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f285cf7b810 in __assert_fail () from /lib64/libc.so.6
#4  0x000000000041bd38 in SrsTsContext::encode_pes (this=0x4b80090, writer=0x4bacbe0, msg=0x48a67a0, pid=257, sid=SrsTsStreamAudioAAC, pure_audio=false)
    at src/kernel/srs_kernel_ts.cpp:453
#5  0x000000000041b4c0 in SrsTsContext::encode (this=0x4b80090, writer=0x4bacbe0, msg=0x48a67a0, vc=SrsCodecVideoAVC, ac=SrsCodecAudioAAC)
    at src/kernel/srs_kernel_ts.cpp:367
#6  0x00000000004251b4 in SrsTSMuxer::write_audio (this=0x4babb40, audio=0x48a67a0) at src/kernel/srs_kernel_ts.cpp:2744
#7  0x0000000000497ba3 in SrsHlsMuxer::flush_audio (this=0x4d65c40, cache=0x4a55730) at src/app/srs_app_hls.cpp:678
#8  0x000000000049a49a in SrsHlsCache::on_unpublish (this=0x4d2adc0, muxer=0x4d65c40) at src/app/srs_app_hls.cpp:1033
#9  0x000000000049b74f in SrsHls::on_unpublish (this=0x4b7f500) at src/app/srs_app_hls.cpp:1315
#10 0x000000000048a8d0 in SrsSource::on_audio_imp (this=0x4d64e80, msg=0x7f28507e6b00) at src/app/srs_app_source.cpp:1688
#11 0x0000000000489ffd in SrsSource::on_audio (this=0x4d64e80, shared_audio=0x4e13af0) at src/app/srs_app_source.cpp:1592
#12 0x00000000004801d4 in SrsRtmpConn::process_publish_message (this=0x48a4e60, source=0x4d64e80, msg=0x4e13af0, vhost_is_edge=false)
    at src/app/srs_app_rtmp_conn.cpp:1036
#13 0x0000000000480051 in SrsRtmpConn::handle_publish_message (this=0x48a4e60, source=0x4d64e80, msg=0x4e13af0, is_fmle=true, vhost_is_edge=false)
    at src/app/srs_app_rtmp_conn.cpp:1013
#14 0x0000000000517461 in SrsPublishRecvThread::handle (this=0x7f285080a890, msg=0x4e13af0) at src/app/srs_app_recv_thread.cpp:386
#15 0x0000000000516002 in SrsRecvThread::cycle (this=0x7f285080a898) at src/app/srs_app_recv_thread.cpp:100
#16 0x00000000004b1e13 in SrsReusableThread2::cycle (this=0x4cf8f00) at src/app/srs_app_thread.cpp:540
#17 0x00000000004b0d49 in internal::SrsThread::thread_cycle (this=0x4e1af30) at src/app/srs_app_thread.cpp:207
#18 0x00000000004b0f5c in internal::SrsThread::thread_fun (arg=0x4e1af30) at src/app/srs_app_thread.cpp:245

TS encoder assert failed:

(gdb) f 4
#4  0x000000000041bd38 in SrsTsContext::encode_pes (this=0x4b80090, writer=0x4bacbe0, msg=0x48a67a0, pid=257, sid=SrsTsStreamAudioAAC, pure_audio=false)
    at src/kernel/srs_kernel_ts.cpp:453
453	    srs_assert(channel);
(gdb) p channel
$1 = (SrsTsChannel *) 0x0
(gdb) p *this
$2 = {_vptr.SrsTsContext = 0x88c650, pids = std::map with 2 elements = {[0] = 0x494b640, [4097] = 0x4d4a9f0}, pure_audio = false, vcodec = SrsCodecVideoAVC, 
  acodec = SrsCodecAudioAAC}

The caller stack:

(gdb) f 5
#5  0x000000000041b4c0 in SrsTsContext::encode (this=0x4b80090, writer=0x4bacbe0, msg=0x48a67a0, vc=SrsCodecVideoAVC, ac=SrsCodecAudioAAC)
    at src/kernel/srs_kernel_ts.cpp:367
367	        return encode_pes(writer, msg, audio_pid, as, vs == SrsTsStreamReserved);
(gdb) p *this
$3 = {_vptr.SrsTsContext = 0x88c650, pids = std::map with 2 elements = {[0] = 0x494b640, [4097] = 0x4d4a9f0}, pure_audio = false, vcodec = SrsCodecVideoAVC, 
  acodec = SrsCodecAudioAAC}

Metadata

Metadata

Assignees

Labels

BugIt might be a bug.TransByAITranslated by AI/GPT.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0