FS#70896 - [code] Program immediately freezes when started

Attached to Project: Community Packages
Opened by Brian Lee (kir12) - Sunday, 16 May 2021, 05:42 GMT
Last edited by Filipe Laíns (FFY00) - Monday, 17 May 2021, 14:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Filipe Laíns (FFY00)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 18
Private No

Details

Description:
After the recent update to Code-OSS Version 1.56.2, when attempting to start the program, the standard user interface will properly render but freezes immediately after. The end result is that the software is unusable.

Additional info:
* package version(s) 1.56.2

Steps to reproduce:
1. Install or update the Arch Linux package "code": https://archlinux.org/packages/community/x86_64/code/
2. Attempt to run the program.
3. Result: Software UI is generated but does not respond to use input, and freezes shortly thereafter.

Below is relevant DE/Kernel information, if needed.
Kernel: x86_64 Linux 5.12.3-arch1-1
DE: KDE 5.82.0 / Plasma 5.21.5
WM: KWin

One thing I will note is that in previous versions of KDE, numerous programs frequently froze as a result of bugs related to how KDE handled external monitors. However, I do not consider it likely this is a KDE-related error, since (a) that problem hasn't surfaced recently (at least in my use case) and (b) Code-OSS also freezes when I have no external monitor attached. If there is sufficient reason to conclude otherwise, do let me know.

This task depends upon

Closed by  Filipe Laíns (FFY00)
Monday, 17 May 2021, 14:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  code 1.56.2-2
Comment by Michael (oldominion) - Sunday, 16 May 2021, 06:30 GMT
Got the same problem as of today after updating to Electron 12.0.7, Code-OSS opens and freezes instantly after a few seconds a force quit pop-up appears.

Code-OSS Version: 1.56.2
Electron: 12.0.7
Kernel: x86_64 Linux 5.12.3-arch1-1
DE: GNOME Shell 40.1
WM: Mutter
Comment by Sven (sthiele) - Sunday, 16 May 2021, 07:35 GMT
I can confirm this as well.
Comment by NOYB (ShuP1) - Sunday, 16 May 2021, 09:16 GMT
Starting code 1.56.2 with verbose flag, logs this error multiple times

[main 2021-05-16T09:02:16.888Z] [storage state.vscdb] open(): Unable to open DB due to Error: The module '/usr/lib/code/node_modules.asar.unpacked/vscode-sqlite3/build/Release/sqlite.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 87. This version of Node.js requires
NODE_MODULE_VERSION 85. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

Kernel: x86_64 Linux 5.12.3-arch1-1
WM: i3-gaps-next-git 4.19.1.r69.g1ab2433e-1
Comment by Daniel (archsoft) - Sunday, 16 May 2021, 09:24 GMT
code 1.56.2 depends on electron12, but the start-script still using electron11.

Temporary fix:
- Install community/electron (this is version 12)
- Edit start-script "/usr/bin/code", replace "electron11" with "electron"
Comment by mjb (mjb) - Sunday, 16 May 2021, 09:42 GMT
Confirmed
Comment by Keist (k-stz) - Sunday, 16 May 2021, 11:57 GMT
Confirmed. Also Daniel (archsoft)'s workaround works for me. Or Downgrading to code 1.55.

Addition: strace on code's process produces the following syscall in a loop:
...
futex(0x26c2d4b636d0, FUTEX_WAKE_PRIVATE, 1) = 1
getpid() = 9447
futex(0x26c2d4b6370c, FUTEX_WAIT_PRIVATE, 3, NULL) = -1 EAGAIN (Resource temporarily unavailable)
...
Comment by Filipe Laíns (FFY00) - Sunday, 16 May 2021, 15:10 GMT
The issue is that this commit manually changed the electron binary to electron11, instead of simply changing the variable in the PKGBUILD, which would have replaced the electron binary name in the script with the correct one.

https://github.com/archlinux/svntogit-community/commit/412cf018280fd9b9f612eb84075354b9fe555af8

I missed that due to an oversight, I am building 1.56.2-2 now, and I've added a comment in the script to prevent this in the future :)
Comment by Filipe Laíns (FFY00) - Sunday, 16 May 2021, 15:44 GMT
I have pushed 1.56.2-2 a few minutes ago, please make sure everything is fine now and I'll close this :)
Comment by Alexandre Bique (babali) - Sunday, 16 May 2021, 16:29 GMT
Did you push it to testing or prod?
Comment by Filipe Laíns (FFY00) - Sunday, 16 May 2021, 16:42 GMT
I tested locally and verified it was working and as the package in [community] was broken I just pushed it there. I just wanted to confirm no one is having weird issues.
Comment by Brian Lee (kir12) - Sunday, 16 May 2021, 17:22 GMT
Yep I can confirm, it works fine for me now.
Comment by Keist (k-stz) - Sunday, 16 May 2021, 17:44 GMT
thank you, the newest version works like a charm! :)

Loading...