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

Crash by HTTP API DELETE. #1708

Closed
franzwarning opened this issue Apr 16, 2020 · 7 comments
Closed

Crash by HTTP API DELETE. #1708

franzwarning opened this issue Apr 16, 2020 · 7 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@franzwarning
Copy link

franzwarning commented Apr 16, 2020

Hi,

srs version: 3.0.140
server: centos 7

I'm getting a crash when connecting/disconnecting via rtmp with the following message:

srs: src/app/srs_app_st.cpp:146: virtual void SrsSTCoroutine::stop(): Assertion `!r0' failed.

        int r0 = st_thread_join((st_thread_t)trd, &res);
        srs_assert(!r0);

A few things I've noticed about the crash, is it is always near an "this stream is busy" log.

Here are the surrounding logs:

[2020-04-11 00:38:39.381][Trace][1794][789] http: on_unpublish ok, client_id=789, url=http://xxxx/srs_on_unpublish/, request={"action":"on_unpublish","client_id":789,"ip":"108.184.89.147","vhost":"xxx","app":"live","stream":"aimeneveu","param":"?token=speedy-husky"}, response=0
[2020-04-11 00:38:39.381][Error][1794][789][11] serve error code=1028 : service cycle : rtmp: stream service : rtmp: stream xxx/live/aimeneveu is busy
thread [1794][789]: do_cycle() [src/app/srs_app_rtmp_conn.cpp:210][errno=11]
thread [1794][789]: service_cycle() [src/app/srs_app_rtmp_conn.cpp:399][errno=11]
thread [1794][789]: acquire_publish() [src/app/srs_app_rtmp_conn.cpp:931][errno=11](Resource temporarily unavailable)
[2020-04-11 00:38:39.400][Trace][1794][765] SIGKILL stop process pid=2384 ok.
[2020-04-11 00:38:39.400][Trace][1794][765] send SIGTERM to pid=2385
[2020-04-11 00:38:39.401][Warn][1794][766][11] client disconnect peer. ret=1007
[2020-04-11 00:38:39.401][Trace][1794][771] cleanup when unpublish
[2020-04-11 00:38:39.455][Trace][1794][771] http: on_unpublish ok, client_id=771, url=http://xxxx/srs_on_unpublish/, request={"action":"on_unpublish","client_id":771,"ip":"127.0.0.1","vhost":"xxx","app":"live","stream":"aimeneveu_audio_only","param":"?vhost=xxx"}, response=0
[2020-04-11 00:38:39.455][Warn][1794][771][11] client disconnect peer. ret=1007
[2020-04-11 00:38:39.547][Trace][1794][790] API server client, ip=34.228.80.215
[2020-04-11 00:38:39.547][Trace][1794][790] HTTP API GET http://xxx/api/v1/streams/, content-length=-1, chunked=0/0
[2020-04-11 00:38:39.547][Trace][1794][790] client finished.
srs: src/app/srs_app_st.cpp:146: virtual void SrsSTCoroutine::stop(): Assertion `!r0' failed.
[2020-04-11 00:38:39.585][Trace][1794][791] API server client, ip=34.228.80.215
[2020-04-11 00:38:39.585][Trace][1794][791] HTTP API DELETE http://xxx/api/v1/clients/765/, content-length=0, chunked=0/0

Anyone have any ideas how to fix this?

@franzwarning
Copy link
Author

Update -- seems like its more a problem with the HTTP API DELETE call when I'm trying to kick off a client who is publishing an rtmp stream

@zxh126
Copy link

zxh126 commented May 5, 2020

Switch to version 4.0 and give it a try.
git pull && git checkout 4.0release && ./configure && make

TRANS_BY_GPT3

@xoraingroup
Copy link

Tried 4.0, same issue. This issue is persistent in both 3.0 and 4.0.

@winlinvip
Copy link
Member

Check it.

@winlinvip winlinvip added the Bug It might be a bug. label Dec 1, 2020
@winlinvip winlinvip added this to the SRS 3.0 release milestone Dec 1, 2020
@winlinvip winlinvip changed the title srs crash src/app/srs_app_st.cpp:146: virtual void SrsSTCoroutine::stop(): Assertion `!r0' failed. Crash by HTTP API DELETE. Dec 1, 2020
@winlinvip
Copy link
Member

winlinvip commented Aug 26, 2021

This is another random issue, let me see if I can reproduce it.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Nov 15, 2021

From the logs, it can be seen that a lot of things happened within 200 milliseconds, including flow busy, stopping the ffmpeg subprocess, and callbacks. It is definitely related to this.

TRANS_BY_GPT3

winlinvip added a commit that referenced this issue Nov 15, 2021
@winlinvip winlinvip added Won't fix We won't fix it. and removed Won't fix We won't fix it. labels Dec 9, 2022
@winlinvip
Copy link
Member

Fixed

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 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. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

5 participants