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

【bug】【崩溃】rtmp连接异常导致崩溃 #2

Open
HWilliamgo opened this issue Oct 23, 2021 · 0 comments
Open

【bug】【崩溃】rtmp连接异常导致崩溃 #2

HWilliamgo opened this issue Oct 23, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@HWilliamgo
Copy link
Owner

栈溢出导致的崩溃:

【现象】在遇到远端网络或者近端网络问题导致发送失败,本队rtmp内部自动重试重发,发生崩溃。
【原因】初步估计为网络重试的无限递归调用导致的栈溢出,引起程序崩溃。
【排查】

  1. RTMP_SendPacket
  2. WriteN
  3. RTMP_Close
  4. SendFCUnpublish
  5. RTMP_SendPacket

如何解决这个不断重发导致的崩溃问题?

  1. rtmp dump本身有设置或者钩子函数;
  2. 需要我们自己改rtmp dump的代码;
    【其他问题】
    在测试过程中发现,斗鱼的rtmp服务端不会对码流数据做超时校验,不会主动断开连接,而保利威rtmp服务端会对码流数据做有效性超时校验,一段时间后码流异常则拒绝连接,不再接受rtmp包。初步猜想是通过码流中是否有正常的sps和pps来做验证的。
@HWilliamgo HWilliamgo added the bug Something isn't working label Oct 23, 2021
@HWilliamgo HWilliamgo self-assigned this Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant