core-admin/qubes
Marek Marczykowski-Górecki dd50e300c3
Fix multiple qmemman issues
First the main bug: when meminfo xenstore watch fires, in some cases
(just after starting some domain) XS_Watcher refreshes internal list of
domains before processing the event. This is done specifically to
include new domain in there. But the opposite could happen too - the
domain could be destroyed. In this case refres_meminfo() function raises
an exception, which isn't handled and interrupts the whole xenstore
watch loop. This issue is likely to be triggered by killing the domain,
as this way it could disappear shortly after writing updated meminfo
entry. In case of proper shutdown, meminfo-writer is stopped earlier and
do not write updates just before domain destroy.
Fix this by checking if the requested domain is still there just after
refreshing the list.

Then, catch exceptions in xenstore watch handling functions, to not
interrupt xenstore watch loop. If it gets interrupted, qmemman basically
stops memory balancing.

And finally, clear force_refresh_domain_list flag after refreshing the
domain list. That missing line caused domain refresh at every meminfo
change, making it use some more CPU time.

While at it, change "EOF" log message to something a bit more
meaningful.

Thanks @conorsch for capturing valuable logs.

Fixes QubesOS/qubes-issues#4890
2020-04-01 03:46:29 +02:00
..
api Merge remote-tracking branch 'origin/pr/323' 2020-03-01 03:51:24 +01:00
ext gui: fixes from Marek's comments 2020-03-18 14:17:04 +01:00
qmemman qmemmand: separate SystemState init xc and xs to a 'init' method 2019-11-22 21:38:27 +01:00
storage Merge remote-tracking branch 'origin/pr/320' 2020-03-09 18:34:49 +01:00
tests Merge remote-tracking branch 'origin/pr/330' 2020-03-18 14:34:22 +01:00
tools Fix multiple qmemman issues 2020-04-01 03:46:29 +02:00
vm Add pre- events to vm features 2020-03-17 18:46:12 +01:00
__init__.py qubes module: Typo fix 2020-03-08 22:39:16 -04:00
app.py Support for AudioVM 2020-03-08 17:05:33 +01:00
backup.py Remove python2 compat __future__ imports 2020-02-15 17:33:34 +00:00
config.py config: fix mistake in path for services 2020-03-08 09:47:09 +01:00
devices.py Make pylint happy 2019-09-27 16:29:20 +02:00
dochelpers.py Fix Sphinx 2 new API for Fedora 31+ 2019-11-22 21:39:31 +01:00
events.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
exc.py Fixed Exceptions inferiting from KeyError 2019-12-09 21:02:24 +01:00
features.py Add pre- events to vm features 2020-03-17 18:46:12 +01:00
firewall.py Make pylint happy 2019-09-27 16:29:20 +02:00
log.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
rngdoc.py Remove python2 compat __future__ imports 2020-02-15 17:33:34 +00:00
tarwriter.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
utils.py Fix invalid timezone 2019-08-06 18:23:00 -03:00