[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
I ran this loop for some 100 iterations without failure: sudo sh -exc 'while true; do qemu-nbd --snapshot --connect /dev/nbd0 /srv/vm/adt-vivid-i386-cloud.img; sleep 0.5; [ -e /dev/nbd0p1 ]; mount /dev/nbd0p1 /mnt; [ -d /mnt/root ]; umount /mnt; qemu-nbd --disconnect /dev/nbd0; sleep 0.5; [ ! -e /dev/nbd0p1 ]; done' (You need to change the VM image, obviously). Maybe in your experiments you forgot a disconnect or so? If you can still reproduce this, please attach the output of journalctl -b after you run into an error, and check that you have no leftover /dev/nbd* devices. However, systemd or udev don't actually create or manage /dev/*, that's the kernel driver. ** Changed in: qemu (Ubuntu) Importance: High = Medium ** Changed in: qemu (Ubuntu) Status: Confirmed = Incomplete ** Summary changed: - vivid: systemd breaks qemu-nbd mounting + disconnecting qemu-nbd leaves device node behind -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: disconnecting qemu-nbd leaves device node behind To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
@Jason: I have uploaded yesterday 219-4ubuntu10 which may fix your issue (cherry-picking a race upstream), can you try to upgrade and tell me if this fixes it for you? -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
Fix confirmed after upgrading :) Thanks for the quick response! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
@didrocks - yup, it's working now! Thank you! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
Hmm, and one more thing: qemu-nbd --disconnect (at least sometimes) doesn't seem to be working when booting with systemd: $ ls /dev/nbd0* /dev/nbd0 /dev/nbd0p1 /dev/nbd0p2 /dev/nbd0p5 $ sudo qemu-nbd --disconnect /dev/nbd0 /dev/nbd0 disconnected $ echo $? 0 $ ls /dev/nbd0* /dev/nbd0 /dev/nbd0p1 /dev/nbd0p2 /dev/nbd0p5 After running qemu-nbd --disconnect, the exported nbd0p1, nbd0p2, nbd0p5 partitions should disappear (that's what happens when booting with Upstart). -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
Hmmm, there may still be an issue, as I didn't encounter this yesterday when doing my task multiple times after booting with Upstart. I'm mounting these qcow2 disk images in order to export a tarball of the filesystem. First three tarballs exported swimmingly, but the fourth time it seemed to hang, so I checked dmesg and saw this: [ 6009.696624] INFO: task jbd2/nbd0p1-8:26664 blocked for more than 120 seconds. [ 6009.696625] Tainted: P OE 3.19.0-10-generic #10-Ubuntu [ 6009.696625] echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. [ 6009.696625] jbd2/nbd0p1-8 D 8800c59d7b28 0 26664 2 0x [ 6009.696627] 8800c59d7b28 8803beab3110 00014200 8800c59d7fd8 [ 6009.696628] 00014200 88040c6da740 8803beab3110 8803f0914d40 [ 6009.696629] 88041ed94af8 88041efc89a0 0002 817c44f0 [ 6009.696630] Call Trace: [ 6009.696631] [817c44f0] ? bit_wait_timeout+0x70/0x70 [ 6009.696632] [817c3c20] io_schedule+0xa0/0x130 [ 6009.696633] [817c451b] bit_wait_io+0x2b/0x50 [ 6009.696634] [817c40c7] __wait_on_bit+0x67/0x90 [ 6009.696636] [81380f40] ? generic_make_request+0xc0/0x110 [ 6009.696637] [817c44f0] ? bit_wait_timeout+0x70/0x70 [ 6009.696638] [817c4162] out_of_line_wait_on_bit+0x72/0x80 [ 6009.696639] [810b6240] ? autoremove_wake_function+0x40/0x40 [ 6009.696640] [81227d46] __wait_on_buffer+0x36/0x40 [ 6009.696641] [812c8df0] jbd2_write_superblock+0xa0/0x190 [ 6009.696643] [812cb373] jbd2_journal_update_sb_log_tail+0x33/0x80 [ 6009.696645] [812c39fa] jbd2_journal_commit_transaction+0x57a/0x1820 [ 6009.696646] [810ab9c0] ? dequeue_entity+0x140/0x680 [ 6009.696648] [8109ea5d] ? ttwu_do_wakeup+0x1d/0xe0 [ 6009.696649] [810ac2e6] ? dequeue_task_fair+0x3e6/0x6a0 [ 6009.696650] [810ad111] ? put_prev_entity+0x31/0x430 [ 6009.696652] [810b04ab] ? pick_next_task_fair+0x1ab/0x8a0 [ 6009.696653] [810ad53f] ? put_prev_task_fair+0x2f/0x50 [ 6009.696654] [810dc35b] ? lock_timer_base.isra.36+0x2b/0x50 [ 6009.696655] [810dd44f] ? try_to_del_timer_sync+0x4f/0x70 [ 6009.696656] [812c85bb] kjournald2+0xbb/0x250 [ 6009.696657] [810b6200] ? wait_woken+0x90/0x90 [ 6009.696658] [812c8500] ? commit_timeout+0x10/0x10 [ 6009.696660] [81094679] kthread+0xc9/0xe0 [ 6009.696661] [810945b0] ? kthread_create_on_node+0x1c0/0x1c0 [ 6009.696662] [817c8198] ret_from_fork+0x58/0x90 [ 6009.696663] [810945b0] ? kthread_create_on_node+0x1c0/0x1c0 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
Hmm, maybe something else was going on. In an isolated test script, I haven't reproduced the disconnect problem again yet. I attached the script I'm using in case anyone else what's to give it ago. ** Attachment added: qemu-nbd-test.py https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+attachment/4356000/+files/qemu-nbd-test.py -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
** Changed in: qemu (Ubuntu) Importance: Undecided = High -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1435428] Re: vivid: systemd breaks qemu-nbd mounting
** Summary changed: - vivid: mounting with qemu-nbd fails + vivid: systemd breaks qemu-nbd mounting ** Description changed: On Trusty and Utopic, this works: $ sudo modprobe nbd $ sudo qemu-nbd --snapshot -c /dev/nbd0 my.qcow2 $ sudo mount /dev/nbd0p1 /mnt $ sudo umount /mnt But on Vivid, even though the mount command exits with 0, something goes awry and the mount point gets unmounted immediately. No files will actually be available, and umount will exit with 32 (umount: /mnt: not mounted). + + However, if I reboot using the Upstart grub entry (in Advanced options + for Ubuntu), this works on Vivid. + + I'm at a loss for how exactly systemd is interacting with qemu-nbd, but + somehow it is. Possibly useful bits from dmesg: [ 172.010766] kvm [2750]: vcpu0 disabled perfctr wrmsr: 0xc1 data 0x [ 208.379278] nbd0: p1 p2 p5 [ 208.395989] EXT4-fs (nbd0p1): mounted filesystem with ordered data mode. Opts: (null) [ 532.601057] block nbd0: NBD_DISCONNECT [ 532.601150] block nbd0: Receive control failed (result -32) [ 532.601177] block nbd0: queue cleared [ 671.892460] nbd0: p1 p2 p5 [ 697.575545] EXT4-fs (nbd0p1): mounted filesystem with ordered data mode. Opts: (null) [ 775.331402] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 793.632005] EXT4-fs (nbd0p1): mounted filesystem with ordered data mode. Opts: (null) ProblemType: Bug DistroRelease: Ubuntu 15.04 Package: qemu-utils 1:2.2+dfsg-5expubuntu8 ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1 Uname: Linux 3.19.0-9-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.16.2-0ubuntu4 Architecture: amd64 CurrentDesktop: Unity Date: Mon Mar 23 10:45:24 2015 KvmCmdLine: COMMAND STAT EUID RUID PID PPID %CPU COMMAND kvm-irqfd-clean S 0 0 486 2 0.0 [kvm-irqfd-clean] qemu-nbdSsl 0 0 3105 1618 0.0 qemu-nbd --snapshot -c /dev/nbd0 -t /home/tribble/vivid-server-amd64.qcow2 MachineType: Notebook P750ZM ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-9-generic root=UUID=db0af986-9e96-441e-a383-e5b3ba2e837b ro quiet splash SourcePackage: qemu UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev' UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 02/25/2015 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: 1.03.09aRSCC dmi.board.asset.tag: Tag 12345 dmi.board.name: P750ZM dmi.board.vendor: Notebook dmi.board.version: Not Applicable dmi.chassis.asset.tag: No Asset Tag dmi.chassis.type: 9 dmi.chassis.vendor: Notebook dmi.chassis.version: N/A dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1.03.09aRSCC:bd02/25/2015:svnNotebook:pnP750ZM:pvrNotApplicable:rvnNotebook:rnP750ZM:rvrNotApplicable:cvnNotebook:ct9:cvrN/A: dmi.product.name: P750ZM dmi.product.version: Not Applicable dmi.sys.vendor: Notebook ** Tags added: systemd-boot -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to qemu in Ubuntu. https://bugs.launchpad.net/bugs/1435428 Title: vivid: systemd breaks qemu-nbd mounting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1435428/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs