recording-daemon logs LOG_ERR "Failed to open ... No such file or directory" when the metafile was already deleted (delete-delay = 0)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- backend, observability
Research direction
Read recording-daemon/metafile.c around line 378 and recording-daemon/inotify.c lines 52–55 to follow how close-write and delete events are handled. Reproduce or trace the case where the metafile is gone before metafile_change() opens it, then adjust the ENOENT handling as suggested. Done when the expected missing-file case is logged at debug level and normal deletion handling remains intact.
Written by the indexing model from the issue text.
Description
Version: mr26.2.1.2. Same code on master (recording-daemon/metafile.c:378, recording-daemon/inotify.c:52-55).
What happens
rtpengine writes the metafile with open-write-close for every update, and with delete-delay = 0 it deletes the metafile right after the last write when the call ends. The recording daemon watches the spool directory for IN_CLOSE_WRITE | IN_DELETE. By the time it handles the last IN_CLOSE_WRITE, the file is already gone, so metafile_change() logs, at LOG_ERR:
Failed to open <spool-dir>/<name>.meta: No such file or directory
It then handles the IN_DELETE that follows normally, and the recordings are complete. So nothing is lost, but the error-level noise is large: about 19,700 such lines between 17:00 and 23:00 one evening, which buried real errors.
A positive delete-delay avoids it (that is what we did), but delete-delay = 0 is a valid setting.
Suggestion
In metafile_change(), treat ENOENT as expected (the delete event is on its way) and log it at debug level.
- Dominant language
- Perl
- Stars
- 992
- Forks
- 459
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from sipwise/rtpengine
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
HTTP/WS worker threads spin forever in `__websocket_write_done()` (`sched_yield` loop) — 100% CPU with `--listen-http`Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 15/100
sipwise/rtpengine#2197 · 1 comment ·
Maintainers usually reply within 1 day
-
Kernel NULL pointer dereference in target_put() during target deletionPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
sipwise/rtpengine#2190 · 1 comment ·
Maintainers usually reply within 1 day
-
Calls using a third logical interface are silently never written to Redis (breaks keyspace-notification HA)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sipwise/rtpengine#2181 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
sipwise/rtpengine#2162 · 1 comment ·
Maintainers usually reply within 1 day
All issues in sipwise/rtpengine
Similar issues
-
fix(api): API v3 Product Read ignores request language (lc) for sample products and image URLsPossibly taken @muntasir-396 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openfoodfacts/openfoodfacts-server#15042 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
libwww-perl/URI#214 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dekobon/big-code-analysis#1644 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
inverse-inc/packetfence#9549 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100