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

Player repeatedly requesting non-existent http-flv streams can cause fd leak #858

Closed
walkermi opened this issue Apr 24, 2017 · 9 comments
Closed
Assignees
Labels
TransByAI Translated by AI/GPT.
Milestone

Comments

@walkermi
Copy link
Contributor

walkermi commented Apr 24, 2017

  1. 2.0 release branch, this is the latest code.
  2. Compilation.
    ./configure --full --without-ffmpeg --without-nginx
  3. Configuration file.
    listen 1935; max_connections 8000; srs_log_tank file; srs_log_file ./objs/srs.log; #daemon on; http_api { enabled on; listen 1985; } http_server { enabled on; listen 80; dir /usr/local/srs/objs/hls; } stats { network 0; disk sda sdb xvda xvdb; } vhost __defaultVhost__ { http_remux { enabled on; mount /[app]/[stream].flv; hstrs on; } }
  4. Do not push any stream, repeatedly open and close the HTTP stream using the test player ffplay at http://xxx.xxx.xxx.xxx/app/1.flv.
  5. The number of close_wait will increase each time the player is opened and closed.
  6. Unable to break out of the loop here.
    image

TRANS_BY_GPT3

@walkermi
Copy link
Contributor Author

walkermi commented Apr 24, 2017

It seems to be the same issue as #636, although it has a backtrace. Similarly, serve_http cannot break out of the loop.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

dup to #636

@walkermi
Copy link
Contributor Author

walkermi commented Apr 25, 2017

#633 The same issue also occurs when the player requests a non-existent http-flv, resulting in a large number of close_wait.

TRANS_BY_GPT3

@walkermi walkermi reopened this Apr 25, 2017
@winlinvip
Copy link
Member

winlinvip commented Apr 25, 2017

Duplicated to #636
#636 has been duplicated, it will be addressed in that issue, so this one can be closed.

TRANS_BY_GPT3

@walkermi
Copy link
Contributor Author

walkermi commented Apr 26, 2017

hstrs off;

Setting this configuration item seems to prevent close_wait from continuously increasing. @winlinvip

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented May 1, 2017

This feature has been removed and will be removed during configuration parsing by default. If you find it still useful, you can raise another bug separately.

TRANS_BY_GPT3

@rageJune
Copy link

rageJune commented Jan 16, 2019

The phenomenon still exists, repeatedly pulling disconnected non-existent flv streams will increase the close_wait, and it will be included in the statistics of clients.

srs version: 3.0.45
Configuration file: conf/http.flv.live.conf

51233031-b0ea0080-19a3-11e9-923d-55d3d8059be6
image
image

TRANS_BY_GPT3

@rageJune
Copy link

rageJune commented Jan 16, 2019

Also tested the situation in cluster mode:
`

edge.conf

listen 1935;
max_connections 1000;
pid objs/edge.pid;
daemon off;
srs_log_tank console;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost defaultVhost {
cluster {
mode remote;
origin 127.0.0.1:19350;
}
http_remux {
enabled on;
mount [app]/[stream].flv;
hstrs on;
}
}
`
After pulling a non-existent FLV stream and disconnecting, the connection between origin and edge is still being repeatedly established.
image

TRANS_BY_GPT3

@winlinvip
Copy link
Member

Fixed by f2b4bc7

@winlinvip winlinvip self-assigned this Sep 17, 2021
@winlinvip winlinvip added this to the 2.0 milestone Sep 17, 2021
@winlinvip winlinvip changed the title 播放器反复请求不存在的http-flv流,会造成fd leak Player repeatedly requesting non-existent http-flv streams can cause fd leak Jul 28, 2023
@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
TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants