mpv does not close file descriptors over time
Open
Nobody has claimed this yet.
os:linux
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important Information
- mpv version: mpv 0.33.1
- Linux Distribution and Version: Alpine Linux 3.14
- Source of the mpv binary: Alpine Linux packages
- Window Manager and version: none
- GPU driver and version: in-kernel i915 1.6.0
Reproduction steps
mpv --idle --terminal=no --input-ipc-server=/tmp/mpv20210609-3556-4mh4ad.sock --no-config --log-file=/var/video/mpv.log --vo=gpu --gpu-context=drm --hwdec=vaapi --fs=yes --profile=low-latency --no-audio --no-cache --no-osc --no-input-default-bindings --load-osd-console=no --load-scripts=no --load-stats-overlay=no- send multiple
loadfile rtsp://...andstopcommands via ipc socket
Expected behavior
mpv should close file and socket descriptors when it's done playing streams
Actual behavior
$ ls /proc/3617/fd | wc -l
26218
○ ls -lt /proc/3617/fd | head
total 0
l-wx------ 1 root root 64 Jun 16 02:23 26194 -> pipe:[358170]
lr-x------ 1 root root 64 Jun 16 02:23 26203 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26204 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26205 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26206 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26207 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26208 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26211 -> /dmabuf:
lr-x------ 1 root root 64 Jun 16 02:23 26212 -> /dmabuf:
Log file
just a few loadfiles at the start: https://pastebin.com/29MPEE97
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided mpv command and sending repeated loadfile and stop commands through the IPC socket while monitoring /proc//fd. Done means file, socket, pipe, and dmabuf descriptors no longer accumulate after streams stop; the issue names no source files or tests to inspect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100