Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2021 20:48:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 254513] virtio_random: random_harvestq spinning on a CPU with Q35 virtio random device
Message-ID:  <bug-254513-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254513

            Bug ID: 254513
           Summary: virtio_random: random_harvestq spinning on a CPU with
                    Q35 virtio random device
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: me@igalic.co

This virtual machine is running @ Hetzner on their CPX series, which uses t=
he
Qemu Q35 chipset. Support for this has been recently added to FreeBSD and i=
s in
FreeBSD 13.0.

The problem manifests as a load average of 1 on a 2 CPU system. `top -S` sh=
ows:

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMM=
AND
    8 root          1 -16    -     0B    16K   0B CPU0     0  10:42  99.95%
rand_harvestq


So lets dig into the random device.
The device is identified like this:

grep -i entropy /var/run/dmesg.boot
vtrnd0: <VirtIO Entropy Adapter> on virtio_pci4
random: registering fast source VirtIO Entropy Adapter

meena@websrv2-hel1 ~> devinfo -p vtrnd0 -v
vtrnd0 pnpinfo vendor=3D0x00001af4 device=3D0x1044 subvendor=3D0x1af4
device_type=3D0x00000004
 virtio_pci4 pnpinfo vendor=3D0x1af4 device=3D0x1044 subvendor=3D0x1af4
subdevice=3D0x1100 class=3D0x00ff00 at slot=3D0 function=3D0 dbsf=3Dpci0:5:=
0:0
 pci5
 pcib5 pnpinfo vendor=3D0x1b36 device=3D0x000c subvendor=3D0x1b36 subdevice=
=3D0x0000
class=3D0x060400 at slot=3D2 function=3D4 dbsf=3Dpci0:0:2:4=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
          pci0
 pcib0 pnpinfo _HID=3DPNP0A08 _UID=3D1 _CID=3DPNP0A03 at handle=3D\_SB_.PCI0
 acpi0
 nexus0
meena@websrv2-hel1 ~>


procstat kstack on rand_harvestq process looks like this:

    8 100097 rand_harvestq       -                   vtrnd_read random_kthr=
ead
fork_exit fork_trampoline=20

suggesting this is virtio_related

After adding

devmatch_blacklist=3D"virtio_random.ko"

to rc.conf, and rebooting, the CPU spinning issue goes away.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254513-227>