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

Attachment: bound.sh
Description: Bourne shell script

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to