File descriptor leak on Raspberry Pi
Jérôme Laheurte
jerome at jeromelaheurte.net
Thu Apr 27 12:47:39 UTC 2023
Hello everybody. There seems to be a file descriptor leak in the device monitor API on ARM; using this sample program:
#include <unistd.h>
#include <gst/gst.h>
int main(int argc, char *argv[]) {
gst_init(&argc, &argv);
while (1) {
GstDeviceMonitor* monitor = gst_device_monitor_new();
if (!gst_device_monitor_start(monitor))
return 1;
gst_device_monitor_stop(monitor);
gst_object_unref(monitor);
sleep(1);
}
return 0;
}
and monitoring /proc/[pid]/fd, there’s one new file descriptor every second created by eventfd2. Funny thing this only happens on a Raspberry Pi 4B (Raspbian). Versions tested:
* GStreamer 1.14.4 RPi: leak
* GStreamer 1.18.4 RPi: leak
* GStreamer 1.18.4 Intel: no leak
* GStreamer 1.16.3 Intel: no leak
The only device provider is v4l2, with gudev enabled. I can provide more logs and test more recent versions if necessary, though it will take some time. A quick search in the issues didn’t turn out anything but I wanted to make sure before opening a new one: is this known ?
Best regards
Jérôme Laheurte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230427/5729daab/attachment.htm>
More information about the gstreamer-devel
mailing list