-
Notifications
You must be signed in to change notification settings - Fork 30
Description
The following error message is logged when removing a flow:
Failed to remove inotify watch (wd=1) for '.../mxl/domain/717f834b-4224-4c9b-8a64-ecb7726803b8.mxl-flow/access': Invalid argument
It occurs when one process attempts to release a flow that was already removed by a second process.
The code that produces this message is actually logging it as a warning, not strictly an error, because no error is propagated to the caller.
I encountered this when running the "fate-mxl-video-encdec" test in the ffmpeg/mxl integration found here: https://github.com/cbcrc/FFmpeg/tree/dmf-mxl/master.
I believe the root cause is that the DomainWatcher implementation is not handling the inotify IN_IGNORED event. The subsequent call to inotify_rm_watch() then returns an error.
Expected bahavior:
i) The log message should be a warning, not an error, if no error is propagated.
ii) The inotify watcher should (could) handle the IN_IGNORED event and then not call inotify_rm_watch() to avoid the warning.
Tested with Ubunutu 24.04 and gcc version 13.3.0
Here is a diff of my work local around:
diff --git a/lib/internal/src/DomainWatcher.cpp b/lib/internal/src/DomainWatcher.cpp
index b448bd1..6880229 100644
--- a/lib/internal/src/DomainWatcher.cpp
+++ b/lib/internal/src/DomainWatcher.cpp
@@ -375,6 +375,10 @@ namespace mxl::lib
MXL_ERROR("Unknown exception in DomainWatcher callback");
}
}
+ else if (event->mask & IN_IGNORED) {
+ MXL_DEBUG("IN_IGNORED");
+ _watches.erase(it);
+ }
}
ptr += sizeof(struct inotify_event) + event->len;
}