-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Memory ballooning issue is back for the fedora-41 template #9663
Comments
I think the issue is that |
@marmarek Both a macro and a script would work. An online relabel is racy and might or might not work, or it might work most of the time and fail occasionally. However, I expect that most policy upgrades do not require a relabel, and in any case whether a relabel should happen is up to Fedora, not Qubes OS, except for upgrades to our own policy. |
It seems that's not the correct diagnosis. After the update, |
That's not it either... |
And at the same time, files in |
As for
I'm confused... |
While doing some tests, I noticed that reinstalling |
If I start with the Fedora 41 minimal template, install I think the best place to get help is from upstream Fedora. |
Which package was updated? |
@marmarek: can you check if a full relabel followed by two reboots solves the problem? |
If this happens while |
Why multiple relabels/reboots would change anything? We are talking about /run, which doesn't survive reboot... |
FWIW manually forcing full relabel does not help.
interesting mode... |
Diff of the resulting @@ -5149,7 +5153,6 @@
/usr/bin/livecd-creator -- system_u:object_r:livecd_exec_t:s0
/usr/bin/lttng-sessiond -- system_u:object_r:lttng_sessiond_exec_t:s0
/usr/bin/mariadb-backup -- system_u:object_r:mysqld_exec_t:s0
-/usr/bin/meminfo-writer -- system_u:object_r:qubes_meminfo_writer_exec_t:s0
/usr/bin/modules-update -- system_u:object_r:kmod_exec_t:s0
/usr/bin/mount\.ecryptfs -- system_u:object_r:mount_ecryptfs_exec_t:s0
/usr/bin/neutron-server -- system_u:object_r:neutron_exec_t:s0
@@ -5160,7 +5163,6 @@
/usr/bin/partition_uuid -- system_u:object_r:fsadm_exec_t:s0
/usr/bin/qemu-pr-helper -- system_u:object_r:virtd_exec_t:s0
/usr/bin/quantum-server -- system_u:object_r:neutron_exec_t:s0
-/usr/bin/qubesdb-daemon -- system_u:object_r:qubes_qubesdb_daemon_exec_t:s0
/usr/bin/restart-dirsrv -- system_u:object_r:initrc_exec_t:s0
/usr/bin/roundup-server -- system_u:object_r:roundup_exec_t:s0
/usr/bin/samba-gpupdate -- system_u:object_r:samba_gpupdate_exec_t:s0 This looks okay, as both files are in fact in /usr/sbin, not /usr/bin. And entries for /usr/sbin are still there. What I think is happening is that %post script of the policy package does
So, I think fixfiles thinks In fact, there is surprisingly little entries for |
There is
So, theoretically it should be called after the update, but I guess something went wrong here. And as can be seen above, there are specific packages that has it applied to via triggers. This I think the most reliable solution would be to add /usr/bin entries to our policy for all /usr/sbin binaries manually (have them more or less duplicated). This should fix the situation on Fedora (to be tested), regardless if |
/usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Part-of: QubesOS/qubes-issues#9663
/usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663
/usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663
/usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663
I can confirm I suffer from this bug after a recent SELinux package update on Fedora 41 (since my latest update two days ago). I don't know if it is the cause, but it's something worth imo to look at. |
Adjust according to https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Creating_the_Spec_File Specifically, when %selinux_relabel_post is used, %selinux_relabel_pre needs to be there too. QubesOS/qubes-issues#9663
Adjust according to https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Creating_the_Spec_File Specifically, when %selinux_relabel_post is used, %selinux_relabel_pre needs to be there too. QubesOS/qubes-issues#9663
Adjust according to https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Creating_the_Spec_File Specifically, when %selinux_relabel_post is used, %selinux_relabel_pre needs to be there too. QubesOS/qubes-issues#9663
Thanks @DemiMarie for the PRs. This seems to fix the issue when it's applied together with the problematic selinux-policy package update. But when applied on an already broken template, it doesn't always help. I've opened 3 more PRs, hopefully fixing this part. |
Thanks @marmarek for figuring out the spec file bugs. How did you figure out that the |
That did help a bit, but mostly at looking at content of those %selinux_ macros ( |
I built everything needed with all commits from this issue and it seems to work fine.
Only issue remaining now is the already broken templates. The rpm scriptlets randomly fails because of the low memory. I did this one, it seems to work and brings the memory up relatively fast:
|
The relevant package updates are supposed to fix the label anyway, but before that the template has too little memory to apply the update reliably (most of the time it works, but not always). Apply the label fix early to have more memory when installing updates. Script by Minimalist <[email protected]> QubesOS/qubes-issues#9663
Good idea |
I tried it and it works for broken templates. Maybe it's worth to note it in a news segment on Qubes as a workaround while a long term fix is on the way? |
* origin/pr/66: Ensure that qubesdb SELinux labels are correct on Fedora 41 Pull request description: /usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663
* origin/pr/120: Ensure that qubesdb SELinux labels are correct on Fedora 41 Pull request description: /usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663
/usr/sbin is now considered an alias for /usr/bin, so include rules for /usr/bin to ensure correct labelling. Do not remove the old rules to avoid regression on Fedora 40. Suggested-by: Marek Marczykowski-Górecki <[email protected]> Part-of: QubesOS/qubes-issues#9663 (cherry picked from commit 43387c3)
Adjust according to https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Creating_the_Spec_File Specifically, when %selinux_relabel_post is used, %selinux_relabel_pre needs to be there too. QubesOS/qubes-issues#9663 (cherry picked from commit 5c27d6e)
The relevant package updates are supposed to fix the label anyway, but before that the template has too little memory to apply the update reliably (most of the time it works, but not always). Apply the label fix early to have more memory when installing updates. Script by Minimalist <[email protected]> QubesOS/qubes-issues#9663 (cherry picked from commit e7dedd2)
Qubes OS release
Qubes OS 4.2.3
Brief summary
The fedora-41 template based AppVMs stay to the minimal memory limit.
Other users got also this issue, see the related topic in the forum.
Steps to reproduce
Expected behavior
The XX current memory should grow over 400MB.
Actual behavior
Related to Fedora 41 template / selinux
Done checks
I did the
/.qubes-relabeled
removing /qrexec_timeout
procedure in the fedora-41 template, the relabel job executed and re-created the/.qubes-relabeled
file as expected:fedora-41 logs:
On next boot:
Logs of the XX AppVM:
The text was updated successfully, but these errors were encountered: