msrdc in WSL generates huge logs, how can I stop it? #8486
-
My platform:
I found huge logs (about 20GiB in total, 8MiB per file) in my Most of the log is byte Current I am using an empty file Track this issue on #10216 |
Beta Was this translation helpful? Give feedback.
Replies: 21 comments 13 replies
-
same problem here. Lots of "RdClientAutoTrace-WppAutoTrace-20220629-015518-417.etl" kind of files created, and eat my system disk space. it is ok before, and this problem happened for one week. |
Beta Was this translation helpful? Give feedback.
-
I uninstalled WSL and the logging stopped. When I re-installed it, it began again. So I can confirm that it is being caused by WSL. |
Beta Was this translation helpful? Give feedback.
-
This started happening for me as well in the past week and kicked into high gear starting yesterday morning (~9 AM US/Central). My platform:
Installed WSL list:
Docker Desktop: 4.17.0 Ubuntu: uname -a
Files (currently around 47 GB): cd ~\AppData\Local\Temp\DiagOutputDir\RdClientAutoTrace
ls | group { $_.basename.substring(31, 11) } | select count, name, @{ Name = 'Size'; Expression = { [long] ($_.group | measure -Sum length).sum } }
Deleting them for now but it's still generating them. |
Beta Was this translation helpful? Give feedback.
-
I've just noticed this same behavior today. While debugging another problem, I noticed many RdClientAutoTrace errors in Windows Event Viewer like this:
I investigated further because unexpected log messages related to Remote Desktop Client sounded like a potential security problem. That eventually led me to look in the log directory, where I found over 300 of these RdClientAutoTrace logs totalling about 3GB. I happened to notice that it was generating a new log every time I open File Explorer to the Home location. As Explorer scans for drives, RdClientAutoTrace creates a new 9-10 MB log. While troubleshooting this, I also noticed that the total number of logs decreases sometimes, and the oldest log is consistently one week old. (Took me a while to notice the pattern because the recent Daylight Savings change has offset our clocks by an hour.) The process appears to clean up any logs older than one week when it writes the new one. I also just noticed that File Explorer will automatically refresh its view periodically, which will trigger another log entry if there's a tab on the Home location. This could potentially trigger a lot of log entries depending on what you have running in the background. I imagine that applications other than File Explorer could also cause this by scanning the drive list. Looking at Event Viewer again, I can see that there's a "failed to start / 0xC0000022" entry for each time Explorer triggered the problem. Hope this helps with troubleshooting. |
Beta Was this translation helpful? Give feedback.
-
I'm seeing a similar problem. I left my computer on for a week without touching it and during this week, it generated 39k files and ate up 223 GB. |
Beta Was this translation helpful? Give feedback.
-
While this doesn't get fixed, I have deployed a scheduled task that looks for this type of file and deletes it based on LastAccessTime. It is not the perfect solution, but unfortunately, I was already using it to delete office tracing and logging files that also get lost in the TEMP folder, eating disk space. |
Beta Was this translation helpful? Give feedback.
-
I blocked the problem for a long time by setting the filesystem permissions on the However, I recently discovered another solution which I think might also solve the related problem of msrdc.exe using large amount of ram while I wasn't using wsl at all. The solution was to create a file called
After creating and saving that file, I ran the command Obviously, this is going to almost certainly break the wslg functionality of having gui applications running in Windows, and so is still a workaround and not a true solution. |
Beta Was this translation helpful? Give feedback.
-
This should be make into a issue |
Beta Was this translation helpful? Give feedback.
-
You can limit the space the logs take or stop logging alltogether using event viewer. In event viewer go to applications and services > microsoft > windows > kernel-eventtracing. Doubleclick it and admin will appear underneath. Rightclick on admin and click properties. Here you can limit the space to use or turn of logging alltogether. |
Beta Was this translation helpful? Give feedback.
-
the problem with me is not only the logs. Responsiveness of whole system is skewed now. I can do Yes, I have an explorer window open but c'mon... Disabling gui support doesn't seem to help (or I need to try to reboot first). |
Beta Was this translation helpful? Give feedback.
-
311 GB of storage occupied by these logs in my computer, and my 512GB SSD is full now. |
Beta Was this translation helpful? Give feedback.
-
Yes, it fills logs we know that now. Disable GUI support for the time being. I'm still baffled by wsl starting out of nowhere automatically, even without an explorer open and no shares mounted , no recent files, nothing in quick access.... |
Beta Was this translation helpful? Give feedback.
-
After one year, I think we should have this discussion as an issue #10216 |
Beta Was this translation helpful? Give feedback.
-
how can i fixed it 😭 |
Beta Was this translation helpful? Give feedback.
-
I came up with a simple solution:
|
Beta Was this translation helpful? Give feedback.
-
As already been set , for most of setting graphics support off for wsl
stopped the logging and you can happily use wsl.just remember to restart
the entire system.
If graphics mode is wanted , preventing the logging seems like an option ,
but I think it's still a performance issues then. Preventing the logging by
creating a file with the name of the directory is a nice trick :) .
If your wsl keeps starting up , you have a shortcut or reference to it
somewhere. Maybe a mapped drive , a shortcut to it on the sidebar of
explorer , an item in your recent items , or in my case Asus tools that are
accessing recent downloads and one was in wsl. Lots of options really.
Disabling kind of services shouldn't benl needed (and is harder on win11 vs
win10 for wsl) but may help in temporary keeping it shut down so you can
manage the log directory.
As is stated in the real issue (not this discussion if i think I'm replying
on the correct thread ), the entire thing seems to be fixable by installing
a Ms rdc package.
…On Sat, Jul 22, 2023, 03:15 KDAM71 ***@***.***> wrote:
I had a somewhat similar problem caused by vmmemwsl. As long as you're not
using wsl you can disable a couple of related processes by setting the
starttype of wslservice to disabled in the registry. The registry path is
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WslService. Here you
change the value of Start to 4 (disabled). You have to restart windows for
it to take effect. When you want to use wsl you change the Start value back
and restart windows. I hope this is a solution for your problem. When you
export Start with both values, it's easiest to change it in the future with
a few mouseclicks.
—
Reply to this email directly, view it on GitHub
<#8486 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALMD2DSBPKWHP44CTCTBZHTXRMSS7ANCNFSM5YEA4CLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I use WSL2 for development... |
Beta Was this translation helpful? Give feedback.
-
I removed these when they were being created. Had no issues with it. That being said, I didn't encounter the issue for almost a year now. Are you sure everything is updated at your end? |
Beta Was this translation helpful? Give feedback.
-
@jorismak these are all logs from this week, and it seems to cap out at 1GB so i'm guessing this is a managed process |
Beta Was this translation helpful? Give feedback.
-
Possible fix at microsoft/wslg#978 (comment) |
Beta Was this translation helpful? Give feedback.
-
Another option is to use No GUI, not ETL spamming. Its a good tradeoff for me! |
Beta Was this translation helpful? Give feedback.
I came up with a simple solution:
%temp%\DiagOutputDir\RdClientAutoTrace
%temp%\DiagOutputDir
and rename it toRdClientAutoTrace
, make sure you have delete the extension name.txt
of the file