public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Ing. Alfonso Kuen Arroyo <gerencia@idkmanager.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: SPAM: qemu-img convert runs with cache=unsafe for every block storage except zfspool
Date: Wed, 16 Sep 2026 23:05:21 -0500	[thread overview]
Message-ID: <178961792132.43804.17173233935297903311@idkmanager.com> (raw)
In-Reply-To: <aee21f88-aa95-48db-aadc-4923c095e877@proxmox.com>

Hi Fiona,

thanks for trying it, and sorry for the slow reply. I re-ran it today on a
PVE 9.2.4 node (pve-qemu-kvm 11.0.2-1, kernel 7.0.14-4-pve) and got the
silent exit 0, so here is the exact recipe, with what I think is the
difference from your runs.

Recipe (loop device on a file, dm-flakey with a 1 s "up" window so the
device fails while the copy is still in flight):

  cd /var/tmp
  head -c 2G /dev/urandom > src.raw          # no zero regions
  truncate -s 2G dst.img
  LOOP=$(losetup --find --show dst.img); SZ=$(blockdev --getsz $LOOP)

  # reset before each run
  dd if=/dev/zero of=$LOOP bs=1M count=2048 conv=fsync status=none
  sync; echo 3 > /proc/sys/vm/drop_caches; dmesg -C
  dmsetup create flk --table "0 $SZ flakey $LOOP 0 1 60"   # 1 s up, 60 s down

  /usr/bin/qemu-img convert -f raw -O raw src.raw /dev/mapper/flk; echo rc=$?
  sleep 70                                   # let the down window and writeback pass
  dmesg | grep -c 'lost async page write'
  dmsetup remove flk
  cmp -l src.raw $LOOP | wc -l

Default cache mode:
  rc=0 (copy took 1.4 s)
  dmesg: "Buffer I/O error on dev dm-0, logical block N, lost async page write"
         (10 lines, then "buffer_io_error: 493941 callbacks suppressed")
  cmp:   2015325567 bytes differ from the source (about 1.9 of 2 GiB never
         made it to the device)

Same run with -t none:
  "qemu-img: error while writing at byte 1763704832: Input/output error"
  rc=1

(qemu-img is the unmodified pve-qemu-kvm binary; strace of that run shows the
target opened O_RDWR without O_DIRECT and a single fdatasync, from the initial
BLKZEROOUT. Our nodes also carry a local wrapper that forces -t none - that is
not what was measured, and the binary name in the -t none error was edited.)

Why I think your runs failed loudly instead: in both of them the device was
already failing at the moment qemu-img wrote to it - dm-error from the start,
and flakey "0 1 1" is down every other second, while mine stays down for 60 s
so the failure lands while the pages are still dirty (a 4 s-up run with a
512 MiB source lost nothing: writeback finished inside the window). With a
qcow2 source I would also expect the holes to go out as write_zeroes, which on
a block device is a synchronous BLKZEROOUT ioctl and fails loudly - but I have
not verified that with a qcow2 source, so treat it as a guess. What I did
verify is that the writes must be accepted into the page cache first and fail
at writeback time, and that the same failure is loud with -t none.

I'll file this on bugzilla.proxmox.com with the recipe and both outputs,
unless you'd prefer to open it on your side.

Best regards,
Alfonso



      reply	other threads:[~2026-09-18  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 22:22 qemu-img convert runs with cache=unsafe for every block storage except zfspool Ing. Alfonso Kuen Arroyo
2026-09-03 13:15 ` SPAM: " Fiona Ebner
2026-09-17  4:05   ` Ing. Alfonso Kuen Arroyo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178961792132.43804.17173233935297903311@idkmanager.com \
    --to=gerencia@idkmanager.com \
    --cc=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal