microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.53k stars 28.11k forks source link

vscode lock-up for ~30s if database is locked with `OSCrypt tried libsecret but couldnt initialize` #200586

Open hasezoey opened 6 months ago

hasezoey commented 6 months ago

Type: Bug

i believe this is related to the dummy entry Chrome makes and locks-up if it cannot find it in any locked database (even if they had already been opened once in keepassxc and so should be "warm"). note that this was not a problem with vscode 1.79's keytar, there it would in 80% of cases ask me to unlock the database first (weirdly keytar's implementation was timing out sometimes and i am not sure why) * EDIT: 1.79.2's keytar and keepassxc sometimes asks for unlocking the database but not always (likely a keepassxc bug if dbus-monitor is anything to go by); but at least keytar did not make vscode un-useable for such a long time (but it did prevent / prolong shutdown if keytar couldnt resolve / is still trying to resolve)

VS Code version: Code 1.85.0 (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T22:27:05.695Z) OS version: Linux x64 6.6.5-1-MANJARO Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 5800X 8-Core Processor (16 x 3700)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|3, 2, 2| |Memory (System)|15.53GB (9.39GB free)| |Process Argv|. --verbose --crash-reporter-id 3159ccf7-dead-4761-b348-a6094ef14c0c| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|plasmawayland| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|wayland|
Extensions (21) Extension|Author (truncated)|Version ---|---|--- path-intellisense|chr|2.8.5 gitignore|cod|0.9.0 vscode-markdownlint|Dav|0.53.0 vscode-eslint|dba|2.4.2 gitlens|eam|14.5.2 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.1.0 html-slim-scss-css-class-completion|gen|1.7.8 gc-excelviewer|Gra|4.2.58 vhs|gri|0.0.4 todo-tree|Gru|0.0.226 vscode-test-explorer|hbe|2.21.1 graphql-for-vscode|kum|1.15.3 rainbow-csv|mec|3.9.0 git-graph|mhu|1.30.0 test-adapter-converter|ms-|0.1.8 vscode-xml|red|0.26.1 bash-beautify|sha|0.1.1 markdowntable|Tak|0.11.0 even-better-toml|tam|0.19.2 markdown-all-in-one|yzh|3.5.1
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30899288 vscaac:30438847 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 3biah626:30602489 89544117:30613380 2i9eh265:30646982 showlangstatbar:30737416 0bi6i642:30917235 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 welcomedialog:30910333 pythonnosmt12:30797651 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 dsvsc013:30795093 dsvsc014:30804076 dsvsc015:30845448 pythontestfixt:30902429 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30885897 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 aa_t_chat:30882232 ```
hasezoey commented 6 months ago

slight update to the reason why: from my further testing both keytar's and the new interfaces not prompting to unlock is because of a keepassxc issue https://github.com/keepassxreboot/keepassxc/issues/10096. but the point about the 30s lock-up still stands, and i also noticed that vscode is completely locked while the prompt is active, which was not the case with keytar

LucienMP commented 4 months ago

Happening for me on Fedora 38, Gnome desktop. image

[1613249:0225/164242.206696:VERBOSE1:key_storage_util_linux.cc(52)] Password storage detected desktop environment: GNOME [1613249:0225/164242.206707:VERBOSE1:key_storage_linux.cc(118)] Selected backend for OSCrypt: GNOME_LIBSECRET [1613249:0225/164307.220735:WARNING:key_storage_linux.cc(168)] OSCrypt tried Libsecret but couldn't initialise. [1613249:0225/164307.220859:VERBOSE1:key_storage_linux.cc(137)] OSCrypt did not initialize a backend.

LucienMP commented 3 months ago

Due to GNOME organizations brain dead implementation of their latest desktop environment it is now IMPOSSIBLE to run more than one desktop (although you can) but the instance manager gets in a weird state if you do. Resulting in this side effect.

https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/84#login-pane