Hi all,
We are running libevent 2.1.6-beta. I am seeing some file descriptor leaks in libevent wrt event_base().
We call event_base_new(), followed by some events using event_new() calls. Once the work is done, the application calls event_free() followed by event_base_free() . I would think event_base_free() would gracefully close all the relevant FDs. I made certain that event_base_free is called. Valgrind still shows me following FD leak on exit.
==574== Open file descriptor 69:
==574== at 0x322A6DF207: pipe2 (syscall-template.S:81)
==574== by 0x52CB494: evutil_make_internal_pipe_ (evutil.c:2612)
==574== by 0x52D0909: evsig_init_ (signal.c:181)
==574== by 0x52CF908: epoll_init (epoll.c:220)
==574== by 0x52B8681: event_base_new_with_config (event.c:652)
==574== by 0x52B7FFC: event_base_new (event.c:485)
==574== Open file descriptor 77:
==574== at 0x322A6ED607: epoll_create1 (syscall-template.S:81)
==574== by 0x52CF6E4: epoll_init (epoll.c:148)
==574== by 0x52B8681: event_base_new_with_config (event.c:652)
==574== by 0x52B7FFC: event_base_new (event.c:485)
Any insights would be useful. I know 2.1.7 was released last week. IS this a valid issue or do I need to call any other APIs before I call event_base_free()? From the code I see that epoll_dealloc() does close the pipe gracefully.
Best
-Himanshu