core-admin/qubes/tools
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
..
__init__.py Remove python2 compat __future__ imports 2020-02-15 17:33:34 +00:00
qmemmand.py Fix multiple qmemman issues 2020-04-01 03:46:29 +02:00
qubes_create.py app: setup_pools() must be a coroutine 2019-06-28 10:29:26 +00:00
qubesd_query.py Drop async future check with python3 version 2018-11-22 19:34:58 +01:00
qubesd.py qubes: Allow for explicit closing of objects 2017-08-31 20:30:23 +02:00