INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WDM driver memory leak  (Read 3035 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
WDM driver memory leak
« on: June 26, 2018, 04:20:46 pm »

Bumping https://yabb.jriver.com/interact/index.php?topic=112027.0

This is quite clearly a wdm driver issue that happens at least once a week in my system. As soon as I stop wdm playback the leak disappears, it only ever happens when wdm is active for a few hours and it is independent of what is playing (can mean Netflix, browser or mpc-be in my system).

If there is a way to capture a dump to examine what is in that heap then let me know and i can capture it.
Logged

macallan18

  • Recent member
  • *
  • Posts: 31
Re: WDM driver memory leak
« Reply #1 on: June 29, 2018, 12:22:44 pm »

What version are you running?  I"m hopeful they're working on the WDM driver currently.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #2 on: June 29, 2018, 12:38:11 pm »

24.0.38

Issue has been present for a long time though
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #3 on: June 29, 2018, 12:45:46 pm »

Hi Mattkhan,
I've been trying to reproduce your memory leak on a windows 10 (fully updated) machine running 24.0.38 for the last couple of days and don't see it. I can't detect any difference in memory usage when using the JRiver audio driver or my other drivers. Tried leaving theatre view on in neutral fo over 24 hours - nothing of note happened according to performance monitor. Tried running movies in theatre view and again nothing to report. Could there be something else on your machine triggering the memory leak  or perhaps a diferent OS?
Sorry I couldn't be of more help.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71827
  • Where did I put my teeth?
Re: WDM driver memory leak
« Reply #4 on: June 29, 2018, 01:08:28 pm »

Convolution?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #5 on: June 29, 2018, 02:26:31 pm »

My machine is win 8.1 pro, wdm driver configured as 5.1, no convolution involved and outputting to an asio driver. There is no doubt the wdm driver is the key factor as this problem does not occur when the wdm driver is not active and the memory footprint is released completely the instant wdm playback is stopped.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10815
Re: WDM driver memory leak
« Reply #6 on: June 29, 2018, 02:38:10 pm »

Does the memory get attributed to MC, or random system memory? Because the driver itself wouldn't be attributed to the MC process.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #7 on: June 29, 2018, 02:54:21 pm »

It gets attributed to MC
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #8 on: June 29, 2018, 03:30:19 pm »

The system I was testing in has the JRiver driver configured as stereo, I don't have a 5.1 system to test with.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #9 on: June 29, 2018, 03:58:19 pm »

The system I was testing in has the JRiver driver configured as stereo, I don't have a 5.1 system to test with.
I don't know if that is a factor tbh but thanks for spending some time trying to reproduce anyway
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #10 on: June 29, 2018, 04:23:44 pm »

Could you set your system up so that the driver is running in stereo mode for a short time just to see if the 5.1 setting is the problem?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #11 on: June 30, 2018, 02:30:40 am »

If there was a reason to think that was the root cause then sure. Hendrik's reply suggests it is not that though.
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #12 on: June 30, 2018, 04:35:56 am »

@Hendrik - Memory attributed to MC therefore not WDM driver
@Mattkhan - Closing WDM driver releases the memory overload

Logically there must be a link between the two which causes the memory leak. Live long and prosper!
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10815
Re: WDM driver memory leak
« Reply #13 on: June 30, 2018, 04:48:35 am »

Just because its not the driver itself but something in MC still indicates that its something related to the entire process, so changing settings might make a difference somehow.
However, considering we're not seeing widespread reports of this, it seems a bit weird. The memory also doesn't seem to be "lost" but just piles up somewhere where MC still knows it exists and frees it when asked to.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #14 on: June 30, 2018, 06:11:10 am »

I can setup procdump to capture a full dump if it goes beyond 3GB, would that be useful?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71827
  • Where did I put my teeth?
Re: WDM driver memory leak
« Reply #15 on: June 30, 2018, 06:31:39 am »

However, considering we're not seeing widespread reports of this, it seems a bit weird. The memory also doesn't seem to be "lost" but just piles up somewhere where MC still knows it exists and frees it when asked to.
Play from memory?
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #16 on: June 30, 2018, 06:43:19 am »

Use resource monitor to check how much in use, standby and free ram you have while you are running MC. The dump might be useful to hendrik but would give me a serious headache.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #17 on: June 30, 2018, 08:13:57 am »

Play from memory?
I don't use that option
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10815
Re: WDM driver memory leak
« Reply #18 on: June 30, 2018, 09:06:41 am »

A dump might help, depends what exactly is happening.
Logged
~ nevcairiel
~ Author of LAV Filters

michael123

  • Galactic Citizen
  • ****
  • Posts: 485
Re: WDM driver memory leak
« Reply #19 on: June 30, 2018, 12:26:22 pm »

You can also check with process explorer or command line Handle

Run it few times in a periodical manner

Maybe you will find some named object, it will be easier then to find a leak
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #20 on: July 02, 2018, 11:06:22 am »

A dump might help, depends what exactly is happening.
I caught one, I have had perfmon capturing private bytes and virtual bytes for Media Center 24 for the last few days and it's been fine for a few days and then it just started leaking as you can see in the attached chart

the procdump kicked in which seemed to have been sufficient to freeze MC and cause it to close the WDM driver which then automatically cleared the excess memory footprint without MC crashing

is there somewhere I can upload the dmp to or who shall I share it with?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #21 on: July 03, 2018, 04:42:24 pm »

A dump might help, depends what exactly is happening.
is there somewhere I can share this?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10815
Re: WDM driver memory leak
« Reply #22 on: July 03, 2018, 05:10:14 pm »

I don't have anything where you could upload it to. I can only thing of the usual places like OneDriver/Google Drive or maybe even mega.co.nz
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #23 on: July 03, 2018, 05:48:19 pm »

I don't have anything where you could upload it to. I can only thing of the usual places like OneDriver/Google Drive or maybe even mega.co.nz
ok I'll find somewhere and send you a link
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10815
Re: WDM driver memory leak
« Reply #24 on: July 05, 2018, 04:33:08 am »

I don't see any actual memory use from MC in the dump. Maybe the pipe is somehow broken down and accumulating memory for some reason. Does the WDM driver/audio still work at that point?
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #25 on: July 05, 2018, 05:04:37 am »

Yes it functions normally throughout
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #26 on: July 06, 2018, 06:23:32 pm »

Hit another leak tonight, I will upload the dump again just in case this one is more useful
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #27 on: August 26, 2018, 12:06:37 pm »

this is still causing major pain so resorted to adding a scheduled job to kill MC when an resource exhaustion event is detected

Code: [Select]
taskkill /f /t /im "Media Center 24.exe"
start "" "c:\Program Files\J River\Media Center 24\Media Center 24.exe"

not sure if there is an easier way to do this, perhaps to catch it earlier before it actually runs out of memory?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71827
  • Where did I put my teeth?
Re: WDM driver memory leak
« Reply #28 on: August 26, 2018, 12:18:07 pm »

Why do you assume this is from MC and not from a driver, etc.?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #29 on: August 26, 2018, 12:29:44 pm »

because all the evidence says it comes from MC (as per Hendrik's comment in post 6)
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #30 on: August 26, 2018, 04:02:51 pm »

It must be something on your system perhaps interfering with MC that is causing the problem. I have been monitoring my system regularly and have found no indications of a memory leak ( admittedly I am on windows 10).
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #31 on: August 26, 2018, 06:08:54 pm »

It must be something on your system perhaps interfering with MC that is causing the problem. I have been monitoring my system regularly and have found no indications of a memory leak ( admittedly I am on windows 10).
it's fair to say I'm quite confident that it's something to do with the way I use MC because it only seems to happen to me :) Win10 and Win8.1 seems quite a big difference though hence unlikely to be relevant to this situation.

I don't see how something can interfere with the internals of another process either (i.e. MC holds the memory, frees it on demand so the problem is private to MC). I would have thought there is a bug somewhere in MC along the lines of Hendrik's post #25 perhaps driven by the way I use MCWS. For example, I use StopAll as part of switching between things playing through MC to make sure there aren't multiple things attempting to play at once. Perhaps this doesn't play nicely with the WDM driver? I suppose I could think of another way to achieve the same without using stopall and adjust my remote app to rule that one out.
Logged

swiv3d

  • Guest
Re: WDM driver memory leak
« Reply #32 on: August 26, 2018, 08:43:32 pm »

Just suggesting that if you had an alternative PC  basis to test with that you could set up MC first then add each of your other other programs until it falls over. Just a past over relic of program interacting I guess. Mea culpa!
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4023
Re: WDM driver memory leak
« Reply #33 on: August 27, 2018, 05:50:00 am »

yeah it would be nice to do something like this but I have neither the hardware nor the time to do this (as it takes days to reproduce the error and no one is going to put up with a broken main htpc for weeks on end to debug the issue  :) )
Logged
Pages: [1]   Go Up