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

fatal: failed to set up maintenance schedule #709

Open
alexanderilyin opened this issue Nov 19, 2024 · 3 comments
Open

fatal: failed to set up maintenance schedule #709

alexanderilyin opened this issue Nov 19, 2024 · 3 comments

Comments

@alexanderilyin
Copy link

I'm trying scalar in Dev Containersand getting some errors & fatals:

⬢ [Docker] ❯ scalar register
error: another process is scheduling background maintenance
fatal: failed to set up maintenance schedule
error: another process is scheduling background maintenance
fatal: failed to set up maintenance schedule
error: another process is scheduling background maintenance
fatal: failed to set up maintenance schedule
warning: could not turn on maintenance

Here is distro in the image:

⬢ [Docker] ❯ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

And this is the image I'm in:

FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm

Here is VS Code version but it probably does not matter:

⬢ [Docker] ❯ code --version
1.95.3
f1a4fb101478ce6ec82fe9627c43efbf9e98c813
x64

Here is what's running in container:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
node     30013  0.0  0.0   2576   888 ?        Ss   08:00   0:00 /bin/sh
node     30001  0.2  0.6 992632 49536 ?        Ssl  08:00   0:00 /home/node/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node -e  ????const net = require('net'); ????const fs = require('fs'); ????process.stdin.pause(); ????const client = net.createConnection({ host: '127.0.0.1', port: 38397 }, () => { ?????console.error('Connection established'); ?????client.pipe(process.stdout); ?????process.stdin.pipe(client); ????}); ????client.on('close', function (hadError) { ?????console.error(hadError ? 'Remote close with error' : 'Remote close'); ?????process.exit(hadError ? 1 : 0); ????}); ????client.on('error', function (err) { ?????process.stderr.write(err && (err.stack || err.message) || String(err)); ????}); ????process.stdin.on('close', function (hadError) { ?????console.error(hadError ? 'Remote stdin close with error' : 'Remote stdin close'); ?????process.exit(hadError ? 1 : 0); ????}); ????process.on('uncaughtException', function (err) { ?????fs.writeSync(process.stderr.fd, `Uncaught Exception: ${String(err && (err.stack || err.message) || err)}\n`); ????}); ???
node     29972  0.1  0.6 1000064 55132 ?       Ssl  08:00   0:00 /home/node/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node -e  ????const net = require('net'); ????const fs = require('fs'); ????process.stdin.pause(); ????const client = net.createConnection({ host: '127.0.0.1', port: 38397 }, () => { ?????console.error('Connection established'); ?????client.pipe(process.stdout); ?????process.stdin.pipe(client); ????}); ????client.on('close', function (hadError) { ?????console.error(hadError ? 'Remote close with error' : 'Remote close'); ?????process.exit(hadError ? 1 : 0); ????}); ????client.on('error', function (err) { ?????process.stderr.write(err && (err.stack || err.message) || String(err)); ????}); ????process.stdin.on('close', function (hadError) { ?????console.error(hadError ? 'Remote stdin close with error' : 'Remote stdin close'); ?????process.exit(hadError ? 1 : 0); ????}); ????process.on('uncaughtException', function (err) { ?????fs.writeSync(process.stderr.fd, `Uncaught Exception: ${String(err && (err.stack || err.message) || err)}\n`); ????}); ???
node     29690  0.0  0.0   2576   904 ?        Ss   08:00   0:00 /bin/sh
node     29702  0.0  0.5 1024324 42964 ?       Sl   08:00   0:00  \_ /home/node/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /tmp/vscode-remote-containers-server-d7d3ab26-c407-4070-bb60-c45ab2af12ef.js
root     29564  0.0  0.0   2576   896 ?        Ss   08:00   0:00 /bin/sh
node     29492  0.0  0.0   2576  1704 ?        Ss   08:00   0:00 /bin/sh
root     29470  0.0  0.0   2576   912 ?        Ss   08:00   0:00 /bin/sh -c echo "Container already running. Keep-alive process started." ; export VSCODE_REMOTE_CONTAINERS_SESSION=9a38d847-a33a-4f3e-a1cb-f8224d527d131732003249384 ; /bin/sh
root     29476  0.0  0.0   2576   948 ?        S    08:00   0:00  \_ /bin/sh
node       247  0.0  0.0   2576   784 ?        Ss   06:20   0:00 sh /home/node/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/node/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/node/.vscode-server/data/Machine/.connection-token-f1a4fb101478ce6ec82fe9627c43efbf9e98c813 --extensions-download-dir /home/node/.vscode-server/extensionsCache --install-extension dbaeumer.vscode-eslint --install-extension ms-python.vscode-pylance --install-extension ms-python.black-formatter --install-extension donjayamanne.python-environment-manager --install-extension bernhard-42.ocp-cad-viewer --install-extension redhat.vscode-yaml --install-extension yzhang.markdown-all-in-one --install-extension bierner.github-markdown-preview --install-extension bierner.markdown-preview-github-styles --install-extension bierner.markdown-checkbox --install-extension bierner.markdown-yaml-preamble --install-extension bierner.markdown-footnotes --install-extension bierner.markdown-mermaid --install-extension samuelcolvin.jinjahtml --install-extension Atlassian.atlascode --install-extension GitHub.vscode-pull-request-github --install-extension GitHub.vscode-github-actions --install-extension jock.svg --install-extension swyddfa.esbonio --install-extension Codeium.codeium --install-extension ms-azuretools.vscode-docker --install-extension hediet.debug-visualizer --install-extension bbenoist.vagrant --install-extension ryanluker.vscode-coverage-gutters --install-extension ms-python.python --install-extension chintans98.markdown-jira --install-extension streetsidesoftware.code-spell-checker --install-extension alexkrechik.cucumberautocomplete --install-extension GitHub.copilot --start-server --disable-websocket-compression --skip-requirements-check
node       257  1.0  1.4 11852964 114304 ?     Sl   06:20   1:05  \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/server-main.js --log debug --force-disable-user-env --server-data-dir /home/node/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/node/.vscode-server/data/Machine/.connection-token-f1a4fb101478ce6ec82fe9627c43efbf9e98c813 --extensions-download-dir /home/node/.vscode-server/extensionsCache --install-extension dbaeumer.vscode-eslint --install-extension ms-python.vscode-pylance --install-extension ms-python.black-formatter --install-extension donjayamanne.python-environment-manager --install-extension bernhard-42.ocp-cad-viewer --install-extension redhat.vscode-yaml --install-extension yzhang.markdown-all-in-one --install-extension bierner.github-markdown-preview --install-extension bierner.markdown-preview-github-styles --install-extension bierner.markdown-checkbox --install-extension bierner.markdown-yaml-preamble --install-extension bierner.markdown-footnotes --install-extension bierner.markdown-mermaid --install-extension samuelcolvin.jinjahtml --install-extension Atlassian.atlascode --install-extension GitHub.vscode-pull-request-github --install-extension GitHub.vscode-github-actions --install-extension jock.svg --install-extension swyddfa.esbonio --install-extension Codeium.codeium --install-extension ms-azuretools.vscode-docker --install-extension hediet.debug-visualizer --install-extension bbenoist.vagrant --install-extension ryanluker.vscode-coverage-gutters --install-extension ms-python.python --install-extension chintans98.markdown-jira --install-extension streetsidesoftware.code-spell-checker --install-extension alexkrechik.cucumberautocomplete --install-extension GitHub.copilot --start-server --disable-websocket-compression --skip-requirements-check
node       405  0.1  0.5 11745968 46256 ?      Sl   06:20   0:10      \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/bootstrap-fork --type=ptyHost --logsPath /home/node/.vscode-server/data/logs/20241119T062047
node     30269  0.0  0.0  10892  7744 pts/0    Ss   08:00   0:00      |   \_ /bin/bash --init-file /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
node     32215  0.0  0.0  11100  4324 pts/0    R+   08:04   0:00      |   |   \_ ps auxfww
node     30581  0.0  0.0  10892  7676 pts/1    Ss+  08:00   0:00      |   \_ /bin/bash --init-file /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
node     30777  0.0  0.0  10892  7768 pts/2    Ss+  08:01   0:00      |   \_ /bin/bash --init-file /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
node     29995  6.2  1.0 11792180 81144 ?      Sl   08:00   0:12      \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/bootstrap-fork --type=fileWatcher
node     30232 14.1  9.7 55602432 790956 ?     Sl   08:00   0:28      \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node --dns-result-order=ipv4first /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/bootstrap-fork --type=extensionHost --transformURIs --useHostProxy=true
node     30404  0.3  0.9 1302996 73940 ?       Sl   08:00   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/redhat.vscode-yaml-1.15.0/dist/languageserver.js --node-ipc --clientProcessId=30232
node     30486  0.3  0.0   5464  4668 ?        S    08:00   0:00          \_ /home/node/.vscode-server/extensions/ms-python.python-2024.20.0-linux-x64/python-env-tools/bin/pet server
node     30586  0.3  0.6 995176 54608 ?        Sl   08:00   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=30232
node     30659  0.3  0.5 129924 47564 ?        Sl   08:00   0:00          \_ /workspaces/partcad/.venv/bin/python /home/node/.vscode-server/extensions/ms-python.black-formatter-2024.4.0/bundled/tool/lsp_server.py --stdio
node     30809  1.0  1.9 12179544 158116 ?     Sl   08:01   0:02          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/ms-python.vscode-pylance-2024.11.2/dist/server.bundle.js --cancellationReceive=file:f4501af8559d544505285d80e0cf5e6ba923f2c851 --node-ipc --clientProcessId=30232
node     31028  0.1  0.9 1024972 80532 ?       Sl   08:01   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/github.vscode-github-actions-0.27.0/dist/server-node.js --node-ipc --clientProcessId=30232
node     31045  0.1  0.6 1029000 55808 ?       Sl   08:01   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/dbaeumer.vscode-eslint-3.0.10/server/out/eslintServer.js --node-ipc --clientProcessId=30232
node     31051  1.6  1.9 11859160 154044 ?     Sl   08:01   0:03          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/streetsidesoftware.code-spell-checker-4.0.18/packages/_server/dist/main.cjs --node-ipc --clientProcessId=30232
node     31134  0.0  0.6 992020 49216 ?        Sl   08:01   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/ms-azuretools.vscode-docker-1.29.3/dist/dockerfile-language-server-nodejs/lib/server.js --node-ipc --node-ipc --clientProcessId=30232
node     31140  0.0  0.5 991004 42692 ?        Sl   08:01   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/ms-azuretools.vscode-docker-1.29.3/dist/compose-language-service/lib/server.js --node-ipc --node-ipc --clientProcessId=30232
node     31157  0.1  1.1 2780460 94304 ?       Sl   08:01   0:00          \_ /home/node/.vscode-server/extensions/codeium.codeium-1.24.8/dist/ef806f7cf5ef5903f9da0506527ae0e7897e84db/language_server_linux_x64 --api_server_url https://server.codeium.com --manager_dir /tmp/24b1c5e6-4ddf-47f6-a6f3-3753586c87c4/codeium/manager --enable_chat_web_server --enable_lsp --inference_api_server_url https://inference.codeium.com --database_dir /home/node/.codeium/database/9c0694567290725d9dcba14ade58e297 --enable_index_service --enable_local_search --search_max_workspace_file_count 5000 --indexed_files_retention_period_days 30 --workspace_id file_workspaces_partcad --sentry_telemetry
node     31177  2.4  3.1 3190000 255872 ?      Sl   08:01   0:04          |   \_ /home/node/.vscode-server/extensions/codeium.codeium-1.24.8/dist/ef806f7cf5ef5903f9da0506527ae0e7897e84db/language_server_linux_x64 --api_server_url https://server.codeium.com --manager_dir /tmp/24b1c5e6-4ddf-47f6-a6f3-3753586c87c4/codeium/manager --enable_chat_web_server --enable_lsp --inference_api_server_url https://inference.codeium.com --database_dir /home/node/.codeium/database/9c0694567290725d9dcba14ade58e297 --enable_index_service --enable_local_search --search_max_workspace_file_count 5000 --indexed_files_retention_period_days 30 --workspace_id file_workspaces_partcad --sentry_telemetry --run_child --limit_go_max_procs 4 --random_port --random_port_dir=/tmp/24b1c5e6-4ddf-47f6-a6f3-3753586c87c4/codeium/manager/child_random_port_1732003269508096103_5546528500460234467 --manager_lock_file=/tmp/24b1c5e6-4ddf-47f6-a6f3-3753586c87c4/codeium/manager/locks/manager.lock --child_lock_file /tmp/24b1c5e6-4ddf-47f6-a6f3-3753586c87c4/codeium/manager/locks/child_lock_1732003269508338278_2263753085719421223
node     31218  0.0  0.6 992128 51188 ?        Sl   08:01   0:00          \_ /vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /home/node/.vscode-server/extensions/alexkrechik.cucumberautocomplete-3.0.5/gserver/out/server.js --node-ipc --clientProcessId=30232
node       219  0.0  0.0   2576   844 ?        Ss   06:20   0:00 /bin/sh
node       239  0.0  0.2 1024324 18216 ?       Sl   06:20   0:00  \_ /home/node/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /tmp/vscode-remote-containers-server-0873324b-f54a-4aae-9773-963fec0b9391.js
root         1  0.0  0.0   2576  1484 ?        Ss   06:20   0:01 /bin/sh -c echo Container started trap "exit 0" 15  exec "$@" while sleep 1 & wait $!; do :; done -
root     32204  0.0  0.0   2484   888 ?        S    08:04   0:00 sleep 1

