Public bug reported:
### Whats going on here?
## test-mic is a test of mount-image-callback in cloud-image-utils
##
## It populates some disk images and then uses mic to write some
## files (info.txt and data.txt)
## then calls mic again to verify the files are there.
##
## the failure i'm seeing is that one of the files written during
## the first mic is not present in the second.
##
## mic does:
## mount via qemu-nbd, run command, umount, qemu-nbd disconnect
##
this recreates at least 1 in 3 times in my local tests here.
$ uname -r
4.13.0-17-generic
$ dpkg-query --show qemu-utils
qemu-utils 1:2.10+dfsg-0ubuntu5
$ bzr branch lp:cloud-utils cloud-utils
$ cd cloud-utils
## the output below has some debug info added
$ sudo PATH=$PWD/bin:$PATH ./test/test-mic 2>&1 | tee out.log
testing partition 1 image
testing partition 2 image
testing --system-mounts on pt1
testing unexpected mount get unmounted.
writing hunks to disk image /tmp/test-mic.zGTR4a/disk-mbr.img
partitioning MBR disk image /tmp/test-mic.zGTR4a/disk-mbr.img
partitioning GPT disk image /tmp/test-mic.zGTR4a/disk-gpt.img
MBR: testing partition 1 in /tmp/test-mic.zGTR4a/disk-mbr.img
pid for /dev/nbd0 is 30004
connected /tmp/test-mic.zGTR4a/disk-mbr.img (raw) 1 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p1 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.0ikR3l/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.0ikR3l/mp sh -c echo 'foo1' >
data.txt
cmd returned 0. unmounting /tmp/mount-image-callback.0ikR3l/mp
disconnecting /dev/nbd0
pid for /dev/nbd0 is 30077
connected /tmp/test-mic.zGTR4a/disk-mbr.img (raw) 1 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p1 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.2wgbbV/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.2wgbbV/mp sh -c
r=0; for f in "$@"; do
cat $f || { echo "$f: cat failed rc=$?"; r=99; }; done;
exit $r sh-extract info.txt data.txt
cmd returned 0. unmounting /tmp/mount-image-callback.2wgbbV/mp
disconnecting /dev/nbd0
MBR: testing partition 2 in /tmp/test-mic.zGTR4a/disk-mbr.img
pid for /dev/nbd0 is 30153
connected /tmp/test-mic.zGTR4a/disk-mbr.img (raw) 2 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p2 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.9PowSH/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.9PowSH/mp sh -c echo 'foo2' >
data.txt
cmd returned 0. unmounting /tmp/mount-image-callback.9PowSH/mp
disconnecting /dev/nbd0
pid for /dev/nbd0 is 30222
connected /tmp/test-mic.zGTR4a/disk-mbr.img (raw) 2 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p2 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.Az1hhv/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.Az1hhv/mp sh -c
r=0; for f in "$@"; do
cat $f || { echo "$f: cat failed rc=$?"; r=99; }; done;
exit $r sh-extract info.txt data.txt
cat: data.txt: No such file or directory
cmd returned 99. unmounting /tmp/mount-image-callback.Az1hhv/mp
disconnecting /dev/nbd0
MBR:
== expected on 2 ==
partition 2
foo2
== found on 2 ==
partition 2
data.txt: cat failed rc=1
MBR: failed testing partition 2 on /tmp/test-mic.zGTR4a/disk-mbr.img
smoser@milhouse:~/src/cloud-utils/trunk$ sudo PATH=$PWD/bin:$PATH
./test/test-mic 2>&1 | tee out.log
testing partition 1 image
testing partition 2 image
testing --system-mounts on pt1
testing unexpected mount get unmounted.
writing hunks to disk image /tmp/test-mic.SCaQUe/disk-mbr.img
partitioning MBR disk image /tmp/test-mic.SCaQUe/disk-mbr.img
partitioning GPT disk image /tmp/test-mic.SCaQUe/disk-gpt.img
MBR: testing partition 1 in /tmp/test-mic.SCaQUe/disk-mbr.img
pid for /dev/nbd0 is 30674
connected /tmp/test-mic.SCaQUe/disk-mbr.img (raw) 1 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p1 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.0bIcqZ/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.0bIcqZ/mp sh -c echo 'foo1' >
data.txt
cmd returned 0. unmounting /tmp/mount-image-callback.0bIcqZ/mp
disconnecting /dev/nbd0
waiting on pidfile for /dev/nbd0 in /sys/block/nbd0/pid
.
pid for /dev/nbd0 is 30757
connected /tmp/test-mic.SCaQUe/disk-mbr.img (raw) 1 to /dev/nbd0. waiting for
device.
mounted /dev/nbd0p1 via qemu-nbd /dev/nbd0 at
/tmp/mount-image-callback.ZNIbzM/mp
invoking: MOUNTPOINT=/tmp/mount-image-callback.ZNIbzM/mp sh -c
r=0; for f in "$@"; do
cat $f || { echo "$f: cat failed rc=$?"; r=99; }; done;
exit $r sh-extract info.txt data.txt
cat: data.txt: No such file or directory
cmd returned 99. unmounting /tmp/mount-image-callback.ZNIbzM/mp
disconnecting /dev/nbd0
MBR:
== expected on 1 ==
partition 1
foo1
== found on 1 ==
partition 1
data.txt: cat failed rc=1
MBR: failed testing partition 1 on /tmp/test-mic.SCaQUe/disk-mbr.img
### new data in dmesg during run
[1300609.359437] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300609.506371] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300609.619183] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300609.752534] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300609.889312] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300610.022198] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300610.225399] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300610.374885] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300610.634821] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300610.830573] EXT4-fs (loop3): mounted filesystem with ordered data mode.
Opts: (null)
[1300612.701430] nbd0: p1 p2
[1300612.713894] EXT4-fs (nbd0p1): mounted filesystem with ordered data mode.
Opts: (null)
[1300612.798977] block nbd0: NBD_DISCONNECT
[1300612.799003] block nbd0: shutting down sockets
[1300612.800582] print_req_error: 22 callbacks suppressed
[1300612.800584] print_req_error: I/O error, dev nbd0, sector 18954
[1300612.800590] EXT4-fs warning (device nbd0p1): ext4_end_bio:322: I/O error
10 writing to inode 15 (offset 0 size 0 starting block 9478)
[1300612.800592] Buffer I/O error on device nbd0p1, logical block 8453
[1300612.800614] print_req_error: I/O error, dev nbd0, sector 100354
[1300612.800616] buffer_io_error: 17 callbacks suppressed
[1300612.800617] Buffer I/O error on dev nbd0p1, logical block 49153, lost sync
page write
[1300612.800622] JBD2: Error -5 detected when updating journal superblock for
nbd0p1-8.
[1300612.800623] Aborting journal on device nbd0p1-8.
[1300612.800630] print_req_error: I/O error, dev nbd0, sector 100354
[1300612.800632] Buffer I/O error on dev nbd0p1, logical block 49153, lost sync
page write
[1300612.800636] JBD2: Error -5 detected when updating journal superblock for
nbd0p1-8.
[1300612.800643] JBD2: Detected IO errors while flushing file data on nbd0p1-8
[1300612.800664] print_req_error: I/O error, dev nbd0, sector 0
[1300612.800693] print_req_error: I/O error, dev nbd0, sector 0
[1300612.800708] print_req_error: I/O error, dev nbd0, sector 0
[1300612.800723] print_req_error: I/O error, dev nbd0, sector 0
[1300612.800815] print_req_error: I/O error, dev nbd0, sector 2050
[1300612.800817] Buffer I/O error on dev nbd0p1, logical block 1, lost sync
page write
[1300612.837164] nbd0: p1 p2
[1300612.953403] EXT4-fs (nbd0p1): INFO: recovery required on readonly
filesystem
[1300612.953405] EXT4-fs (nbd0p1): write access will be enabled during recovery
[1300612.953745] EXT4-fs (nbd0p1): recovery complete
[1300612.954785] EXT4-fs (nbd0p1): mounted filesystem with ordered data mode.
Opts: (null)
[1300613.011345] block nbd0: NBD_DISCONNECT
[1300613.011378] block nbd0: shutting down sockets
[1300613.015916] nbd0: detected capacity change from 0 to 316669952
[1300613.016004] print_req_error: I/O error, dev nbd0, sector 0
[1300613.016010] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016027] print_req_error: I/O error, dev nbd0, sector 0
[1300613.016030] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016039] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016044] ldm_validate_partition_table(): Disk read failed.
[1300613.016050] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016058] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016066] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016074] Buffer I/O error on dev nbd0, logical block 0, async page read
[1300613.016078] Dev nbd0: unable to read RDB block 0
[1300613.016136] nbd0: unable to read partition table
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-utils 0.30-0ubuntu2
ProcVersionSignature: Ubuntu 4.13.0-17.20-generic 4.13.8
Uname: Linux 4.13.0-17-generic x86_64
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
ApportVersion: 2.20.8-0ubuntu5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Jan 3 11:47:00 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (895 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-utils
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: cloud-utils (Ubuntu)
Importance: Medium
Status: Confirmed
** Tags: amd64 apport-bug bionic wayland-session
** Changed in: cloud-utils (Ubuntu)
Status: New => Confirmed
** Changed in: cloud-utils (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741096
Title:
test-mic can fail / writes to qemu-nbd device do not persist
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741096/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs