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

Revert to 'ProtectSystem=strict' in boinc-client.service and make '/tmp' writable #5977

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

computezrmle
Copy link
Contributor

BOINC volunteers running VirtualBox tasks on Linux occasionally report errors like this if BOINC runs as a systemd service:

2024-12-28 01:20:15 (16867): Detected: VirtualBox VboxManage Interface (Version: 7.0.12)
2024-12-28 01:20:20 (16867): Error in host info for VM: -182
Command:
VBoxManage -q list hostinfo 
Output:
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_SOCKET_FAIL (0xC1F30200) - IPC daemon socket error (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.


2024-12-28 01:20:20 (16867): WARNING: Communication with VM Hypervisor failed.
2024-12-28 01:20:20 (16867): ERROR: VBoxManage list hostinfo failed
2024-12-28 01:20:20 (16867): called boinc_finish(1)

Usually this can be tracked down to a too restrictive setting in BOINC's systemd file:
ProtectSystem=strict

In most cases experienced volunteers suggest to replace strict with full, run systemctl daemon-reload and restart BOINC.
This works since - unlike strict - full leaves /tmp writable for BOINC and it's child processes.
The disadvantage is that it also leaves many other directories writable.
A better solution might be to leave strict and make /tmp writable which can be configured using ReadWritePaths=.

Background details

From the systemd manual

ProtectSystem=
Takes a boolean argument or the special values "full" or "strict". If true, mounts the /usr/ and the boot loader directories (/boot and /efi) read-only for processes invoked by this unit. If set to "full", the /etc/ directory is mounted read-only, too. If set to "strict" the entire file system hierarchy is mounted read-only, except for the API file system subtrees /dev/, /proc/ and /sys/ (...) If this option is used, ReadWritePaths= may be used to exclude specific directories from being made read-only.

From the VirtualBox manual

VBoxSVC IPC Issues
On Linux, Oracle VirtualBox makes use of a custom version of Mozilla XPCOM (cross platform component object model) for interprocess and intraprocess communication (IPC). (...) Communication between the various Oracle VirtualBox components and VBoxSVC is performed through a local domain socket residing in /tmp/.vbox-username-ipc. In case there are communication problems, such as an Oracle VirtualBox application cannot communicate with VBoxSVC, terminate the daemons and remove the local domain socket directory.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • client/scripts/boinc-client.service.in: Language not supported
@AenBleidd
Copy link
Member

@Germano0, @lfielf, could you please review this PR?
@computezrmle, please fix the tests (IF you don't want or don't know how - I can do that for you)

@AenBleidd AenBleidd requested a review from lfield December 29, 2024 00:17
Add '-/tmp' to 'ReadWritePaths'.
@computezrmle
Copy link
Contributor Author

@computezrmle, please fix the tests ...

Done.

Add test for 'ProtectSystem=strict'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants