Hello all,

I noticed that the following commit causes a regression in QubesOS when
a VM's network interface is detached and re-attached a few times in a row:

  5b5971df3bc2775107ddad164018a8a8db633b81
  ("xen-netfront: remove warning when unloading module")

The regression exhibits itself via VM unresponsiveness to qrexec commands
and heavier than usual CPU utilization involving the xenbus and xenwatch
kernel threads in the VM whose network interface had been detached/re-attached.

This commit has been back-ported to the kernel trees for versions 4.9.80 and
4.14.17, which is why QubesOS's testing kernel (based on 4.14.18) is also
affected.

I am currently using QubesOS R3.2, but I believe this issue affects R4.0 as 
well.

Reverting this commit appears to resolve the regression for the time being. I
haven't had the time to formulate a proper correction.

Vefa

Note: I can reproduce the issue with the following shell script in dom0.

Eventually, one of the 'qvm-run ... true' commands in the while loop
fail, and the VM in question does not respond to any further qrexec commands
(for example, to start new applications).

=== 8< ===
#!/bin/bash

netvm="sys-firewall"
vm="untrusted"

if qvm-ls "${vm}" --raw-data state | grep -iqw running; then
        qvm-kill "${vm}"
fi

qvm-run -a -p -u root "${vm}" "echo 'file drivers/xen/xenbus/xenbus_probe*.c +pflmt' 
> /sys/kernel/debug/dynamic_debug/control"
qvm-run -a -p -u root "${vm}" "echo 'file drivers/net/xen-netfront.c +pflmt' > 
/sys/kernel/debug/dynamic_debug/control"
qvm-run -a -q -u root "${vm}" 'xterm -geometry 150x70 -e dmesg -w'

sleep 5

while true; do
        echo "Set netvm to none"
        qvm-prefs "${vm}" -s netvm none
        echo "Done"

        sleep 10

        # This command is expected to eventually fail
        # due to the regression.
        qvm-run -p "${vm}" true || break

        echo "Set netvm to ${netvm}"
        qvm-prefs "${vm}" -s netvm "${netvm}"
        echo "Done"

        sleep 10

        # This command is expected to eventually fail
        # due to the regression.
        qvm-run -p "${vm}" true || break
done

--
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/c49dbf7c-247c-0dad-40c9-8b3afba47d22%40runbox.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to