Re: [Libguestfs] [libguestfs/libguestfs] guestfs_copy_in fails with error: copy_in: tar subprocess failed: tar: .: file changed as we read it: errno 0 (Issue #75)
by Richard W.M. Jones
On Wed, Jan 26, 2022 at 09:31:14PM -0800, anemade wrote:
> I am using libguestfs Golang binding APIs(version 1.44)
> Followed this document https://libguestfs.org/guestfs-golang.3.html to create
> the disk, add the disk, format the partition, launch the appliance and
> performing some copy_in and copy_out operations.
>
> While doing copy_in, I am seeing this strange issue
>
> error: copy_in: tar subprocess failed: tar: .: file changed as we read it:
> errno 0
>
> This issue is not all time reproducible. It comes like 1 out of 10
> runs. In my case, data is stable while doing copy_in. There is
> absolutely no change in the data while guestfs_copy_in operation
> going on. Any leads to issue or anything that I need to understand
> for copy_in or copy_out?
Can you share exactly how you are using copy_in? A small
reproducer would be good.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
2 years, 7 months
Accessing qcow2 images on GlusterFS
by Seyed Mohammad Fakhraie
Hello folks,
I've set up a distributed storage volume with GlusterFS (version 5.5)
to store my VM images. My host operating system is Debian 10; I'm
using guestfish 1.40.2 via CLI. It was installed via apt. I can't
access or run any guestfs utilities on images which are stored on
GlusterFS (I'm using FUSE; I only try to access the images with
guestfs when a VM is turned off).
This is a sample command that I'm trying to execute:
guestfish --rw -a
gluster://storage-node0/gv0/vm/ff9cdab3-8f3e-4f53-a907-e5c8e57588a4.img
-i command "bash -c \"echo root:fish123 | chpasswd\""
Which gives an error about "the appliance closing the connection
unexpectedly" and points to the output of 'libguestfs-test-tool' for
further debugging.
I will post the complete output of 'libguestfs-test-tool' below:
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
PATH=/home/deployer/.asdf/shims:/home/deployer/.asdf/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
XDG_RUNTIME_DIR=/run/user/1000
SELinux: sh: 1: getenforce: not found
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-system-x86_64
guestfs_get_memsize: 768
guestfs_get_network: 0
guestfs_get_path: /usr/lib/x86_64-linux-gnu/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.40.2
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfs2AeYlA
libguestfs: launch: umask=0022
libguestfs: launch: euid=1000
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.20
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: checking for previously cached test results of
/usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-1000
libguestfs: loading previously cached test results
libguestfs: qemu version: 3.1
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: finished testing qemu features
/usr/bin/qemu-system-x86_64 \
-global virtio-blk-pci.scsi=off \
-no-user-config \
-enable-fips \
-nodefaults \
-display none \
-machine accel=kvm:tcg \
-cpu host \
-m 768 \
-no-reboot \
-rtc driftfix=slew \
-no-hpet \
-global kvm-pit.lost_tick_policy=discard \
-kernel /var/tmp/.guestfs-1000/appliance.d/kernel \
-initrd /var/tmp/.guestfs-1000/appliance.d/initrd \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0 \
-device virtio-scsi-pci,id=scsi \
-drive file=/tmp/libguestfs2AeYlA/scratch1.img,cache=unsafe,format=raw,id=hd0,if=none
\
-device scsi-hd,drive=hd0 \
-drive file=/var/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw
\
-device scsi-hd,drive=appliance \
-device virtio-serial-pci \
-serial stdio \
-device sga \
-chardev socket,path=/run/user/1000/libguestfsRSg91A/guestfsd.sock,id=channel0
\
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-append "panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color"
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 03/05/17
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $
(generic@generic) Sun, 05 Mar 2017 16:09:17 +0100
Term: 80x24
4 0
SeaBIOS (version 1.12.0-1)
Booting from ROM...
\x1b[2J[ 0.000000] Linux version 4.19.0-18-amd64
(debian-kernel(a)lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6))
#1 SMP Debian 4.19.208-1 (2021-09-29)
[ 0.000000] Command line: panic=1 console=ttyS0 edd=off
udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating
point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is
832 bytes, using 'standard' format
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000002ffddfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000002ffde000-0x000000002fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.12.0-1 04/01/2014
[ 0.000000] Hypervisor detected: KVM
[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000000] kvm-clock: cpu 0, msr 229ec001, primary cpu clock
[ 0.000000] kvm-clock: using sched offset of 1267830924 cycles
[ 0.000005] clocksource: kvm-clock: mask: 0xffffffffffffffff
max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000011] tsc: Detected 3300.022 MHz processor
[ 0.000579] last_pfn = 0x2ffde max_arch_pfn = 0x400000000
[ 0.000645] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.008850] found SMP MP-table at [mem 0x000f5a90-0x000f5a9f]
[ 0.009121] RAMDISK: [mem 0x2fba5000-0x2ffcffff]
[ 0.009178] ACPI: Early table checksum verification disabled
[ 0.009238] ACPI: RSDP 0x00000000000F58C0 000014 (v00 BOCHS )
[ 0.009243] ACPI: RSDT 0x000000002FFE1510 00002C (v01 BOCHS
BXPCRSDT 00000001 BXPC 00000001)
[ 0.009254] ACPI: FACP 0x000000002FFE1424 000074 (v01 BOCHS
BXPCFACP 00000001 BXPC 00000001)
[ 0.009261] ACPI: DSDT 0x000000002FFE0040 0013E4 (v01 BOCHS
BXPCDSDT 00000001 BXPC 00000001)
[ 0.009264] ACPI: FACS 0x000000002FFE0000 000040
[ 0.009267] ACPI: APIC 0x000000002FFE1498 000078 (v01 BOCHS
BXPCAPIC 00000001 BXPC 00000001)
[ 0.009270] ACPI: Reserving FACP table memory at [mem 0x2ffe1424-0x2ffe1497]
[ 0.009271] ACPI: Reserving DSDT table memory at [mem 0x2ffe0040-0x2ffe1423]
[ 0.009272] ACPI: Reserving FACS table memory at [mem 0x2ffe0000-0x2ffe003f]
[ 0.009272] ACPI: Reserving APIC table memory at [mem 0x2ffe1498-0x2ffe150f]
[ 0.009577] No NUMA configuration found
[ 0.009578] Faking a node at [mem 0x0000000000000000-0x000000002ffddfff]
[ 0.009583] NODE_DATA(0) allocated [mem 0x2ffd9000-0x2ffddfff]
[ 0.009738] Zone ranges:
[ 0.009740] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.009741] DMA32 [mem 0x0000000001000000-0x000000002ffddfff]
[ 0.009742] Normal empty
[ 0.009743] Device empty
[ 0.009743] Movable zone start for each node
[ 0.009744] Early memory node ranges
[ 0.009745] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.009746] node 0: [mem 0x0000000000100000-0x000000002ffddfff]
[ 0.009962] Zeroed struct page in unavailable ranges: 132 pages
[ 0.009963] Initmem setup node 0 [mem 0x0000000000001000-0x000000002ffddfff]
[ 0.014281] ACPI: PM-Timer IO Port: 0x608
[ 0.014302] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.014340] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.014343] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.014346] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.014347] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.014350] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.014350] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.014355] Using ACPI (MADT) for SMP configuration information
[ 0.014360] TSC deadline timer available
[ 0.014365] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.014391] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.014392] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.014393] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.014394] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.014395] [mem 0x30000000-0xfeffbfff] available for PCI devices
[ 0.014396] Booting paravirtualized kernel on KVM
[ 0.014401] clocksource: refined-jiffies: mask: 0xffffffff
max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.094592] random: get_random_bytes called from
start_kernel+0x93/0x52a with crng_init=0
[ 0.094602] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512
nr_cpu_ids:1 nr_node_ids:1
[ 0.094825] percpu: Embedded 45 pages/cpu s144536 r8192 d31592 u2097152
[ 0.094853] KVM setup async PF for cpu 0
[ 0.094857] kvm-stealtime: cpu 0, msr 2ea161c0
[ 0.094867] Built 1 zonelists, mobility grouping on. Total pages: 193383
[ 0.094868] Policy zone: DMA32
[ 0.094870] Kernel command line: panic=1 console=ttyS0 edd=off
udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
[ 0.094996] cgroup: Disabling memory control group subsystem
[ 0.096991] Memory: 744004K/785904K available (10252K kernel code,
1242K rwdata, 3332K rodata, 1596K init, 2260K bss, 41900K reserved, 0K
cma-reserved)
[ 0.097236] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.097241] Kernel/User page tables isolation: enabled
[ 0.097278] ftrace: allocating 32002 entries in 126 pages
[ 0.108525] rcu: Hierarchical RCU implementation.
[ 0.108527] rcu: \tRCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=1.
[ 0.108528] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.110689] NR_IRQS: 33024, nr_irqs: 256, preallocated irqs: 16
[ 0.110913] Console: colour *CGA 80x25
[ 0.177588] console [ttyS0] enabled
[ 0.178006] ACPI: Core revision 20180810
[ 0.178517] APIC: Switch to symmetric I/O mode setup
[ 0.179370] x2apic enabled
[ 0.179921] Switched APIC routing to physical x2apic.
[ 0.180531] KVM setup pv IPIs
[ 0.181989] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.182682] clocksource: tsc-early: mask: 0xffffffffffffffff
max_cycles: 0x2f91614f8ec, max_idle_ns: 440795344305 ns
[ 0.183845] Calibrating delay loop (skipped) preset value.. 6600.04
BogoMIPS (lpj=13200088)
[ 0.184812] pid_max: default: 32768 minimum: 301
[ 0.185362] Security Framework initialized
[ 0.185805] Yama: disabled by default; enable with sysctl kernel.yama.*
[ 0.187854] AppArmor: AppArmor initialized
[ 0.188515] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.189318] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.190055] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.190803] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.191735] x86/cpu: Activated the Intel User Mode Instruction
Prevention (UMIP) CPU feature
[ 0.191870] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.192436] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.193060] Spectre V1 : Mitigation: usercopy/swapgs barriers and
__user pointer sanitization
[ 0.194000] Spectre V2 : Mitigation: Full generic retpoline
[ 0.194586] Spectre V2 : Spectre v2 / SpectreRSB mitigation:
Filling RSB on context switch
[ 0.195834] Speculative Store Bypass: Vulnerable
[ 0.196361] SRBDS: Unknown: Dependent on hypervisor status
[ 0.196940] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[ 0.205744] Freeing SMP alternatives memory: 24K
[ 0.207622] smpboot: CPU0: Intel(R) Xeon(R) CPU E3-1230 V2 @
3.30GHz (family: 0x6, model: 0x3a, stepping: 0x9)
[ 0.207832] Performance Events: IvyBridge events, Intel PMU driver.
[ 0.207832] ... version: 2
[ 0.207832] ... bit width: 48
[ 0.207832] ... generic registers: 4
[ 0.207832] ... value mask: 0000ffffffffffff
[ 0.207832] ... max period: 000000007fffffff
[ 0.207836] ... fixed-purpose events: 3
[ 0.208282] ... event mask: 000000070000000f
[ 0.208879] rcu: Hierarchical SRCU implementation.
[ 0.209661] random: crng done (trusting CPU's manufacturer)
[ 0.210387] smp: Bringing up secondary CPUs ...
[ 0.210896] smp: Brought up 1 node, 1 CPU
[ 0.211326] smpboot: Max logical packages: 1
[ 0.211777] smpboot: Total of 1 processors activated (6600.04 BogoMIPS)
[ 0.211956] devtmpfs: initialized
[ 0.212354] x86/mm: Memory block size: 128MB
[ 0.213015] clocksource: jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.214193] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.214932] pinctrl core: initialized pinctrl subsystem
[ 0.215594] NET: Registered protocol family 16
[ 0.215909] audit: initializing netlink subsys (disabled)
[ 0.216562] cpuidle: using governor ladder
[ 0.217006] cpuidle: using governor menu
[ 0.217524] KVM setup pv remote TLB flush
[ 0.217983] ACPI: bus type PCI registered
[ 0.218412] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.219184] PCI: Using configuration type 1 for base access
[ 0.219824] audit: type=2000 audit(1643999157.829:1):
state=initialized audit_enabled=0 res=1
[ 0.219844] core: PMU erratum BJ122, BV98, HSD29 workaround disabled, HT off
[ 0.221157] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.222159] ACPI: Added _OSI(Module Device)
[ 0.222630] ACPI: Added _OSI(Processor Device)
[ 0.223109] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.223622] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.223842] ACPI: Added _OSI(Linux-Dell-Video)
[ 0.224397] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 0.225357] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 0.226794] ACPI: Interpreter enabled
[ 0.227222] ACPI: (supports S0 S3 S4 S5)
[ 0.227652] ACPI: Using IOAPIC for interrupt routing
[ 0.227853] PCI: Using host bridge windows from ACPI; if necessary,
use "pci=nocrs" and report a bug
[ 0.228932] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.230912] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.231848] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.232619] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.233354] acpi PNP0A03:00: fail to add MMCONFIG information,
can't access extended PCI configuration space under this bridge.
[ 0.234805] acpiphp: Slot [2] registered
[ 0.235277] acpiphp: Slot [3] registered
[ 0.235769] acpiphp: Slot [4] registered
[ 0.235869] acpiphp: Slot [5] registered
[ 0.236348] acpiphp: Slot [6] registered
[ 0.236813] acpiphp: Slot [7] registered
[ 0.237272] acpiphp: Slot [8] registered
[ 0.237732] acpiphp: Slot [9] registered
[ 0.238197] acpiphp: Slot [10] registered
[ 0.238665] acpiphp: Slot [11] registered
[ 0.239128] acpiphp: Slot [12] registered
[ 0.239645] acpiphp: Slot [13] registered
[ 0.239865] acpiphp: Slot [14] registered
[ 0.240324] acpiphp: Slot [15] registered
[ 0.240781] acpiphp: Slot [16] registered
[ 0.241239] acpiphp: Slot [17] registered
[ 0.241693] acpiphp: Slot [18] registered
[ 0.242203] acpiphp: Slot [19] registered
[ 0.242659] acpiphp: Slot [20] registered
[ 0.243153] acpiphp: Slot [21] registered
[ 0.243636] acpiphp: Slot [22] registered
[ 0.243865] acpiphp: Slot [23] registered
[ 0.244318] acpiphp: Slot [24] registered
[ 0.244771] acpiphp: Slot [25] registered
[ 0.245245] acpiphp: Slot [26] registered
[ 0.245701] acpiphp: Slot [27] registered
[ 0.246161] acpiphp: Slot [28] registered
[ 0.246630] acpiphp: Slot [29] registered
[ 0.247184] acpiphp: Slot [30] registered
[ 0.247664] acpiphp: Slot [31] registered
[ 0.247847] PCI host bridge to bus 0000:00
[ 0.248297] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.249023] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.249752] pci_bus 0000:00: root bus resource [mem
0x000a0000-0x000bffff window]
[ 0.250592] pci_bus 0000:00: root bus resource [mem
0x30000000-0xfebfffff window]
[ 0.251443] pci_bus 0000:00: root bus resource [mem
0x100000000-0x17fffffff window]
[ 0.251837] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.255861] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.256642] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.257334] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.258119] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.259348] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by
PIIX4 ACPI
[ 0.259846] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.277494] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.278189] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.278860] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.279531] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.279887] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.280699] vgaarb: loaded
[ 0.281038] pps_core: LinuxPPS API ver. 1 registered
[ 0.281578] pps_core: Software ver. 5.3.6 - Copyright 2005-2007
Rodolfo Giometti <giometti(a)linux.it>
[ 0.282570] PTP clock support registered
[ 0.283004] EDAC MC: Ver: 3.0.0
[ 0.283538] PCI: Using ACPI for IRQ routing
[ 0.284090] clocksource: Switched to clocksource kvm-clock
[ 0.291172] VFS: Disk quotas dquot_6.6.0
[ 0.291663] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.292521] AppArmor: AppArmor Filesystem Enabled
[ 0.293046] pnp: PnP ACPI init
[ 0.293689] pnp: PnP ACPI: found 5 devices
[ 0.299516] clocksource: acpi_pm: mask: 0xffffff max_cycles:
0xffffff, max_idle_ns: 2085701024 ns
[ 0.300550] NET: Registered protocol family 2
[ 0.301049] IP idents hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.301917] tcp_listen_portaddr_hash hash table entries: 512
(order: 1, 8192 bytes)
[ 0.302728] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.303473] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.304221] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.304923] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.305555] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.306252] NET: Registered protocol family 1
[ 0.306727] NET: Registered protocol family 44
[ 0.307216] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.307824] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.308581] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.309325] Unpacking initramfs...
[ 0.312361] Freeing initrd memory: 4268K
[ 0.312904] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x2f91614f8ec, max_idle_ns: 440795344305 ns
[ 0.314500] Initialise system trusted keyrings
[ 0.315011] Key type blacklist registered
[ 0.315576] workingset: timestamp_bits=40 max_order=18 bucket_order=0
[ 0.317162] zbud: loaded
[ 0.317698] alg: self-tests disabled
[ 0.318293] Key type asymmetric registered
[ 0.318751] Asymmetric key parser 'x509' registered
[ 0.319291] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 247)
[ 0.320172] io scheduler noop registered
[ 0.320614] io scheduler deadline registered
[ 0.321102] io scheduler cfq registered (default)
[ 0.321612] io scheduler mq-deadline registered
[ 0.322161] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 0.322976] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.346144] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200)
is a 16550A
[ 0.347059] Linux agpgart interface v0.103
[ 0.347578] AMD IOMMUv2 driver by Joerg Roedel <jroedel(a)suse.de>
[ 0.348272] AMD IOMMUv2 functionality not available on this system
[ 0.349039] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU]
at 0x60,0x64 irq 1,12
[ 0.350540] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 0.351089] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 0.351819] mousedev: PS/2 mouse device common for all mice
[ 0.352690] input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input0
[ 0.353836] rtc_cmos 00:00: RTC can wake from S4
[ 0.354662] rtc_cmos 00:00: registered as rtc0
[ 0.355168] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram
[ 0.355960] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.356851] NET: Registered protocol family 10
[ 0.357681] Segment Routing with IPv6
[ 0.358091] mip6: Mobile IPv6
[ 0.358436] NET: Registered protocol family 17
[ 0.358948] mpls_gso: MPLS GSO support
[ 0.359437] mce: Using 10 MCE banks
[ 0.359851] sched_clock: Marking stable (290832521,
69005728)->(368947817, -9109568)
[ 0.360904] registered taskstats version 1
[ 0.361362] Loading compiled-in X.509 certificates
[ 0.362107] Loaded X.509 cert 'Debian Secure Boot CA:
6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[ 0.363064] Loaded X.509 cert 'Debian Secure Boot Signer 2021 -
linux: 4b6ef5abca669825178e052c84667ccbc0531f8c'
[ 0.364338] zswap: loaded using pool lzo/zbud
[ 0.364935] AppArmor: AppArmor sha1 policy hashing enabled
[ 0.365800] rtc_cmos 00:00: setting system clock to 2022-02-04
18:25:57 UTC (1643999157)
[ 0.367936] Freeing unused kernel image memory: 1596K
[ 0.375882] Write protecting the kernel read-only data: 16384k
[ 0.377483] Freeing unused kernel image memory: 2028K
[ 0.378181] Freeing unused kernel image memory: 764K
[ 0.385215] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 0.386018] x86/mm: Checking user space page tables
[ 0.393236] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 0.394051] Run /init as init process
supermin: mounting /proc
supermin: ext2 mini initrd starting up: 5.1.20
supermin: cmdline: panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
supermin: uptime: 0.32 0.03
supermin: mounting /sys
supermin: internal insmod crc32-pclmul.ko
supermin: internal insmod crc32c-intel.ko
supermin: internal insmod crct10dif-pclmul.ko
supermin: internal insmod crc32_generic.ko
supermin: internal insmod crc32c_generic.ko
supermin: internal insmod libnvdimm.ko
supermin: internal insmod nfit.ko
supermin: internal insmod scsi_mod.ko
[ 0.418871] SCSI subsystem initialized
supermin: internal insmod libata.ko
supermin: internal insmod ata_piix.ko
[ 0.429842] scsi host0: ata_piix
[ 0.430302] scsi host1: ata_piix
[ 0.430733] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0a0 irq 14
[ 0.431530] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0a8 irq 15
supermin: internal insmod virtio.ko
supermin: internal insmod virtio_ring.ko
supermin: internal insmod virtio_blk.ko
supermin: internal insmod rng-core.ko
supermin: internal insmod virtio-rng.ko
supermin: internal insmod virtio_console.ko
supermin: internal insmod crypto_engine.ko
supermin: internal insmod virtio_crypto.ko
supermin: internal insmod failover.ko
supermin: internal insmod net_failover.ko
supermin: internal insmod virtio_net.ko
supermin: internal insmod nd_btt.ko
supermin: internal insmod nd_pmem.ko
supermin: internal insmod sd_mod.ko
supermin: internal insmod virtio_scsi.ko
supermin: internal insmod virtio_balloon.ko
supermin: internal insmod virtio_input.ko
supermin: internal insmod virtio_mmio.ko
supermin: internal insmod virtio_pci.ko
[ 0.632957] PCI Interrupt Link [LNKB] enabled at IRQ 10
[ 0.646714] PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 0.649024] scsi host2: Virtio SCSI HBA
[ 0.650178] scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK
2.5+ PQ: 0 ANSI: 5
[ 0.656159] scsi 2:0:1:0: Direct-Access QEMU QEMU HARDDISK
2.5+ PQ: 0 ANSI: 5
[ 0.672264] PCI Interrupt Link [LNKD] enabled at IRQ 11
[ 0.732980] sd 2:0:0:0: Power-on or device reset occurred
[ 0.733965] sd 2:0:0:0: [sda] 204800 512-byte logical blocks: (105
MB/100 MiB)
[ 0.734924] sd 2:0:0:0: [sda] Write Protect is off
[ 0.735548] sd 2:0:1:0: Power-on or device reset occurred
[ 0.736390] sd 2:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 0.737749] sd 2:0:1:0: [sdb] 8388608 512-byte logical blocks:
(4.29 GB/4.00 GiB)
[ 0.738695] sd 2:0:1:0: [sdb] Write Protect is off
[ 0.739391] sd 2:0:1:0: [sdb] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 0.741579] sd 2:0:0:0: [sda] Attached SCSI disk
[ 0.742820] sd 2:0:1:0: [sdb] Attached SCSI disk
supermin: internal insmod fscrypto.ko
supermin: internal insmod jbd2.ko
supermin: internal insmod mbcache.ko
supermin: internal insmod crc16.ko
supermin: internal insmod ext4.ko
supermin: internal insmod crc-ccitt.ko
supermin: internal insmod crc-itu-t.ko
supermin: internal insmod crc64.ko
supermin: internal insmod crc7.ko
supermin: internal insmod crc8.ko
supermin: internal insmod libcrc32c.ko
supermin: picked /sys/block/sdb/dev (8:16) as root device
supermin: creating /dev/root as block special 8:16
supermin: mounting new root on /root
[ 0.782481] EXT4-fs (sdb): mounting ext2 file system using the ext4 subsystem
[ 0.785541] EXT4-fs (sdb): mounted filesystem without journal. Opts:
supermin: deleting initramfs files
supermin: chroot
Starting /init script ...
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color == *guestfs_network=1* ]]
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color == *guestfs_rescue=1* ]]
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color == *guestfs_noreboot=1* ]]
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color == *guestfs_boot_analysis=1* ]]
+ '[' '!' -d /sys ']'
+ mkdir -p /sys
+ mount -t sysfs /sys /sys
+ mkdir -p /run
+ mount -t tmpfs -o nosuid,size=20%,mode=0755 tmpfs /run
+ mkdir -p /run/lock
+ ln -s ../run/lock /var/lock
+ test -e /etc/mtab
+ ln -s /proc/mounts /etc/mtab
+ mount -t devtmpfs /dev /dev
+ mkdir -p /dev/pts
+ mount -t devpts /dev/pts /dev/pts
+ mkdir -p /dev/shm
+ mount -t tmpfs -o mode=1777 shmfs /dev/shm
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000
udev.event-timeout=6000 no_timer_check printk.time=1
cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable
8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color == *selinux=1* ]]
+ mkdir -p /run/tmpfiles.d
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
++ od -x -A n
++ dd if=/dev/urandom bs=16 count=1 status=none
+ machine_id=' 6698 92c9 8f3f 0816 bc85 d8b9 5c2a 1461'
+ echo 669892c98f3f0816bc85d8b95c2a1461
+ systemd-tmpfiles --prefix=/dev --prefix=/run --prefix=/var/run --create --boot
[/usr/lib/tmpfiles.d/systemd.conf:11] Unknown group 'utmp'.
[/usr/lib/tmpfiles.d/systemd.conf:19] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:20] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:21] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:25] Unknown group 'systemd-journal'.
[/usr/lib/tmpfiles.d/systemd.conf:26] Unknown group 'systemd-journal'.
Failed to parse ACL "d:group:adm:r-x": No such file or directory. Ignoring
Failed to parse ACL "group:adm:r-x": No such file or directory. Ignoring
Failed to parse ACL "group:adm:r--": No such file or directory. Ignoring
Failed to parse ACL "d:group::r-x,d:group:adm:r-x": No such file or
directory. Ignoring
Failed to parse ACL "group::r-x,group:adm:r-x": No such file or
directory. Ignoring
Failed to parse ACL "d:group:adm:r-x": No such file or directory. Ignoring
Failed to parse ACL "group:adm:r-x": No such file or directory. Ignoring
Failed to parse ACL "group:adm:r--": No such file or directory. Ignoring
+ for f in /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd
/sbin/udevd /lib/udev/udevd /usr/lib/udev/udevd
+ '[' -x /lib/systemd/systemd-udevd ']'
+ UDEVD=/lib/systemd/systemd-udevd
+ break
+ '[' -z /lib/systemd/systemd-udevd ']'
+ /lib/systemd/systemd-udevd --daemon
Starting version 241
+ udevadm trigger
+ udevadm settle --timeout=600
[ 0.938668] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 0.939345] sd 2:0:1:0: Attached scsi generic sg1 type 0
+ shopt -s nullglob
+ for f in /sys/block/sd*/device/timeout
+ echo 300
+ for f in /sys/block/sd*/device/timeout
+ echo 300
+ for f in /sys/block/{h,s,ub,v}d*/queue/scheduler
+ echo noop
/init: line 116: echo: write error: Invalid argument
+ for f in /sys/block/{h,s,ub,v}d*/queue/scheduler
+ echo noop
/init: line 116: echo: write error: Invalid argument
+ shopt -u nullglob
+ ip addr add 127.0.0.1/8 brd + dev lo scope host
+ ip link set dev lo up
+ test '' = 1
+ mdadm -As --auto=yes --no-degraded
mdadm: No arrays found in config file or automatically
+ mkdir -p /tmp/lvm
+ touch /tmp/lvm/lvm.conf
+ LVM_SYSTEM_DIR=/tmp/lvm
+ export LVM_SYSTEM_DIR
+ lvmetad
/init: line 142: lvmetad: command not found
+ modprobe dm_mod
[ 1.742936] device-mapper: uevent: version 1.0.3
[ 1.744093] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03)
initialised: dm-devel(a)redhat.com
+ lvm pvscan --cache --activate ay
+ mdadm -As --auto=yes --run
mdadm: No arrays found in config file or automatically
+ ldmtool create all
[
]
+ test 1 = 1
+ test '' '!=' 1
+ uname -a
Linux (none) 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29)
x86_64 GNU/Linux
+ ls -lR /dev
/dev:
total 0
crw------- 1 0 0 10, 235 Feb 4 18:25 autofs
drwxr-xr-x 2 0 0 80 Feb 4 18:25 block
drwxr-xr-x 2 0 0 80 Feb 4 18:25 bsg
crw------- 1 0 0 10, 234 Feb 4 18:25 btrfs-control
drwxr-xr-x 2 0 0 2020 Feb 4 18:25 char
crw------- 1 0 0 5, 1 Feb 4 18:25 console
lrwxrwxrwx 1 0 0 11 Feb 4 18:25 core -> /proc/kcore
crw------- 1 0 0 10, 62 Feb 4 18:25 cpu_dma_latency
crw------- 1 0 0 10, 203 Feb 4 18:25 cuse
drwxr-xr-x 5 0 0 100 Feb 4 18:25 disk
lrwxrwxrwx 1 0 0 13 Feb 4 18:25 fd -> /proc/self/fd
crw-rw-rw- 1 0 0 1, 7 Feb 4 18:25 full
crw-rw-rw- 1 0 0 10, 229 Feb 4 18:25 fuse
crw------- 1 0 0 10, 228 Feb 4 18:25 hpet
crw------- 1 0 0 10, 183 Feb 4 18:25 hwrng
drwxr-xr-x 2 0 0 60 Feb 4 18:25 input
crw-r--r-- 1 0 0 1, 11 Feb 4 18:25 kmsg
crw------- 1 0 0 10, 237 Feb 4 18:25 loop-control
drwxr-xr-x 2 0 0 60 Feb 4 18:25 mapper
crw------- 1 0 0 1, 1 Feb 4 18:25 mem
crw------- 1 0 0 10, 59 Feb 4 18:25 memory_bandwidth
drwxr-xr-x 2 0 0 60 Feb 4 18:25 net
crw------- 1 0 0 10, 61 Feb 4 18:25 network_latency
crw------- 1 0 0 10, 60 Feb 4 18:25 network_throughput
crw-rw-rw- 1 0 0 1, 3 Feb 4 18:25 null
crw------- 1 0 0 1, 4 Feb 4 18:25 port
crw------- 1 0 0 108, 0 Feb 4 18:25 ppp
crw------- 1 0 0 10, 1 Feb 4 18:25 psaux
crw-rw-rw- 1 0 0 5, 2 Feb 4 18:25 ptmx
drwxr-xr-x 2 0 0 0 Feb 4 18:25 pts
crw-rw-rw- 1 0 0 1, 8 Feb 4 18:25 random
crw------- 1 0 0 10, 242 Feb 4 18:25 rfkill
lrwxrwxrwx 1 0 0 4 Feb 4 18:25 rtc -> rtc0
crw------- 1 0 0 252, 0 Feb 4 18:25 rtc0
brw------- 1 0 0 8, 0 Feb 4 18:25 sda
brw------- 1 0 0 8, 16 Feb 4 18:25 sdb
crw------- 1 0 0 21, 0 Feb 4 18:25 sg0
crw------- 1 0 0 21, 1 Feb 4 18:25 sg1
drwxrwxrwt 2 0 0 40 Feb 4 18:25 shm
crw------- 1 0 0 10, 231 Feb 4 18:25 snapshot
drwxr-xr-x 2 0 0 80 Feb 4 18:25 snd
lrwxrwxrwx 1 0 0 15 Feb 4 18:25 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 0 0 15 Feb 4 18:25 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 0 0 15 Feb 4 18:25 stdout -> /proc/self/fd/1
crw-rw-rw- 1 0 0 5, 0 Feb 4 18:25 tty
crw------- 1 0 0 4, 0 Feb 4 18:25 tty0
crw------- 1 0 0 4, 1 Feb 4 18:25 tty1
crw------- 1 0 0 4, 10 Feb 4 18:25 tty10
crw------- 1 0 0 4, 11 Feb 4 18:25 tty11
crw------- 1 0 0 4, 12 Feb 4 18:25 tty12
crw------- 1 0 0 4, 13 Feb 4 18:25 tty13
crw------- 1 0 0 4, 14 Feb 4 18:25 tty14
crw------- 1 0 0 4, 15 Feb 4 18:25 tty15
crw------- 1 0 0 4, 16 Feb 4 18:25 tty16
crw------- 1 0 0 4, 17 Feb 4 18:25 tty17
crw------- 1 0 0 4, 18 Feb 4 18:25 tty18
crw------- 1 0 0 4, 19 Feb 4 18:25 tty19
crw------- 1 0 0 4, 2 Feb 4 18:25 tty2
crw------- 1 0 0 4, 20 Feb 4 18:25 tty20
crw------- 1 0 0 4, 21 Feb 4 18:25 tty21
crw------- 1 0 0 4, 22 Feb 4 18:25 tty22
crw------- 1 0 0 4, 23 Feb 4 18:25 tty23
crw------- 1 0 0 4, 24 Feb 4 18:25 tty24
crw------- 1 0 0 4, 25 Feb 4 18:25 tty25
crw------- 1 0 0 4, 26 Feb 4 18:25 tty26
crw------- 1 0 0 4, 27 Feb 4 18:25 tty27
crw------- 1 0 0 4, 28 Feb 4 18:25 tty28
crw------- 1 0 0 4, 29 Feb 4 18:25 tty29
crw------- 1 0 0 4, 3 Feb 4 18:25 tty3
crw------- 1 0 0 4, 30 Feb 4 18:25 tty30
crw------- 1 0 0 4, 31 Feb 4 18:25 tty31
crw------- 1 0 0 4, 32 Feb 4 18:25 tty32
crw------- 1 0 0 4, 33 Feb 4 18:25 tty33
crw------- 1 0 0 4, 34 Feb 4 18:25 tty34
crw------- 1 0 0 4, 35 Feb 4 18:25 tty35
crw------- 1 0 0 4, 36 Feb 4 18:25 tty36
crw------- 1 0 0 4, 37 Feb 4 18:25 tty37
crw------- 1 0 0 4, 38 Feb 4 18:25 tty38
crw------- 1 0 0 4, 39 Feb 4 18:25 tty39
crw------- 1 0 0 4, 4 Feb 4 18:25 tty4
crw------- 1 0 0 4, 40 Feb 4 18:25 tty40
crw------- 1 0 0 4, 41 Feb 4 18:25 tty41
crw------- 1 0 0 4, 42 Feb 4 18:25 tty42
crw------- 1 0 0 4, 43 Feb 4 18:25 tty43
crw------- 1 0 0 4, 44 Feb 4 18:25 tty44
crw------- 1 0 0 4, 45 Feb 4 18:25 tty45
crw------- 1 0 0 4, 46 Feb 4 18:25 tty46
crw------- 1 0 0 4, 47 Feb 4 18:25 tty47
crw------- 1 0 0 4, 48 Feb 4 18:25 tty48
crw------- 1 0 0 4, 49 Feb 4 18:25 tty49
crw------- 1 0 0 4, 5 Feb 4 18:25 tty5
crw------- 1 0 0 4, 50 Feb 4 18:25 tty50
crw------- 1 0 0 4, 51 Feb 4 18:25 tty51
crw------- 1 0 0 4, 52 Feb 4 18:25 tty52
crw------- 1 0 0 4, 53 Feb 4 18:25 tty53
crw------- 1 0 0 4, 54 Feb 4 18:25 tty54
crw------- 1 0 0 4, 55 Feb 4 18:25 tty55
crw------- 1 0 0 4, 56 Feb 4 18:25 tty56
crw------- 1 0 0 4, 57 Feb 4 18:25 tty57
crw------- 1 0 0 4, 58 Feb 4 18:25 tty58
crw------- 1 0 0 4, 59 Feb 4 18:25 tty59
crw------- 1 0 0 4, 6 Feb 4 18:25 tty6
crw------- 1 0 0 4, 60 Feb 4 18:25 tty60
crw------- 1 0 0 4, 61 Feb 4 18:25 tty61
crw------- 1 0 0 4, 62 Feb 4 18:25 tty62
crw------- 1 0 0 4, 63 Feb 4 18:25 tty63
crw------- 1 0 0 4, 7 Feb 4 18:25 tty7
crw------- 1 0 0 4, 8 Feb 4 18:25 tty8
crw------- 1 0 0 4, 9 Feb 4 18:25 tty9
crw------- 1 0 0 4, 64 Feb 4 18:25 ttyS0
crw------- 1 0 0 10, 239 Feb 4 18:25 uhid
crw------- 1 0 0 10, 223 Feb 4 18:25 uinput
crw-rw-rw- 1 0 0 1, 9 Feb 4 18:25 urandom
crw------- 1 0 0 7, 0 Feb 4 18:25 vcs
crw------- 1 0 0 7, 1 Feb 4 18:25 vcs1
crw------- 1 0 0 7, 128 Feb 4 18:25 vcsa
crw------- 1 0 0 7, 129 Feb 4 18:25 vcsa1
crw------- 1 0 0 7, 64 Feb 4 18:25 vcsu
crw------- 1 0 0 7, 65 Feb 4 18:25 vcsu1
drwxr-xr-x 2 0 0 60 Feb 4 18:25 vfio
crw------- 1 0 0 10, 63 Feb 4 18:25 vga_arbiter
crw------- 1 0 0 10, 137 Feb 4 18:25 vhci
crw------- 1 0 0 10, 238 Feb 4 18:25 vhost-net
crw------- 1 0 0 10, 241 Feb 4 18:25 vhost-vsock
drwxr-xr-x 2 0 0 60 Feb 4 18:25 virtio-ports
crw------- 1 0 0 244, 1 Feb 4 18:25 vport2p1
crw-rw-rw- 1 0 0 1, 5 Feb 4 18:25 zero
/dev/block:
total 0
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 8:0 -> ../sda
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 8:16 -> ../sdb
/dev/bsg:
total 0
crw------- 1 0 0 247, 0 Feb 4 18:25 2:0:0:0
crw------- 1 0 0 247, 1 Feb 4 18:25 2:0:1:0
/dev/char:
total 0
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 10:1 -> ../psaux
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 10:183 -> ../hwrng
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 10:228 -> ../hpet
lrwxrwxrwx 1 0 0 11 Feb 4 18:25 10:231 -> ../snapshot
lrwxrwxrwx 1 0 0 17 Feb 4 18:25 10:236 -> ../mapper/control
lrwxrwxrwx 1 0 0 19 Feb 4 18:25 10:59 -> ../memory_bandwidth
lrwxrwxrwx 1 0 0 21 Feb 4 18:25 10:60 -> ../network_throughput
lrwxrwxrwx 1 0 0 18 Feb 4 18:25 10:61 -> ../network_latency
lrwxrwxrwx 1 0 0 18 Feb 4 18:25 10:62 -> ../cpu_dma_latency
lrwxrwxrwx 1 0 0 14 Feb 4 18:25 10:63 -> ../vga_arbiter
lrwxrwxrwx 1 0 0 13 Feb 4 18:25 13:63 -> ../input/mice
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 1:1 -> ../mem
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 1:11 -> ../kmsg
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 1:3 -> ../null
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 1:4 -> ../port
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 1:5 -> ../zero
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 1:7 -> ../full
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 1:8 -> ../random
lrwxrwxrwx 1 0 0 10 Feb 4 18:25 1:9 -> ../urandom
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 21:0 -> ../sg0
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 21:1 -> ../sg1
lrwxrwxrwx 1 0 0 11 Feb 4 18:25 244:1 -> ../vport2p1
lrwxrwxrwx 1 0 0 14 Feb 4 18:25 247:0 -> ../bsg/2:0:0:0
lrwxrwxrwx 1 0 0 14 Feb 4 18:25 247:1 -> ../bsg/2:0:1:0
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 252:0 -> ../rtc0
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:0 -> ../tty0
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:1 -> ../tty1
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:10 -> ../tty10
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:11 -> ../tty11
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:12 -> ../tty12
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:13 -> ../tty13
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:14 -> ../tty14
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:15 -> ../tty15
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:16 -> ../tty16
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:17 -> ../tty17
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:18 -> ../tty18
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:19 -> ../tty19
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:2 -> ../tty2
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:20 -> ../tty20
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:21 -> ../tty21
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:22 -> ../tty22
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:23 -> ../tty23
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:24 -> ../tty24
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:25 -> ../tty25
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:26 -> ../tty26
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:27 -> ../tty27
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:28 -> ../tty28
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:29 -> ../tty29
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:3 -> ../tty3
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:30 -> ../tty30
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:31 -> ../tty31
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:32 -> ../tty32
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:33 -> ../tty33
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:34 -> ../tty34
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:35 -> ../tty35
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:36 -> ../tty36
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:37 -> ../tty37
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:38 -> ../tty38
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:39 -> ../tty39
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:4 -> ../tty4
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:40 -> ../tty40
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:41 -> ../tty41
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:42 -> ../tty42
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:43 -> ../tty43
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:44 -> ../tty44
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:45 -> ../tty45
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:46 -> ../tty46
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:47 -> ../tty47
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:48 -> ../tty48
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:49 -> ../tty49
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:5 -> ../tty5
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:50 -> ../tty50
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:51 -> ../tty51
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:52 -> ../tty52
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:53 -> ../tty53
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:54 -> ../tty54
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:55 -> ../tty55
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:56 -> ../tty56
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:57 -> ../tty57
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:58 -> ../tty58
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:59 -> ../tty59
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:6 -> ../tty6
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:60 -> ../tty60
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:61 -> ../tty61
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:62 -> ../tty62
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:63 -> ../tty63
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 4:64 -> ../ttyS0
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:7 -> ../tty7
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:8 -> ../tty8
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 4:9 -> ../tty9
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 5:0 -> ../tty
lrwxrwxrwx 1 0 0 10 Feb 4 18:25 5:1 -> ../console
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 5:2 -> ../ptmx
lrwxrwxrwx 1 0 0 6 Feb 4 18:25 7:0 -> ../vcs
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 7:1 -> ../vcs1
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 7:128 -> ../vcsa
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 7:129 -> ../vcsa1
lrwxrwxrwx 1 0 0 7 Feb 4 18:25 7:64 -> ../vcsu
lrwxrwxrwx 1 0 0 8 Feb 4 18:25 7:65 -> ../vcsu1
/dev/disk:
total 0
drwxr-xr-x 2 0 0 80 Feb 4 18:25 by-id
drwxr-xr-x 2 0 0 80 Feb 4 18:25 by-path
drwxr-xr-x 2 0 0 60 Feb 4 18:25 by-uuid
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 scsi-0QEMU_QEMU_HARDDISK_appliance -> ../../sdb
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 scsi-0QEMU_QEMU_HARDDISK_hd0 -> ../../sda
/dev/disk/by-path:
total 0
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 pci-0000:00:03.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 pci-0000:00:03.0-scsi-0:0:1:0 -> ../../sdb
/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 0 0 9 Feb 4 18:25 0af2ce9d-fba2-4171-a973-00023b2428b2
-> ../../sdb
/dev/input:
total 0
crw------- 1 0 0 13, 63 Feb 4 18:25 mice
/dev/mapper:
total 0
crw------- 1 0 0 10, 236 Feb 4 18:25 control
/dev/net:
total 0
crw-rw-rw- 1 0 0 10, 200 Feb 4 18:25 tun
/dev/pts:
total 0
c--------- 1 0 0 5, 2 Feb 4 18:25 ptmx
/dev/shm:
total 0
/dev/snd:
total 0
crw------- 1 0 0 116, 1 Feb 4 18:25 seq
crw------- 1 0 0 116, 33 Feb 4 18:25 timer
/dev/vfio:
total 0
crw------- 1 0 0 10, 196 Feb 4 18:25 vfio
/dev/virtio-ports:
total 0
total 0
lrwxrwxrwx 1 0 0 11 Feb 4 18:25 org.libguestfs.channel.0 -> ../vport2p1
+ cat /proc/mounts
/dev/root / ext2 rw,noatime 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
tmpfs /run tmpfs rw,nosuid,relatime,size=150540k,mode=755 0 0
/dev /dev devtmpfs rw,relatime,size=372012k,nr_inodes=93003,mode=755 0 0
/dev/pts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
shmfs /dev/shm tmpfs rw,relatime 0 0
+ cat /proc/mdstat
cat: /proc/mdstat: No such file or directory
+ lvm config
+ lvm pvs
+ lvm vgs
+ lvm lvs
+ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
+ ip r
+ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory
+ lsmod
Module Size Used by
dm_mod 155648 0
sg 36864 0
libcrc32c 16384 0
crc8 16384 0
crc7 16384 0
crc64 16384 0
crc_itu_t 16384 0
crc_ccitt 16384 0
ext4 745472 1
crc16 16384 1 ext4
mbcache 16384 1 ext4
jbd2 122880 1 ext4
fscrypto 32768 1 ext4
virtio_pci 28672 0
virtio_mmio 16384 0
virtio_input 16384 0
virtio_balloon 20480 0
virtio_scsi 20480 1
sd_mod 61440 1
nd_pmem 20480 0
nd_btt 24576 1 nd_pmem
virtio_net 53248 0
net_failover 20480 1 virtio_net
failover 16384 1 net_failover
virtio_crypto 24576 0
crypto_engine 16384 1 virtio_crypto
virtio_console 32768 0
virtio_rng 16384 0
rng_core 16384 1 virtio_rng
virtio_blk 20480 0
virtio_ring 28672 10
virtio_rng,virtio_mmio,virtio_console,virtio_balloon,virtio_scsi,virtio_crypto,virtio_input,virtio_pci,virtio_blk
,virtio_net
virtio 16384 10
virtio_rng,virtio_mmio,virtio_console,virtio_balloon,virtio_scsi,virtio_crypto,virtio_input,virtio_pci,virtio_blk,virtio_net
ata_piix 36864 0
libata 270336 1 ata_piix
scsi_mod 249856 4 virtio_scsi,sd_mod,libata,sg
nfit 61440 0
libnvdimm 172032 3 nd_btt,nd_pmem,nfit
crc32c_generic 16384 0
crc32_generic 16384 0
crct10dif_pclmul 16384 0
crc32c_intel 24576 2
crc32_pclmul 16384 0
+ date
Fri Feb 4 18:25:59 UTC 2022
+ echo -n 'clocksource: '
clocksource: + cat
/sys/devices/system/clocksource/clocksource0/current_clocksource
kvm-clock
+ echo -n 'uptime: '
uptime: + cat /proc/uptime
1.98 0.98
+ cmd=guestfsd
++ grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline
+ eval
+ test x '!=' x
+ test 1 = 1
+ cmd='guestfsd --verbose'
+ test '' = 1
+ false
+ test '' = 1
+ echo guestfsd --verbose
guestfsd --verbose
+ guestfsd --verbose
lvm_system_dir = /tmp/lvm
OCaml daemon loaded
trying to open virtio-serial channel
'/dev/virtio-ports/org.libguestfs.channel.0'
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle
libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG
libguestfs: appliance is up
Guest launched OK.
guestfsd: <= part_disk (0xd2) request length 60 bytes
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sda
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle
commandrvf: stdout=e stderr=y flags=0x10000
commandrvf: parted -s -- /dev/sda mklabel msdos mkpart primary 128s -128s
Warning: The resulting partition is not properly aligned for best performance.
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle
[ 2.288887] sda: sda1
guestfsd: => part_disk (0xd2) took 0.19 secs
guestfsd: <= mkfs (0x116) request length 84 bytes
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sda1
commandrvf: stdout=y stderr=y flags=0x0
commandrvf: wipefs --help
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: wipefs -a --force /dev/sda1
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: mke2fs -t ext2 -F /dev/sda1
mke2fs 1.44.5 (15-Dec-2018)
guestfsd: => mkfs (0x116) took 0.04 secs
guestfsd: <= mount (0x1) request length 64 bytes
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sda1
command: mount '/dev/sda1' '/sysroot//'
[ 2.388717] EXT4-fs (sda1): mounting ext2 file system using the
ext4 subsystem
[ 2.391933] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
guestfsd: => mount (0x1) took 0.03 secs
guestfsd: <= touch (0x3) request length 52 bytes
guestfsd: => touch (0x3) took 0.00 secs
guestfsd: <= internal_autosync (0x11a) request length 40 bytes
umount-all: /proc/mounts: fsname=/dev/root dir=/ type=ext2
opts=rw,noatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/proc dir=/proc type=proc
opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/sys dir=/sys type=sysfs
opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=tmpfs dir=/run type=tmpfs
opts=rw,nosuid,relatime,size=150540k,mode=755 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev dir=/dev type=devtmpfs
opts=rw,relatime,size=372012k,nr_inodes=93003,mode=755 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/pts dir=/dev/pts type=devpts
opts=rw,relatime,mode=600,ptmxmode=000 freq=0 passno=0
umount-all: /proc/mounts: fsname=shmfs dir=/dev/shm type=tmpfs
opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/sda1 dir=/sysroot type=ext2
opts=rw,relatime freq=0 passno=0
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: umount /sysroot
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sdb
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sda
fsync /dev/sda
guestfsd: => internal_autosync (0x11a) took 0.04 secs
libguestfs: sending SIGTERM to process 8122
libguestfs: qemu maxrss 185424K
libguestfs: closing guestfs handle 0x55e29aa2d3a0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs2AeYlA
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfsRSg91A
===== TEST FINISHED OK =====
2 years, 7 months
[nbdkit PATCH] error: Tweak filter name for easier debugging
by Eric Blake
Grepping for the string 'error:' is complicated when the error filter
reports its name in the same manner. We can keep the filter .so and
file names the same, but tweak the filter .name field to change
messages using nbdkit_debug() to instead produce "error-inject:", so
that "error:" is reserved for uses of nbdkit_error().
---
I confused myself while trying to debug a new libnbd today, where
injecting errors was intentional. And then I noticed that 'man
nbdkit-error-filter' already tried to warn me. But we can do one step
better, as in this patch...
filters/error/nbdkit-error-filter.pod | 13 +++++++------
filters/error/error.c | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/filters/error/nbdkit-error-filter.pod b/filters/error/nbdkit-error-filter.pod
index 5fb93063..47fcd379 100644
--- a/filters/error/nbdkit-error-filter.pod
+++ b/filters/error/nbdkit-error-filter.pod
@@ -129,14 +129,15 @@ settings to NBD cache requests.
=head2 Peculiar debug output
If you are looking at the debugging output (using C<nbdkit -f -v>)
-then you may see peculiar "errors" appearing when using this filter,
-for example:
+references to the name of this filter show up as C<"error-inject:">,
+and such lines indicate that the filter is not altering output, for
+example:
- nbdkit: file.9: debug: error: pread count=1024 offset=0 flags=0x0
+ nbdkit: file.9: debug: error-inject: pread count=1024 offset=0 flags=0x0
-In fact these are not errors, nbdkit core is simply printing the name
-of the filter which happens to be C<"error">. When this filter
-injects an error you will see something like:
+Conversely, references to the string C<"error:"> occur when the
+L<nbdkit_error(3)> API was used, including when this filter injects an
+error, as in:
nbdkit: file.4: error: injecting ENOSPC error into pwrite
diff --git a/filters/error/error.c b/filters/error/error.c
index 4b513a81..95eb5622 100644
--- a/filters/error/error.c
+++ b/filters/error/error.c
@@ -1,5 +1,5 @@
/* nbdkit
- * Copyright (C) 2018-2020 Red Hat Inc.
+ * Copyright (C) 2018-2022 Red Hat Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -374,8 +374,8 @@ error_cache (nbdkit_next *next,
}
static struct nbdkit_filter filter = {
- .name = "error",
- .longname = "nbdkit error filter",
+ .name = "error-inject",
+ .longname = "nbdkit error injection filter",
.load = error_load,
.unload = error_unload,
.config = error_config,
--
2.34.1
2 years, 7 months
[PATCH libnbd] golang: tests: Fix error handling
by Nir Soffer
Like lot of the C examples, the aio copy test ignores read and write
errors in the completion callback, which can cause silent data
corruption. The failure in the test is not critical, but this is a bad
example that may be copied by developers to a real application.
The test panics now if completion callback fails, similar to other Go
examples.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
golang/libnbd_590_aio_copy_test.go | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/golang/libnbd_590_aio_copy_test.go b/golang/libnbd_590_aio_copy_test.go
index 570635c9..8be0ad2d 100644
--- a/golang/libnbd_590_aio_copy_test.go
+++ b/golang/libnbd_590_aio_copy_test.go
@@ -99,33 +99,41 @@ func asynch_copy(t *testing.T, src *Libnbd, dst *Libnbd) {
source then do it now. */
if soff < size && src_in_flight < max_reads_in_flight {
n := bs
if n > size-soff {
n = size - soff
}
buf := MakeAioBuffer(uint(n))
soff_copy := soff
var optargs AioPreadOptargs
optargs.CompletionCallbackSet = true
- optargs.CompletionCallback = func(*int) int {
+ optargs.CompletionCallback = func(error *int) int {
+ if *error != 0 {
+ err := syscall.Errno(*error).Error()
+ panic(err)
+ }
return read_completed(buf, soff_copy)
}
src.AioPread(buf, soff, &optargs)
soff += n
}
/* If there are any write commands waiting to
be issued, send them now. */
for _, wb := range writes {
var optargs AioPwriteOptargs
optargs.CompletionCallbackSet = true
- optargs.CompletionCallback = func(*int) int {
+ optargs.CompletionCallback = func(error *int) int {
+ if *error != 0 {
+ err := syscall.Errno(*error).Error()
+ panic(err)
+ }
return write_completed(wb.buf)
}
dst.AioPwrite(wb.buf, wb.offset, &optargs)
}
writes = writes[:0]
/* Now poll the file descriptors. */
nfd := 1
sfd, err := src.AioGetFd()
if err != nil {
--
2.34.1
2 years, 7 months
[libnbd PATCH] docs: Clarify how callbacks should handle errors
by Eric Blake
Recent patches have demonstrated confusion on which order callbacks
are reached, when it is safe or dangerous to ignore *error, and what a
completion callback should do when auto-retirement is in use. Add
wording to make it more obvious that:
- mid-command callbacks are reached before the completion callback,
and returning -1 does not prevent future callbacks
- ignoring *error in a mid-command callback is safe
- completion callbacks are reached unconditionally, and must NOT ignore
*error
- if auto-retirement is in use, completion callbacks should always use
it rather than trying to return -1 on error
- the contents of buf after nbd_pread and friends is unspecified on
error
---
docs/libnbd.pod | 44 +++++++++++++++++++++++++++++++++++---------
generator/API.ml | 24 ++++++++++++++++++------
2 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/docs/libnbd.pod b/docs/libnbd.pod
index 32088f64..006d530c 100644
--- a/docs/libnbd.pod
+++ b/docs/libnbd.pod
@@ -870,15 +870,41 @@ still needs to be retired.
=head2 Callbacks with C<int *error> parameter
Some of the high-level commands (L<nbd_pread_structured(3)>,
-L<nbd_block_status(3)>) involve the use of a callback function invoked by
-the state machine at appropriate points in the server's reply before
-the overall command is complete. These callback functions, along with
-all of the completion callbacks, include a parameter C<error>
-containing the value of any error detected so far; if the callback
-function fails, it should assign back into C<error> and return C<-1>
-to change the resulting error of the overall command. Assignments
-into C<error> are ignored for any other return value; similarly,
-assigning C<0> into C<error> does not have an effect.
+L<nbd_block_status(3)>) involve the use of a callback function invoked
+by the state machine at appropriate points in the server's reply
+before the overall command is complete. These callback functions,
+along with all of the completion callbacks, include a parameter
+C<error> containing the value of any error detected so far. If a
+callback function fails and wants to change the resulting error of the
+overall command visible later in the API sequence, it should assign
+back into C<error> and return C<-1>. Assignments into C<error> are
+ignored for any other return value; similarly, assigning C<0> into
+C<error> does not have an effect.
+
+Note that a mid-command callback might never be reached, such as if
+libnbd detects that the command was invalid to send (see
+L<nbd_set_strict_mode(3)>) or if the server reports a failure. It is
+safe for a mid-command callback to ignore non-zero C<error>: all the
+other parameters to the mid-command callback will still be valid
+(corresponding to the current portion of the server's reply), and the
+overall command will still fail (at the completion callback or
+L<nbd_aio_command_completed(3)> for an asynchronous command, or as the
+result of the overall synchronous command). Returing C<-1> from a
+mid-command callback does not prevent that callback from being reached
+again, if the server sends more mid-command replies that warrant
+another use of that callback. A mid-command callback may be reached
+more times than expected if the server is non-compliant.
+
+On the other hand, if a completion callback is supplied (only possible
+with asynchronous commands), it will always be reached exactly once,
+and the completion callback must not ignore the value of C<error>. In
+particular, the content of a buffer passed to L<nbd_aio_pread(3)> or
+L<nbd_aio_pread_structured(3)> is unspecified if C<error> is set on
+entry to the completion callback. It is recommended that if your code
+uses automatic command retirement, then the completion function should
+return C<1> on all control paths, even when handling errors (note that
+with automatic retirement, assigning into C<error> is pointless as
+there is no later API to see that value).
=head1 COMPILING YOUR PROGRAM
diff --git a/generator/API.ml b/generator/API.ml
index cf2e7543..bdb8e7c8 100644
--- a/generator/API.ml
+++ b/generator/API.ml
@@ -1,6 +1,6 @@
(* hey emacs, this is OCaml code: -*- tuareg -*- *)
(* nbd client library in userspace: the API
- * Copyright (C) 2013-2021 Red Hat Inc.
+ * Copyright (C) 2013-2022 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1829,7 +1829,9 @@ "pread", {
L<nbd_get_block_size(3)>.
The C<flags> parameter must be C<0> for now (it exists for future NBD
-protocol extensions)."
+protocol extensions).
+
+Note that if this command fails, the contents of C<buf> are unspecified."
^ strict_call_description;
see_also = [Link "aio_pread"; Link "pread_structured";
Link "get_block_size"; Link "set_strict_mode"];
@@ -1914,7 +1916,9 @@ "pread_structured", {
C<LIBNBD_CMD_FLAG_DF> meaning that the server should not reply with
more than one fragment (if that is supported - some servers cannot do
this, see L<nbd_can_df(3)>). Libnbd does not validate that the server
-actually obeys the flag."
+actually obeys the flag.
+
+Note that if this command fails, the contents of C<buf> are unspecified."
^ strict_call_description;
see_also = [Link "can_df"; Link "pread";
Link "aio_pread_structured"; Link "get_block_size";
@@ -2155,7 +2159,8 @@ "block_status", {
for contexts known to libnbd, B<E<lt>libnbd.hE<gt>> contains constants
beginning with C<LIBNBD_STATE_> that may help decipher the values.
On entry to the callback, the C<error> parameter contains the errno
-value of any previously detected error.
+value of any previously detected error, but even if an earlier error
+was detected, the current C<metacontext> and C<entries> are valid.
It is possible for the extent function to be called
more times than you expect (if the server is buggy),
@@ -2454,7 +2459,10 @@ "aio_pread", {
as described in L<libnbd(3)/Completion callbacks>.
Note that you must ensure C<buf> is valid until the command has
-completed. Other parameters behave as documented in L<nbd_pread(3)>."
+completed. Furthermore, the contents of C<buf> are unspecified if the
+C<error> parameter to C<completion_callback> is set, or if
+L<nbd_aio_command_completed(3)> reports failure. Other parameters behave
+as documented in L<nbd_pread(3)>."
^ strict_call_description;
example = Some "examples/aio-connect-read.c";
see_also = [SectionLink "Issuing asynchronous commands";
@@ -2478,7 +2486,11 @@ "aio_pread_structured", {
Or supply the optional C<completion_callback> which will be invoked
as described in L<libnbd(3)/Completion callbacks>.
-Other parameters behave as documented in L<nbd_pread_structured(3)>."
+Note that you must ensure C<buf> is valid until the command has
+completed. Furthermore, the contents of C<buf> are unspecified if the
+C<error> parameter to C<completion_callback> is set, or if
+L<nbd_aio_command_completed(3)> reports failure. Other parameters behave
+as documented in L<nbd_pread_structured(3)>."
^ strict_call_description;
see_also = [SectionLink "Issuing asynchronous commands";
Link "aio_pread"; Link "pread_structured";
--
2.34.1
2 years, 7 months
[libnbd PATCH 0/4] Work towards fixing nbdcopy silent corruption
by Eric Blake
These are the trivial patches modeled after Nir's commit 7ba6ef67,
fixing further places that fail to check *error during callbacks.
nbdcopy still has a bigger bug in that it is NOT properly checking for
*error in the pread/pwrite completion handlers, but fixing that
gracefully (rather than just quitting the process immediately, as we
can do in the examples), requires more invasive patches which I will
be posting separately for review, while the ones posted here are
trivial enough that I'm pushing them now (commits 23bcea4a..1373d423).
I also audited other uses of completion callbacks:
- in tests, closure-lifetimes, errors, server-death, and
shutdown-flags are all safe (either the callback returns 0 and the
code later calls nbd_aio_command_completed, or we are explicitly
testing aspects of completion callbacks)
- in fuse/operations.c, the completion callback returns 0 and calls
nbd_aio_command_completed later
- in examples/strict-structured-reads.c, the completion callback
properly checks *error
I also checked that nbdkit's nbd plugin properly checks *error.
Eric Blake (4):
examples: aio-connect-read.c: Fix error handling
examples: glib-main-loop: don't strand commands when gsource
disappears
examples: glib-main-loop: Fix error handling
copy: Ignore extents if we encountered earlier error
examples/aio-connect-read.c | 7 +++++++
examples/glib-main-loop.c | 14 ++++++++++++--
copy/nbd-ops.c | 4 ++--
3 files changed, 21 insertions(+), 4 deletions(-)
--
2.34.1
2 years, 7 months
virt-builder debian-10 --install sudo fails (version 1.40.2)
by Loïc Dachary
Bonjour,
I would be interested in a workaround until this is fixed. I suppose the http://builder.libguestfs.org/debian-10.xz archive should be upgraded?
Cheers
Steps to reproduce:
$ virt-builder --version
virt-builder 1.40.2
$ virt-builder debian-10 --install sudo
[ 1.4] Downloading: http://builder.libguestfs.org/debian-10.xz
[ 2.0] Planning how to build this image
[ 2.0] Uncompressing
[ 6.4] Opening the new disk
[ 9.3] Setting a random seed
virt-builder: warning: random seed could not be set for this type of guest
[ 9.3] Installing packages: sudo
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists...
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1245 kB of archives.
After this operation, 3886 kB of additional disk space will be used.
Err:1 http://deb.debian.org/debian buster/main amd64 sudo amd64 1.8.27-1
404 Not Found [IP: 199.232.178.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/s/sudo/sudo_1.8.27-1_amd64.deb 404 Not Found [IP: 199.232.178.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
virt-builder: error:
export DEBIAN_FRONTEND=noninteractive
apt_opts='-q -y -o Dpkg::Options::=--force-confnew'
apt-get $apt_opts update
apt-get $apt_opts install 'sudo'
: command exited with an error
If reporting bugs, run virt-builder with debugging enabled and include the
complete output:
virt-builder -v -x [...]
--
Loïc Dachary, Artisan Logiciel Libre
2 years, 7 months
[PATCH nbdkit] plugins: python: Make threading model explicit
by Nir Soffer
The default threading model is already serializing all requests, but
implementing thread_model() gives us good place to explain why the code
works and why we don't use os.preadv and os.pwritev.
---
plugins/python/examples/error.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/plugins/python/examples/error.py b/plugins/python/examples/error.py
index 0331a83e..5cb368d2 100644
--- a/plugins/python/examples/error.py
+++ b/plugins/python/examples/error.py
@@ -11,33 +11,41 @@
# ./nbdkit -f -v python ./plugins/python/examples/error.py file=test.img
#
# Or run it after installing nbdkit like this:
#
# nbdkit -f -v python ./plugins/python/examples/error.py file=test.img
#
# The -f -v arguments are optional. They cause the server to stay in
# the foreground and print debugging, which is useful when testing.
import os
+import nbdkit
API_VERSION = 2
filename = None
calls = 0
def config(key, value):
global filename
assert key == "file"
filename = value
+def thread_model():
+ # Serialize all requests so we can seek safely in pread and pwrite
+ # and be compatible with python 3.6. In python 3.7 we can use
+ # os.preadv and os.pwritev and use the parallel threading model.
+ return nbdkit.THREAD_MODEL_SERIALIZE_ALL_REQUESTS
+
+
def open(readonly):
flags = os.O_RDONLY if readonly else os.O_RDWR
return {"fd": os.open(filename, flags)}
def can_extents(h):
return True
def get_size(h):
--
2.34.1
2 years, 7 months
[PATCH nbdkit] plugins: python: Add error example
by Nir Soffer
This plugin simulates errors in pread, pwrite, and extents. This is
useful for testing error handling in NBD clients, and understanding how
plugin exceptions are reported to the NBD client.
---
plugins/python/Makefile.am | 1 +
plugins/python/examples/error.py | 77 ++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
create mode 100644 plugins/python/examples/error.py
diff --git a/plugins/python/Makefile.am b/plugins/python/Makefile.am
index eecd7e89..e6e6c9e6 100644
--- a/plugins/python/Makefile.am
+++ b/plugins/python/Makefile.am
@@ -27,20 +27,21 @@
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
include $(top_srcdir)/common-rules.mk
EXTRA_DIST = \
nbdkit-python-plugin.pod \
examples/file.py \
+ examples/error.py \
examples/imageio.py \
examples/ramdisk.py \
examples/url.py \
$(NULL)
if HAVE_PYTHON
plugin_LTLIBRARIES = nbdkit-python-plugin.la
nbdkit_python_plugin_la_SOURCES = \
diff --git a/plugins/python/examples/error.py b/plugins/python/examples/error.py
new file mode 100644
index 00000000..0331a83e
--- /dev/null
+++ b/plugins/python/examples/error.py
@@ -0,0 +1,77 @@
+# Example Python plugin.
+#
+# This plugin simulates errors for testing NBD client error hanlding.
+# Every odd call will fail, and every even call will succeed, unless
+# there a real error accesing the specified file.
+#
+# This example can be freely used for any purpose.
+
+# Run it from the build directory like this:
+#
+# ./nbdkit -f -v python ./plugins/python/examples/error.py file=test.img
+#
+# Or run it after installing nbdkit like this:
+#
+# nbdkit -f -v python ./plugins/python/examples/error.py file=test.img
+#
+# The -f -v arguments are optional. They cause the server to stay in
+# the foreground and print debugging, which is useful when testing.
+
+import os
+
+API_VERSION = 2
+
+filename = None
+calls = 0
+
+
+def config(key, value):
+ global filename
+ assert key == "file"
+ filename = value
+
+
+def open(readonly):
+ flags = os.O_RDONLY if readonly else os.O_RDWR
+ return {"fd": os.open(filename, flags)}
+
+
+def can_extents(h):
+ return True
+
+
+def get_size(h):
+ return os.stat(h["fd"]).st_size
+
+
+def extents(h, count, offset, flags):
+ global calls
+ calls += 1
+ if calls % 2:
+ raise RuntimeError(f"extents error offset={offset} count={count}")
+
+ # We don't really support extents, so we report the entire file as
+ # data.
+ return [(offset, count, 0)]
+
+
+def pread(h, buf, offset, flags):
+ global calls
+ calls += 1
+ if calls % 2:
+ raise RuntimeError(f"pread error offset={offset} count={len(buf)}")
+
+ os.lseek(h["fd"], offset, os.SEEK_SET)
+ n = os.readv(h['fd'], [buf])
+ assert n == len(buf)
+
+
+def pwrite(h, buf, offset, flags):
+ global calls
+ calls += 1
+ if calls % 2:
+ raise RuntimeError(f"pwrite error offset={offset} count={len(buf)}")
+
+ os.lseek(h["fd"], offset, os.SEEK_SET)
+ n = os.writev(h['fd'], [buf])
+ assert n == len(buf)
--
2.34.1
2 years, 7 months
[v2v PATCH v2 0/7] Fix "virtio-transitional" regression for Windows guests
by Laszlo Ersek
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2043333
v1: https://listman.redhat.com/archives/libguestfs/2022-January/msg00200.html
In v2, patch#7 has been made consistent with the bugfix in patch#1.
(Please see the Notes sections of the individual patches for more
details.)
Thanks,
Laszlo
Laszlo Ersek (7):
convert/windows_virtio: fix copy_from_libosinfo <-> VIRTIO_WIN
priority
convert/windows_virtio: map 32-bit arch name from libguestfs to osinfo
convert/libosinfo: factor out v2v_osinfo_device_list_to_value_list()
convert/libosinfo: retrieve the device list for OsinfoDeviceDriver
convert/libosinfo_utils: debug-log the devices supported by a driver
convert/libosinfo_utils: extract "best_driver" from
"windows_virtio.ml"
convert/convert_windows: consult "best driver"'s dev list for
virtio-1.0
convert/convert_windows.ml | 26 ++++++-
convert/libosinfo-c.c | 132 ++++++++++++++++++---------------
convert/libosinfo.ml | 19 ++---
convert/libosinfo.mli | 19 ++---
convert/libosinfo_utils.ml | 56 +++++++++++---
convert/libosinfo_utils.mli | 18 ++++-
convert/windows_virtio.ml | 51 ++-----------
convert/windows_virtio.mli | 6 +-
docs/virt-v2v.pod | 24 ++++--
tests/test-v2v-cdrom.expected | 2 +-
tests/test-v2v-floppy.expected | 2 +-
tests/test-v2v-i-ova.xml | 8 +-
12 files changed, 213 insertions(+), 150 deletions(-)
base-commit: 8abc07a8589a48c79cc65159640e0d8ab3c9b261
--
2.19.1.3.g30247aa5d201
2 years, 7 months