QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
534 stars 46 forks source link

Error dom0 qmemman.systemstate: Xen free too small for satisfy assignments in journalctl #6328

Open jamke opened 3 years ago

jamke commented 3 years ago

Qubes OS version R4.0

Affected component(s) or functionality Memory manager (qmemman) in dom0.

Brief summary Every hour or even every couple of minutes in journalctl -r I see red lines with error:

Jan 01 12:00:30 dom0 qmemman.systemstate[5000]: Xen free = 526577477 too small for satisfy assignments! assigned_but_unused=513603439, domdict={'12': {'slow_memset_react': False, 'id': '12', 'mem_used': None, 'no_progress': False, 'memory_maximum': 851443712

How Reproducible Every day, every hour.

To Reproduce Install R4.0, use it and check journalctl for error messages.

Expected behavior No error messages in journalctl

Actual behavior Every hour or even every couple of minutes in journalctl -r I see read lines with error:

Jan 01 12:00:30 dom0 qmemman.systemstate[5000]: Xen free = 526577477 too small for satisfy assignments! assigned_but_unused=513603439, domdict={'12': {'slow_memset_react': False, 'id': '12', 'mem_used': None, 'no_progress': False, 'memory_maximum': 851443712

Additional context I hope it does not affect the system work. But maybe I'm wrong and it has to be addressed by me as soon as possible?

Solutions you've tried None.

Related, non-duplicate issues I found none with this message substrings.

jamke commented 3 years ago

The easiest way to check these errors: journalctl -r -p 3 in dom0. I see this error like every minute there. Can anyone check it too?

P.S. One example from other user I found: https://www.mail-archive.com/qubes-users@googlegroups.com/msg32640.html

zoechi commented 3 years ago

I discovered this errors as well, while investigating frequent KDE freezes (no indication they are related so far though). I removed 2 Qubes recently because I run out of disk space.

donob4n commented 3 years ago

Related to https://github.com/QubesOS/qubes-issues/issues/6314

I think that it is an expected "warning" if you open too many VM's for your memory. It just says that there are vm's demanding more memory than currently available. It should be changed from log.error() to log.debug() or log.info().

https://github.com/QubesOS/qubes-core-admin/blob/df6407f50811573760879a7a48b9243ea31e504a/qubes/qmemman/__init__.py#L113

jamke commented 3 years ago

I think that it is an expected "warning" if you open too many VM's for your memory. It just says that there are vm's demanding more memory than currently available. It should be changed from log.error() to log.debug() or log.info().

Many VMs - yes. Not enough physical memory - probably not.

I think memory management in Qubes OS has some issue. Something like this: Qubes OS gives a lot of memory to VMs (when those do not need it nor ask, just to distribute it) and then Qubes OS has issue to reallocated it (distribute) properly among many running VMs. And users see this error in logs constantly.

zoechi commented 3 years ago

I have 2 VMs that both only run Firefox and a third one where I run my development environment (Emacs, Chrome, Docker). The machine has 32GB of RAM.

jamke commented 3 years ago

T: bug needs-diagnosis

Any additional help needed to diagnose this bug? I can answer related questions if you needed it.

github-actions[bot] commented 1 year ago

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. (For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

jamke commented 1 year ago

I have this bug on R4.1. Just checked the logs, it happens several times a day. Once more: I can answer related questions to help with diagnosis.