Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file system watcher does not handle normal file system data races #122

Open
rbtcollins opened this issue Dec 6, 2022 · 0 comments
Open

Comments

@rbtcollins
Copy link

I'm filing this here from microsoft/vscode#162551 where they identified it as coming from parcel's watcher.

Type: Bug

Reproduction is hard, but something like the following should work:

  1. use something like Rust where compiling can put a lot of load on the system, with a LSP that will start up when vscode does, and uses randomly named directories in the source tree. Rust-analyzer in particular triggers this.
  2. have a very large project - I found this with a workspace with 10 different rust projects, each of which had 300-400 dependencies
  3. start vscode, it will trigger the LSP which will start building.

Now, when the race happens something like the following is logged:
[2022-10-03 11:09:21.334] [renderer1] [error] [File Watcher (parcel)] Unexpected error: inotify_add_watch on '/home/robertc/Documents/src/projectname/target/debug/deps/rmetaWmhbGH' failed: No such file or directory (EUNKNOWN) (path: /home/robertc/Documents/src/projectname)
[2022-10-03 11:09:21.336] [renderer1] [error] [File Watcher (universal)] restarting watcher after error: inotify_add_watch on '/home/robertc/Documents/src/projectname/target/debug/deps/rmetaWmhbGH' failed: No such file or directory

What is happening here as far as I can tell is that the parent directory watch (on deps) informs the watcher that a new child directory exists (rmetaWmhbGH in this case). Then an arbitrary amount of time passes (this is why you need a loaded system, and the watcher now adds the recursive watch for this directory. However in the intervening time, the new directory was deleted again.

This is a totally normal thing to happen. tl;dr inotify_add_watch errors of the kind ENOENT should be ignored.

VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:12:14.256Z)
OS version: Linux x64 5.15.0-48-generic snap
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1500)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
Load (avg) 4, 3, 5
Memory (System) 30.94GB (16.25GB free)
Process Argv --no-sandbox --force-user-env --unity-launch --crash-reporter-id 48f00fd1-b54e-4dc0-8575-34d6b8dbef5f
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE wayland
Extensions (45)
Extension Author (truncated) Version
vscode-bazel Baz 0.5.0
gitlens eam 12.2.2
EditorConfig Edi 0.16.4
vscode-pull-request-github Git 0.50.0
go gol 0.35.2
terraform has 2.24.2
vscode-test-explorer hbe 2.21.1
vscode-test-explorer-liveshare hbe 1.0.5
rust-test-lens hde 1.0.0
golang-tdd joa 0.0.9
rust-doc-viewer JSc 3.0.4
vscode-docker ms- 1.22.1
kind-vscode ms- 0.0.3
vscode-kubernetes-tools ms- 1.3.10
python ms- 2022.14.0
vscode-pylance ms- 2022.9.40
jupyter ms- 2022.8.1002431955
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.9
remote-containers ms- 0.251.0
test-adapter-converter ms- 0.1.6
vsliveshare ms- 1.0.5733
cargo pan 0.2.3
vscode-yaml-sort Pas 5.5.0
fabric8-analytics red 0.3.6
java red 1.11.0
vscode-xml red 0.21.0
vscode-yaml red 1.10.1
rust-analyzer rus 0.3.1229
jsonnetng Seb 1.3.0
crates ser 0.5.10
rewrap stk 1.16.3
vscode-rust-test-adapter Swe 0.11.0
even-better-toml tam 0.18.1
vscode-lldb vad 1.8.0
intellicode-api-usage-examples Vis 0.2.4
vscodeintellicode Vis 1.2.28
vscode-java-debug vsc 0.44.0
vscode-java-dependency vsc 0.21.0
vscode-java-pack vsc 0.25.3
vscode-java-test vsc 0.37.1
vscode-maven vsc 0.39.0
pestfile xor 0.3.0
rust-extension-pack Zer 1.1.0
vscode-proto3 zxh 0.5.5
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
i497e931:30553904
i5d37513:30580093
pyindex848:30577860
fc301958:30573243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant