This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Memory leak after using CE examples while video firmware is loaded

Hi,

we observed an issue, which easily can be reconstructed by use of CE examples: after multiple starts and ends of the CE sample app (that means loading and unloading the DSP server application) more and more the memory of a shared region gets lost, and (not in each case obviously dependent) earlier or later it is no longer possible to load the DSP server application oncemore.

This issue first has been described within that thread, but until now we didn't got the right hint from there, that's why I try it here, again.

Details:

  • DM8148 (same effects on DM8168), EZSDK 5.05.01.04
  • /etc/init.d/pvr-init and /etc/init.d/matrix-gui-e are not run at all, as we don't need display features - so we don't have to call them with stop parameter
  • /etc/init.d/load-hd-firmware.sh is (at least at my platform) still disabled, too, but for my tests I run it by hand (with the "start" parameter, of course)
  • Aftere correctly changing the memory map settings fitting to what is set for the video firmware, probably more or less all the CE examples may be run in parallel to the loaded video firmware (loaded by load-hd-firmware.sh), but mostly I test with the ex01_universalcopy_remote example from codec_engine_3_23_00_07, and the above observations are done with that sample.

I'd be thankful for any hint which actually brings us one step further.

Thanks in advance,
Joern.

  • Hi Joern,

    This thread looks related and there are some answers in it:

    http://e2e.ti.com/support/embedded/linux/f/354/t/82490.aspx

    More info for Codec Engine (building and running applications) here: http://processors.wiki.ti.com/index.php/Codec_Engine

    Regards,

    Pavel

  • Pavel, thanks for this valuable hint. I'll look deeper into that.

    Although at the first glance the continuous memory loss in my tests is neither reported through an error hint (like mentioned in that thread) nor do I see any busy CMEM buffers after CE app has ended (at least not by looking at /proc/cmem).

    But I see those busy CMEM buffers there after loading the DSP firmware failed for the first time (and increasing with each next unsuccessful try, which will be all, until next reboot). So at least when loading DSP firmware fails something leads to these lost CMEM buffers (but I yet will have to find out, it these lost buffers are a result or are the reason of the problem.

    But maybe you meant your hint more in general concerning deeper looks into the Codec Engine (and if something errorneous found, patching it) - and yes, I will try that, too - wheras first I will wait now if at our other thread (the initially mentioned one), where in the meanwhiles Chris Ring started to answer, will maybe deliver the solution of the problem. If so, I'll leave a hint below here...

    Regards,
    Joern.

  • In the meanwhile the problem with the memory leak has been solved, fortunately I didn't have to dig around too deep into the syslink sources; from Chris' hint I just installed the newest syslink and, finally, a newer ipc, too - and the memory leaks are gone away, seemingly as well the random freeze when loading the DSP firmware (at least not occured until now, that means, at least much more stable).

    Nevertheless, much thanks for your links,
    best regards,
    Joern.