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?




  • No labels

2 Comments

  1. 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



    1. Hi Z-Yasam Bingol

      Could you please let us know the branch details you are using .

      With respect to rdk-next , lot of changes went in with respect to ccsp_message_bus . So if in case , you are using the older release , please try your code changes with rdk-next branch.

      Steps to pull rdk-next :


      $ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkb-extsrc.xml
      $ repo sync -j4 --no-clone-bundle
      $ source meta-cmf-raspberrypi/setup-environment
      choose the option : meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf
      $ bitbake rdk-generic-broadband-image

      If you are still facing the issues , please share the below details

      1. DMCLI details for which you are observing the leak
      2. Patch of your code changes
      3. Component 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>