testing/code-oss (testing/electron?): extension host crashes with "sched_getscheduler: Function not implemented"
I'm using Alpine Edge; I've upgraded the system to the latest version a couple of days ago; and now whenever I try to open "Remote Explorer" (to connect to the remote instance with my projects, using this OSS extension ), extension host crashes with "Extension host terminated unexpectedly 3 times within the last 5 minutes", preventing me from using code-oss remotely.
It worked flawlessly before that upgrade. Everything else is at the latest version now (doas apk update && doas apk upgrade
does not report anything). Tried rebooting to make sure that only the latest versions are used, didn't help.
I'm not sure what version of code-oss I had before, I had it pinned to most likely 1.72.2-r0. I've updated everything else IIRC a couple of weeks ago. So the problem is likely caused by changes either in code-oss
somewhere between code-oss
from 1.72.2-r0 to 1.77.3-r0, or in some other package (electron? musl?) over the past weeks.
I can also reproduce the bug in a fresh code-oss profile:
- Help -> Show all commands, "Profiles: Create a temporary profile";
- Go to extensions, search for "Open Remote - SSH", install it;
- In the left sidebar, "Remote Explorer" button will appear (among "Explorer", "Search", "Source Control", "Run and Debug" and "Extensions"), click it;
- Observe the error dialog from code-oss about extension host crash; observe that clicking "Add New" or "Configure" in "SSH Targets" does not do anything.
When I run code-oss --verbose --log trace
to get more information for debugging, there are only these messages between the moment when I click on "Remote Explorer" and the crash:
[11547:0426/195113.184064:INFO:CONSOLE(620)] "%cTRACE color: #888 onWillActivateByEvent: onView:sshHosts", source: vscode-file://vscode-app/usr/lib/code-oss/resources/app/out/vs/workbench/workbench.desktop.main.js (620)
[0426/195113.253001:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253112:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253212:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253301:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253385:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253455:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253497:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253558:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253611:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253654:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253689:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253735:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253816:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253885:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.253949:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[0426/195113.254023:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
[main 2023-04-26T17:51:13.267Z] [UtilityProcess id: 1, type: extensionHost, pid: 11676]: received exit event with code 11
[main 2023-04-26T17:51:13.267Z] Extension host with pid 11676 exited with code: 11, signal: unknown.
[main 2023-04-26T17:51:13.268Z] [UtilityProcess id: 1, type: extensionHost, pid: 11676]: crashed with code 11 and reason 'crashed'
[11547:0426/195113.268939:INFO:CONSOLE(2627)] "Extension host (LocalProcess) terminated unexpectedly. Code: 11, Signal: unknown", source: vscode-file://vscode-app/usr/lib/code-oss/resources/app/out/vs/workbench/workbench.desktop.main.js (2627)
So it looks like extension host crashes because sched_getscheduler
is not implemented.
The only process_reader_linux.cc
I can find on the internet is from Chromium source codes; and the only sched_getscheduler: Function not implemented
I can find is from Alpine issues like #13029 (closed)
However, I do have gtk+3.0
(and also gcompat
, libstdc++
and procps
) installed; and chromium works without any problems on my system, implying that the problem is specific to the chromium bundled with electron.
Also I don't know anything about anything, but chromium has this patch for sched_getscheduler on musl while electron, it seems, doesn't. Another patch for sched_getscheduler is present in both chromium and electron. However, both patches touch other .cc
files, not process_reader_linux.cc
, so maybe this is not related.
Additionally, since even the simplest commands fail (such as "Remote-SSH: Open SSH Configuration File"), it seems that the crash happens while, or before extension's activate
function is executed.