Closed IperStan closed 3 years ago
I can confirm I experienced this issue with 1.49. I believe it was resolved in 1.49.2 (I no longer experienced it at that point). Now the issue seems to have returned in 1.53.
VS Code version: Code 1.53.0 (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T20:36:38.611Z) OS version: Windows_NT x64 10.0.19042
Can you provide the exact repro steps that created the log, I cannot repro with the steps from previous issue using system install. Thanks!
Can you provide the exact repro steps that created the log, I cannot repro with the steps from previous issue using system install. Thanks!
I did a little testing, and here's what I've come up with.
With no vscode instances open, I navigate in Windows Explorer to the folder I want to open in vscode. I right click on the folder in the Explorer tree on the left of Windows Explorer and select "Open with Code". the debug.log
files do not get created in the folder tree.
With at least one instance of vscode open (which as stated above is unaffected by the debug.log
issue), i repeat the exact same steps but for a different folder (so I now have two or more folders open with code) and all instances of vscode after the first will have debug.log
files created in any folder next to a file that is opened as a tab in vscode. vscode remembers which files i have open when reopening a folder in this way, so if I have files open all of the folders where those file exist will have a debug.log
created just by starting vscode. Opening any files in any folders after that will also create a debug.log
file.
Further info. I have opened git repos, folders that are not git repos, and even created new empty folders and opened them in vscode. All of the above are affected and debug.log
files will be created if i have more than one instance of vscode open. The first instance remains unaffected, even when having multiple instances open.
Also here are the contents of the file:
[0205/141437.535:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
[0205/141437.561:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
Same for me:
[0205/143929.529:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
[0205/143929.572:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
Also, the instance that created the debug.log file must be closed in order for the debug.log file to be deleted.
P.s. I confirmed closing all vscode instances and switching the order of the folders opened still results in the second instance opened having debug.log
files created did me.
Also I'm running a system install (not user)
Thanks for the steps in https://github.com/microsoft/vscode/issues/115874#issuecomment-774264583, I am able to repro the issue.
Crashpad handler gets instantiated the following way on windows,
When crashReporter.start
is invoked by an electron app it will trigger crash_reporter::InitializeCrashpadWithEmbeddedHandler that will launch a new process and run the crashpad handler embedded in the main app binary using --type=crashpad_handler
The above step will also create a named pipe that will be used by child processes to communicate with this handler process
The handler process is launched by the main process, inorder to pass down the pipe name to child processes it stores them under an env variable CHROME_CRASHPAD_PIPE_NAME
This all works fine for any chromium app, but when an app wants to spawn a singleton instance where in vscode we maintain our own server logic for connecting multiple instances of the same app, we were actually connecting child processes from an instance with different CHROME_CRASHPAD_PIPE_NAME
to the original instance, hence the handler code started throwing the above error code at https://source.chromium.org/chromium/chromium/src/+/master:third_party/crashpad/crashpad/util/win/registration_protocol_win.cc;l=102 because the named pipe from the other instance could not be found.
Fix at https://github.com/microsoft/vscode/pull/116252 will now take pipe from the original instance and give it to all the instances that are connecting to it.
As for the original debug.log
file generation,
LOG_TO_FILE
, but
So it is unclear why the PLOG
error from registration_protocol_win
would be logged to a file. I can no longer repo the issue following the steps at https://github.com/microsoft/vscode/issues/115874#issuecomment-774264583, so there is nothing much I can do without more reliable repro here.
1.53.1 seems to have resolved the issue for me.
Version: 1.53.1 (system setup) Commit: 5d424b828ada08e1eb9f95d6cb41120234ef57c7 Date: 2021-02-08T23:29:42.785Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
1.53.1 seems to have resolved the issue for me.
Version: 1.53.1 (system setup) Commit: 5d424b8 Date: 2021-02-08T23:29:42.785Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
Negative, I'm on 1.53.1 and the issue still persists. How is it possible you don't have it if the fix was released 7 hours ago?
1.53.1 seems to have resolved the issue for me. Version: 1.53.1 (system setup) Commit: 5d424b8 Date: 2021-02-08T23:29:42.785Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
Negative, I'm on 1.53.1 and the issue still persists. How is it possible you don't have it if the fix was released 7 hours ago?
Something else in 1.53.1 may have affected it? I'm not sure. But I am am unable to reproduce the issue on 1.53.1.
I can confirm, I am having the issue on 1.53.1 too. To reproduce I just have to open second VSCode window with another repository.
Version: 1.53.1 (system setup) Commit: 5d424b828ada08e1eb9f95d6cb41120234ef57c7 Date: 2021-02-08T23:29:42.785Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
Can you check if the issue persists with the latest insiders https://code.visualstudio.com/insiders
1.53.1 seems to have resolved the issue for me. Version: 1.53.1 (system setup) Commit: 5d424b8 Date: 2021-02-08T23:29:42.785Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
Just reproduced on a different machine running 1.53.1
/verified
Could not reproduce on
Version: 1.54.0-insider (user setup) Commit: 40b3204d70a9c72305c613164272175d0b344b5f Date: 2021-02-10T17:39:27.208Z Electron: 11.2.3 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
/verified
@deepak1556 Has the underlying problem (writing log files into arbitrary user directories) been solved or is this just treating the symptoms "we fixed the problem that caused the error in this particular case"?
If it's the latter it sounds like a good idea to create a new issue to actually fix the problem of log files getting written to the wrong place - otherwise we'll just have the same problem again in a few months. I might want to look into this if I find time.
@danstur as mentioned here https://github.com/microsoft/vscode/issues/115874#issuecomment-776406845
The fix was made for the error seen in the log
[0205/143929.529:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
As for the original debug.log
generation under system install, I have outlined the changes that were made to make this impossible to create.
If it's the latter it sounds like a good idea to create a new issue to actually fix the problem of log files getting written to the wrong place -
You are right, but without a reliable repro, I can't validate why the logging preferences set by the runtime are being ignored.
1.53.2 seems to have fixed the issue on both of my systems. Thanks!
All good with 1.53.2. Thanks for the quick fix! Happy coding!
Issue Type: Bug
Apparently it's an old issue https://github.com/microsoft/vscode/issues/105191#issuecomment-690953187
I have the same behaviour: open the first window (no debug.log file) -> open the second window (debug.log file was created automatically)
VS Code version: Code 1.53.0 (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T20:36:38.611Z) OS version: Windows_NT x64 10.0.19041
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.94GB (5.82GB free)| |Process Argv|C:\\Progetti\\iperGestionale| |Screen Reader|no| |VM|0%|
Extensions (25)
Extension|Author (truncated)|Version ---|---|--- indent4to2|Com|0.1.2 alignment|ann|0.3.0 bracket-pair-colorizer-2|Coe|0.2.0 vscode-eslint|dba|2.1.14 githistory|don|0.6.14 gitlens|eam|11.2.1 tortoise-svn|fan|0.1.1 auto-close-tag|for|0.5.10 beautify|Hoo|1.5.0 svn-scm|joh|2.13.5 vscode-cflint|Kam|0.3.4 vscode-cfml|Kam|0.5.3 HTMLHint|mka|0.10.0 vscode-filesize|mkx|2.1.4 prettify-json|moh|0.0.3 sublime-keybindings|ms-|4.0.7 color-highlight|nau|2.3.0 vetur|oct|0.32.0 vscode-yaml|red|0.14.0 sass-indented|rob|1.5.1 vscode-paste-and-indent|Rub|0.0.8 vscode-sql-beautify|sen|0.0.4 open-in-browser|tec|2.0.0 vscode-icons|vsc|11.1.0 JavaScriptSnippets|xab|1.8.0