Note - this has also been backported to 4.11 RC2
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1844421
Title:
Linux VM deadlock during migration
Status in linux package in Ubuntu:
Confirmed
Bug description:
The following program will cause a Linux VM running under Xen to
deadlock if a suspend/migrate is attempted:
-----
import pyxs.client
import time
c = pyxs.client.Client(xen_bus_path="/dev/xen/xenbus")
c.connect()
c.transaction()
while True:
time.sleep(1000)
-----
When control/shutdown == "suspend", the kernel calls do_suspend()
which does a number of steps including freezing processes. It then
calls xs_suspend() to suspend xenstore, which takes some locks and
waits for all transactions to complete so that no new activity can
start while the VM is suspending:
-----
xs_suspend():
mutex_lock(&xs_state.transaction_mutex);
wait_event(xs_state.transaction_wq,
atomic_read(&xs_state.transaction_count) == 0); <-- the
xenwatch thread is waiting here
down_write(&xs_state.watch_mutex);
mutex_lock(&xs_state.request_mutex);
mutex_lock(&xs_state.response_mutex);
-----
The xenwatch thread is waiting for all outstanding transactions to
complete. However, by this point the processes have been frozen so any
outstanding transactions won't complete.
This affects all versions of Linux back to at least v3.2, but has been
fixed in v5.2-rc3 (see
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=867cefb4cb1012f42cada1c7d1f35ac8dd276071)
A backport to released Ubuntu kernels is requested.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1844421/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp