Home
[RDK Central Wiki]
CMF
[Code Releases]
I have my own process and I am trying to mimic dmcli tool to access Data model. I developed my own function and used below CCSP Message API functions.
I calls the functions in below order and I am sure I call CCSP_Message_Bus_Exit at the end. But I observed file leakage in my process.
The leaking files are anon_inode:[eventpoll].
CCSP_Message_Bus_Init
CcspBaseIf_discComponentSupportingNamespace
CcspBaseIf_getParameterValues
CCSP_Message_Bus_Exit
Also tried to use Init at the beginning and Exit functions on the exit only. But I got failure on CcspBaseIf_discComponentSupportingNamespace.
Is there a way to avoid file leakage while using CCSP Message API?
2 Comments
Z-Yasam Bingol
CCSP_Message_Bus_Exit function has below command. Because it doesn't terminate dbus_loop_run thread gracefully, therefore dbus_loop_unref is not called and dbus' loop leaks. It looks like CCSP_Message_Bus_Exit function was designed to be called just once in a process' lifetime just before exit.
We don't bother trying to terminate the CCSP_Message_Bus_Loop_Thread
thread (see comments below).
the loop thread takes a long time to exit
so it is skipped and will let OS to clean it up
Narayanaswamy Ramaiyer
Hi Z-Yasam Bingol
Could you please let us know the branch details you are using .
If you are still facing the issues , please share the below details
NOTE : Please add valgrind to your source code to check the memory leak details.
command to execute valgrind in RPi box :
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes /usr/bin/<component>