Richard W.M. Jones
2022-Jul-18 13:55 UTC
[Libguestfs] nbdkit test-checkwrite.sh failing occasionally on ppc64le
No idea why this was only failing on ppc64le, since I've finally got a reproducer that works everywhere (see attached). $ ./bound.sh + rm -f /tmp/sock + sleep 1 + nbdkit --exit-with-parent -U /tmp/sock sh - --filter=checkwrite + nbdsh -u 'nbd+unix:///?socket=/tmp/sock' -c 'h.zero (655360, 262144, 0)' nbdkit: backend.c:624: backend_pread: Assertion `backend_valid_range (c, offset, count)' failed. nbdsh: command line script failed: nbd_zero: write-zeroes: command failed: Transport endpoint is not connected ./bound.sh: line 24: 2004832 Aborted (core dumped) nbdkit --exit-with-parent -U /tmp/sock sh - --filter=checkwrite <<'EOF' I'm not quite sure how to fix it yet, but it involves this code: https://gitlab.com/nbdkit/nbdkit/-/blob/33cdb16e65c59b5989ad967ec0cccb2ad249cc97/filters/checkwrite/checkwrite.c#L195-L197 When we get to the end of one extent, this loop sets buflen = 0 and calls next->pread (...count = 0) (which causes the assert fail), instead of moving to the next extent. I'll take a look when I'm back at work. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW -------------- next part -------------- A non-text attachment was scrubbed... Name: bound.sh Type: application/x-sh Size: 433 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20220718/48b83473/attachment.sh>
Richard W.M. Jones
2022-Jul-19 09:45 UTC
[Libguestfs] nbdkit test-checkwrite.sh failing occasionally on ppc64le
Fixed in: https://gitlab.com/nbdkit/nbdkit/-/commit/16a13fa9e1f3c4cbc0fae89e364f832e1a41fb40 https://gitlab.com/nbdkit/nbdkit/-/commit/2c9a557f2ebe5a8647cc44dbdd7c157356783306 https://gitlab.com/nbdkit/nbdkit/-/commit/aaf5484462cd06505b7a1a8103a899d3551c451b -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html