memory leak when removeObject & addFile

jason
2005-05-23
2013-05-30
  • jason

    jason - 2005-05-23

    I want to try the updating of object database, so I add a timer to do the removeObject("1") and addFile("my_dir") every 5s. This way also can test if there is memory leak when you try to update the database. Then after 2 days, I check its memory usage using top cmd, I find it use 200MB memory and keep up and up.

    So I am sure there is a memory leak when remove/add object. This seems a serious problem.

     
    • Jin

      Jin - 2005-05-23

      hi, thanks for the report.

      let me see if I understand correctly:

      you modified the code and you are calling those two functions repeatedly, right?

      where are you calling them? can you please give more details on where exactly you added the calls so I can try to reproduce.

      adding and removing items via the UI does not seem to have the same effect... so I would like to try it your way.

      thanks,
      Jin

       
    • jason

      jason - 2005-05-23

      I add a alarm signal handler in main.cc, and setup 5s to trigger alarm, the removeObject&addFile is called inside the handler.

       
    • Jin

      Jin - 2005-05-25

      OK, no details yet but I can confirm that it seems to be leaking somewhere. I basically repeated your test with the only difference, that my testcode was not inside the signal handler (was just triggered by it and executed in main.cc)

      We are investigating the issue, thanks for reporting!

       
    • Jin

      Jin - 2005-05-29

      We found two serious and one minor leaks, they are fixed now. I tried adding and removing a directory of mp3's  in a loop over night and the memory stays stable now.

      So this issue should not occur in 0.8

       
      • jason

        jason - 2005-05-29

        Can you give me the fix now? Or tell me the changes in which files. I do not want to wait till 0.8 release. Thanks

         
    • jason

      jason - 2005-11-16

      Just have a question, I notice that the memory usage of mediatomb keep increase during I addFile() a directory with 50,000 files. Is this normal? And why it keep so much memory in hand?

      Thanks ahead.

       
    • Jin

      Jin - 2005-11-17

      Did you compile with or without libextractor?

      I noticed that for parsing video content libextractor allocates as much memory as it can.

      Basically there are surely improvements regarding speed and memory consuption which we could/should do, but we also depend on the libraries for parsing metadata, and they do things their way.

      At least we know that we are not leaking, we checked that; after the file import is complete memory should get freed and go back to "normal" levels.

      The new release will introduce some improvements, especially regarding speed and CPU usage during media import. A lot of code has been rewritten and modified, that is probably also the reason why the release will take a little longer :)

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks