TV Server memory leak in 1.2.0b (1 Viewer)

rlevis

MP Donator
  • Premium Supporter
  • August 15, 2008
    510
    34
    Home Country
    New Zealand New Zealand
    MediaPortal Version: 1.2.0b
    Windows Version: Vista SP2
    CPU Type: AMD Phenom X3 8450
    HDD: 750GB
    Memory: 2GB
    Video Card: ATI HD 3200
    1. TV Card: Hauppauge HVR-2200

    I've had this problem through all versions of MP TV Server for a few years. I have to reboot the PC once a day as otherwise the TV Server is using around 800MB after 24 hours.

    Even while nothing is playing or recording, I can see in Task Manager the memory allocation for TVService.exe increasing roughly 400KB a minute. The tv.log and no other logs are changing at all during this time, but I've attached a tv.log after restarting the service.

    While composing this message, the RAM usage has gone from 11MB at the restart to 14MB now with the MP client not even loaded and nothing recording.

    The only plugin in use is xmltv which imports once a day. Disabling this plugin doesn't stop the memory leak.

    Let me know what you need me to do to track this down.

    Thanks.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again rlevis

    For anyone else following, this is a duplicate of this thread, and possibly others...

    Have you updated your TV card and other drivers recently?
    Might be a good idea to try that for a start, and then post logs using debug mode (use the link in the MediaPortal folder in your start menu... option 3 to zip up all logs) so that we can get a good idea of your full system context (system event logs etc.).

    mm

    mm
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    One thing for you to try...
    If TV Server is leaking memory before it has even done anything then I think there are really only a very few things that could cause it. I'm attaching some alternate TvService.exe files for you to try. They may not be functional (especially the .nothreads one), however they will serve for this experiment. Replace the default TvService.exe with each of the TvService.exe's in the attached zip file (note: remove the weird extensions that I've given them) and let me know if either of them make any difference. All you have to do is:

    1. Restart TvService.
    2. Confirm that memory is leaking without doing anything else other than starting task manager.
    3. Stop TvService.
    4. Backup the default exe.
    5. Replace the TvService.exe with one of the attached ones.
    6. Start TvService and check if memory is still leaking without doing anything.
    7. Repeat for both of the provided EXEs and let me know the results.

    I'm off to bed now, but hopefully this will shed some light on this random issue...

    mm
     

    Attachments

    • TvService[1.2.0b_memory_leak_tests].zip
      146.1 KB

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Usa
    Home Country
    Ethiopia Ethiopia
    rlevis : could u try and test the channel stress test tool and then observe memory after a few 1000s channel changes ??

    worth a shot I guess :)

    /gibman
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    510
    34
    Home Country
    New Zealand New Zealand
    I can report TVService.noplugins was still leaking memory, but TVService.nothreads was not leaking memory.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hmmm, well the nothreads version effectively did nothing. Except run through the TV Server initialisation without actually "starting" (finding cards etc.) the server. Unfortunately the only way we're going to be able to chase this down is by process of elimination. That could be quite tedious, but I'm happy to at least try. To that end, I've attached some more versions of TvService.exe with parts of the initialisation routine commented out. If you could run the same checks for these then I'll be able to narrow down the problem a little further...

    mm
     

    Attachments

    • TvService.zip
      581 KB

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    510
    34
    Home Country
    New Zealand New Zealand
    I'm happy to try a few builds when time permits. Will have a go at these tomorrow night.
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    510
    34
    Home Country
    New Zealand New Zealand
    Here are the results.

    halfcardsetup: no leak
    handlersandcleanup: no leak
    heartbeat: LEAK
    nopowernoplugins: LEAK
    pendingdeletions: LEAK
    serversetup: no leak
    setuphybridcards: no leak
    streaming: LEAK

    I left the service running for about 5 minutes on each one and the leaking ones gained around 2 to 3MB RAM over that time

    I hope that helps. Let me know if you have more to test.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again rlevis

    Thanks - that certainly narrows things down. If its okay with you, I'll provide a few more builds when I get home from work tonight...

    mm
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Okay, sorry for the delay. About to go to bed, but here are 5 more DLLs. I'm beginning to think the issue is possibly in the streaming code...

    mm
     

    Attachments

    • TvService[3].zip
      365.2 KB

    Users who are viewing this thread

    Top Bottom