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

Transferring larger files to a qube with NFS or CIFS/SMB mounted share crashes the qube #9670

Closed
PeterLacknase opened this issue Dec 27, 2024 · 3 comments
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: networking C: storage P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: self-closed Voluntarily closed by the person who opened it before another resolution occurred. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@PeterLacknase
Copy link

PeterLacknase commented Dec 27, 2024

How to file a helpful issue

Qubes OS release

Qubes Release 4.2.3 (R4.2) -- tested with kernel-default and kernel-latest

Brief summary

Any transfer to or from a qube with an NFS mount from a local NFSv3/NFSv4 server crashes/stalls the qube. After some time you'll have to kill the instance. No matter what template (tried it with Debian-12, Fedora-40 and Fedora-41) -- so SELinux is not the culprit.

Tried it with different server shares on different machines (Debian server with kernel NFS, OmniOS server with kernel NFS, TrueNAS Core/FreeBSD with NFS daemon).

On the command line after mounting the share within a qube everything works fine ... creating dirs, listing, touching files, deleting, renaming/moving, editing ... no matter the mount is NFSv3 or NFSv4. The same mounts work with "bare metal" linux clients (tried Debian and Arch) and MacOS. Even with larger files (500MB and above). But as soon as a qube tries to write to or read larger data from the share, the qube dies. The resources are fine (4GB/8GB/16GB -- you name it -- 40GB, 80GB, 120GB local space ... doesn't make any difference).

No suspicious status messages in dom0: /var/log/qubes/qrexec.$QUBENAME.log, or within the qube via dmesg or journalctl -x ... the server shows just open sessions. Everything is fine on server side. (With any of the tested servers.)

Steps to reproduce

In a qube(-template) install nfs-utils (Fedora-40/41) or nfs-common (Debian) deps included and mount the share. I did it via rc.local, but it's the same from the command line:

sudo vi /rw/config/rc.local ->

mkdir /home/user/test
echo '' >> /etc/fstab
echo '$SOMELOCALIP:/srv/SOMESHARE /home/user/test nfs rw,_netdev 0 0' >> /etc/fstab
mount /home/user/backup

Expected behavior

Should work like it did last time mid December. I dare to guess: Some updates to qubes core packages must have b0rked it, since it used to work with any template and now it doesn't ... again with any template I tried.

Actual behavior

The qube stalls/dies. No qubes backup via network :-(

@PeterLacknase PeterLacknase added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Dec 27, 2024
@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: storage affects-4.2 This issue affects Qubes OS 4.2. C: networking labels Dec 28, 2024
@PeterLacknase
Copy link
Author

Latest updates (kernel, qubes-utils etc. etc.) fixed the reading part.

But still ... when writing large(r) files, things get queued and the qube hangs immediately afterwards (again). Tested (again) with Fedora-[40|41]- and Debian-12-templates.

@PeterLacknase
Copy link
Author

While searching for an alternative solution it seems to me that the same applies to cifs/smb mounts ...

mkdir /home/user/backup
echo '#The following line is added at boot by the /rw/config/rc.local script' >> /etc/fstab
echo '//$SERVERIP/$SHARENAME /home/user/backup cifs uid=user,credentials=/home/user/.smb,iocharset=utf8,vers=3,noperm 0 0' >> /etc/fstab
mount /home/user/backup

@PeterLacknase PeterLacknase changed the title Transferring larger files to and from a qube with NFS mounted share crashes the qube Transferring larger files to a qube with NFS or CIFS/SMB mounted share crashes the qube Jan 3, 2025
@PeterLacknase
Copy link
Author

Reinstalled Qubes OS 4.2.3 from freshly downloaded ISO, updated everything and recovered my qubes from a full backup.
With Fedora-40/Debian-12 templates, standard kernel and the latest fixes the error is gone. I must have b0rked something myself while trying to compensate the memory ballooning.

@andrewdavidwong andrewdavidwong added R: self-closed Voluntarily closed by the person who opened it before another resolution occurred. and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: networking C: storage P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: self-closed Voluntarily closed by the person who opened it before another resolution occurred. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

2 participants