none
Why is devenv.exe continuously reading my private files?

    Question

  • I use VS2015 and it has been getting unresponsive in recent weeks. It sometimes freezes for a time when saving source files or starting builds, and builds proceed very slowly with low CPU use. My whole machine also seemed slower.

    Now, using procmon, I have found that devenv.exe is continuously reading some very large files I have stored on my HDD. These files are not part of my solution, and are in no way devenv's business. It reads these entire files sequentially, tens of MB per second, file after file, and as soon as it gets to the end (several GB) it seems to start reading them all again.

    There's nothing sensitive in the files (they are large test data sets) but needless to say it is deeply concerning behaviour that devenv.exe is reading random files on my HDD without my permission or knowledge (if I hadn't used procmon, I wouldn't have known it was doing this).  This concern is aside from the fact that, by continually reading these files, devenv.exe swaps more important functionality and apps out of memory, and cripples my entire system.

    So, with reference to Microsoft's Privacy Statement, I would like to know:

    1. The purpose for which devenv.exe is reading files on my local machine without direction from me.

    2. The product feature to which the reading of these files relates (ie, what benefit is being provided to me by the reading of these files).

    3. Whether devenv.exe sends any contents or metrics about the files off my local machine in any way.  If so:

      3a. The jurisdictions to which it sends the data;

      3b. The privacy protections which apply to the data in those jurisdictions.

    4. How I can disable the reading of these files.

    5. Where I can find further information by Microsoft describing the file reading behavior I am observing.

    Best regards,

    G. Fussplatz.

    Wednesday, November 22, 2017 6:09 AM

All replies

  • I don't see that at all. When I use Visual Studio, I get close to 100% cpu usage going towards the build itself and when I let VS idle it does go to 0% usage.

    Do you have any extensions that are installed which aren't installed by default? Have you tried disabling these? If possible, could you try out on a clean install of Visual Studio?


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Wednesday, November 22, 2017 10:59 PM
  • Hi,

    >>I use VS2015 and it has been getting unresponsive in recent weeks. It sometimes freezes for a time when saving source files or starting builds, and builds proceed very slowly with low CPU use. My whole machine also seemed slower.

    1. Run an anti-virus program on your entire system.

    2. What changes have you made to visual studio?

    3. Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE and run these commands:

                    devenv /safemode

    After visual studio run in safe mode, see it if the issue persists.

    4. Please attempt to reset Visual Studio to System Defaults (Please click Tools->Import and Export Settings->Reset All Settings).

    Note: Before making changes to visual studio, you could export the current setting. Please click Tools->Import and Export Settings->Export selected environment settings.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 23, 2017 8:31 AM
  • Hi Joyce,

    Thanks for your efforts to help.

    > 1. Run an anti-virus program on your entire system.

    SCEP and Cisco Antimalware did not find any malware.

    > 2. What changes have you made to visual studio?

    The only extension I have installed is Microsoft Image Watch. Disabling it made no difference.

    > 3. Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft > Visual Studio 14.0\Common7\IDE and run these commands:

    >                 devenv /safemode

    > After visual studio run in safe mode, see it if the issue persists.

    Running in safe mode seemed to solve the issue (after testing for a full day).  When restarting normally, the problem behavior returned.

    > 4. Please attempt to reset Visual Studio to System Defaults (Please click Tools->Import and Export Settings->Reset All Settings).

    Resetting all settings did not solve the issue.

    Here is a screenshot of procmon, filtered to only show events from devenv.exe: https://imgur.com/a/nEuM  The buffer contains 4 million file read events like these, and growing fast. As I post this, it has about 12 million read events.

    I'm looking forward to further information.

    Best regards,

    G. Fussplatz.

    Tuesday, November 28, 2017 5:12 AM
  • Screenshot of procmon showing devenv.exe reading arbitrary files.
    Tuesday, November 28, 2017 5:22 AM
  • Hi,

    Thank you for the update.

    The issue can't be reproduce in our side.

    1. Close all instance of visual studio in task manager, and check it if the issue persists.

    2. Make sure that only one user is logging in the computer.

    3. Move the files that devenv.exe is continuously reading to another location and see it if devenv.eve  will continue doing that.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 28, 2017 8:08 AM
  • Hi Joyce,

    Thanks again for your post.

    > 1. Close all instance of visual studio in task manager, and check it if the issue persists.

    I have verified that devenv.exe stops reading the files when it is not running.

    > 2. Make sure that only one user is logging in the computer.

    Only one user is logged into the computer.

    > 3. Move the files that devenv.exe is continuously reading to another location and see it if devenv.eve  will continue doing that.

    I renamed the files, and the folders they are in, but devenv.exe still read them.  So the filenames makes no difference.  However, moving the files to another disk did stop devenv.exe from reading them.  However, it also stops my test software from running so is not a solution.

    Moving the files to C:\ also stops devenv.exe from reading them.

    Moving the files to my "My Pictures" also stops devenv.exe from reading them.

    However, my test software which needs to use the files will not work when they are in such locations, so it is not a solution.  The files need to be in the same folder as my executable.

    Also, I have now reproduced the issue on another team member machine.  So, virus infection, or misconfiguration, or physical defect, seems less likely.  This is devenv.exe deliberately reading the files, by design.

    > The issue can't be reproduce in our side.

    Thanks for attempting to reproduce the issue.

    However, given the severity of the possible effects of this defect (I'll call it a defect, although it behaves more like spyware), I think this is an inadequate response.  Devenv.exe is reading files which it has no clear need to read.  And it is clear MS support does not know why it is reading them.

    There must be a limited number of code paths in devenv.exe which open and read files.  These code paths should be investigated to make sure they only open files they need to open, according to the Visual Studio design specification.  Clearly there is a code path which is not compliant.  When this code path is found, you could analyse it and answer the questions in my first post.

    I'm looking forward to your response.

    Best regards,

    G. Fussplatz.

    Thursday, December 07, 2017 9:05 PM
  • Did you try what Darran originally suggested - disable any VS extensions/add-ins to see if it's perhaps one of those causing the
    issue?

    Do you have any AV software installed - have you tried disabling that?

    Friday, December 08, 2017 1:05 AM
  • Hi David,

    Thanks for your suggestion!

    As indicated in my reply to Darran, the only extension I have installed is Image Watch, and disabling it did not stop Visual Studio from reading the files; although running in "safe mode" did prevent Visual Studio from reading the files.  Obviously running in "safe mode" all the time is not a solution.

    As the machines are on a managed enterprise network, I cannot disable antivirus (without serious effort).  However, I think it is very unlikely that antivirus is causing the devenv.exe process to read a file that it would not otherwise choose to read.  The fact that I can either cause or prevent the problem by entering "safe mode", further suggests that the reading is initiated by devenv itself.

    Now I have also verified that this problem appears on a completely wiped machine, with a new install of Win 7 x64 and VS2015, which is being kept in cleanroom conditions.  This behavior is a built-in function of a default install of VS2015.  So, my interest only increases.

    Best regards,

    G. Fussplatz.


    Tuesday, December 12, 2017 6:23 AM
  • > the only extension I have installed is Image Watch, and disabling it did not stop Visual Studio from reading the files; although running in "safe mode" did prevent Visual Studio from reading the files.  Obviously running in "safe mode" all the time is not a solution.

    Do you use TFS? I think SafeMode also disables that, though I don't know why that might be scanning your files if they're not part
    of your solution.

    If you do get to the bottom of this, please let us know.

    Dave

    Tuesday, December 12, 2017 10:38 AM
  • One other thought ... does it only happen with particular projects?

    i.e. if you run VS and don't load a solution, does it still happen?

    If you've got multiple projects in your solution, try unloading them and pinning down which project(s) it occurs on.

    Dave

    Tuesday, December 12, 2017 12:41 PM
  • Gibtes,

    As you are already using Process Monitor, what does call stack looks like for the offending read file events (Properties - Stack tab)?


    Sergey Vlasov | Vlasov Studio | Visual Studio extensions and tools

    Wednesday, December 13, 2017 4:04 AM