I also had https://starship.rs/ which been causing some git problems but getting rid of it does not help with error/fatal.

@derrickstolee
Copy link

Frequently, containers don't provide access to the systemd scheduler. Likely, we would be able to see that if you reran git maintenance start with GIT_TRACE2_PERF=1 so you could see the child processes that are executed and what their exit codes are.

@alexanderilyin
Copy link
Author

⬢ [Docker] ❯ GIT_TRACE2_PERF=1 git maintenance start
10:37:11.434168 common-main.c:57             | d0 | main                     | version      |     |           |           |              | 2.47.0.vfs.0.3
10:37:11.434233 common-main.c:58             | d0 | main                     | start        |     |  0.000339 |           |              | git maintenance start
10:37:11.434339 compat/linux/procinfo.c:170  | d0 | main                     | cmd_ancestry |     |           |           |              | ancestry:[bash node node sh]
10:37:11.445798 repository.c:241             | d0 | main                     | def_repo     | r1  |           |           |              | worktree:/workspaces/partcad
10:37:11.456486 git.c:552                    | d0 | main                     | cmd_name     |     |           |           |              | maintenance (maintenance)
10:37:11.457033 run-command.c:734            | d0 | main                     | child_start  |     |  0.023144 |           |              | [ch0] class:? argv:[systemctl --user list-timers]
10:37:11.459914 run-command.c:990            | d0 | main                     | child_exit   |     |  0.026024 |  0.002880 |              | [ch0] pid:1335 code:0
10:37:11.459954 run-command.c:734            | d0 | main                     | child_start  |     |  0.026066 |           |              | [ch1] class:? argv:[systemctl --user list-timers]
10:37:11.462939 run-command.c:990            | d0 | main                     | child_exit   |     |  0.029047 |  0.002981 |              | [ch1] pid:1336 code:0
10:37:11.464863 usage.c:83                   | d0 | main                     | error        |     |           |           |              | another process is scheduling background maintenance
error: another process is scheduling background maintenance
10:37:11.464906 usage.c:64                   | d0 | main                     | error        |     |           |           |              | failed to set up maintenance schedule
fatal: failed to set up maintenance schedule
10:37:11.465023 usage.c:78                   | d0 | main                     | exit         |     |  0.031135 |           |              | code:128
10:37:11.466500 trace2/tr2_tgt_perf.c:217    | d0 | main                     | atexit       |     |  0.032611 |           |              | code:128
⬢ [Docker] ❯ systemctl --user list-timers

"systemd" is not running in this container due to its overhead.
Use the "service" command to start services instead. e.g.: 

service --status-all
⬢ [Docker] ❯ service --status-all
 [ - ]  dbus
 [ ? ]  hwclock.sh
 [ - ]  procps
 [ - ]  rsync
 [ - ]  sudo
 [ - ]  x11-common

@alexanderilyin
Copy link
Author

Thanks for the guidance, my current setup in context is Docker Container in Docker for Desctop, which is WSL2 on Windows 10. My git repo is on the Windows FS so probably I just need to do the new git/scalar thing on host instead of the container. Don't really want to run systemd in container, unless scalar will provide extreme benefits.

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

2 participants