Bug 225506 - Reading from virtio-blk device hangs
Summary: Reading from virtio-blk device hangs
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-28 14:21 UTC by Serhii (Sergey) Kozlov
Modified: 2018-02-01 21:58 UTC (History)
1 user (show)

See Also:


Attachments
`sysctl -a` output (117.19 KB, text/plain)
2018-01-28 14:23 UTC, Serhii (Sergey) Kozlov
no flags Details
`ps -lux` output (4.67 KB, text/plain)
2018-01-28 14:24 UTC, Serhii (Sergey) Kozlov
no flags Details
`pciconf -lvc` output (3.09 KB, text/plain)
2018-01-28 14:24 UTC, Serhii (Sergey) Kozlov
no flags Details
`kenv` output (2.66 KB, text/plain)
2018-01-28 14:25 UTC, Serhii (Sergey) Kozlov
no flags Details
`gstat` output (1.05 KB, text/plain)
2018-01-28 14:26 UTC, Serhii (Sergey) Kozlov
no flags Details
`procstat -ak` output (13.47 KB, text/plain)
2018-01-29 21:00 UTC, Serhii (Sergey) Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:21:00 UTC
I'm using FreeBSD on KVM virtual machine from a hosting provider.

On both 11.1-RELEASE and 12.0-CURRENT (2018-01-18) reading /dev/vtbd0 device hangs. 
Using CentOS 6.9 I'm able to read full /dev/vda device without a hang.

- Command
  # dd if=/dev/vtbd0 of=/dev/null bs=1M
  will eventually hang.

- top shows dd in physrd state.
- gstat shows L(q) equal to 1 or 2 (depending on a try), all the IOPS and throughput indications are zero for /dev/vtbd0
- dd can't be terminated with SIGKILL
- the only way to terminate the dd process is
  # devctl disable vtbd0

Server configuration:
RAM: 512MB
CPU: 1x Intel Xeon E5-2620 v3 @ 2.40 GHz
Disk: 250GB virtio-blk
<Additional info will be attached in a separate files>

The info from the hosting provider:
We are running the latest QEMU version and the latest 3.1 branch kernel, which was released for fixing the Spectre and Meltdown vulnerabilities.

I'm still paying for the server, but I want to leave it in this state for now to help investigate the issue.
Comment 1 Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:23:11 UTC
Created attachment 190131 [details]
`sysctl -a` output

Collected running 12.0-CURRENT live CD
Comment 2 Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:24:11 UTC
Created attachment 190132 [details]
`ps -lux` output

Collected running 12.0-CURRENT live CD
Comment 3 Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:24:44 UTC
Created attachment 190133 [details]
`pciconf -lvc` output

Collected running 12.0-CURRENT live CD
Comment 4 Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:25:42 UTC
Created attachment 190134 [details]
`kenv` output

Collected running 12.0-CURRENT live CD
Comment 5 Serhii (Sergey) Kozlov freebsd_committer 2018-01-28 14:26:29 UTC
Created attachment 190135 [details]
`gstat` output

Collected running 12.0-CURRENT live CD
Comment 6 Bryan Venteicher freebsd_committer 2018-01-29 17:03:58 UTC
Can you please include the output of "procstat -k"? Thanks.
Comment 7 Serhii (Sergey) Kozlov freebsd_committer 2018-01-29 21:00:08 UTC
Created attachment 190173 [details]
`procstat -ak` output

Collected running 12.0-CURRENT live CD
Comment 8 Serhii (Sergey) Kozlov freebsd_committer 2018-02-01 21:58:36 UTC
`procstat -ak` output was collected in the hanged state. `dd` process in the one reading the virtio-blk device.