attached patch with fix tested with 4.4.0-45.66

note that instead of hardcoding the patched variant of lookup_bdev, it
might make sense to adapt the zfs automake files to autodetect and
handle both one parameter and two parameter variants?

that way, all three variations of building the zfs module would work:

dkms source with either an Ubuntu or upstream kernel
Ubuntu kernel with zfs module source in module/zfs/

** Patch added: "zfs-fix-zpool-import-bug-with-nested-pools.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1636517/+attachment/4767015/+files/zfs-fix-zpool-import-bug-with-nested-pools.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1636517

Title:
  zfs: importing zpool with vdev on zvol hangs kernel

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  if a zvol of an existing, already imported zpool is a vdev of another
  zpool, a call to "zpool import" will everything zfs related. the stack
  trace is as follows:

  [<ffffffffc038d374>] taskq_wait+0x74/0xe0 [spl]
  [<ffffffffc038d42b>] taskq_destroy+0x4b/0x100 [spl]
  [<ffffffffc04a4afd>] vdev_open_children+0x12d/0x180 [zfs]
  [<ffffffffc04ae6cc>] vdev_root_open+0x3c/0xc0 [zfs]
  [<ffffffffc04a45f5>] vdev_open+0xf5/0x4d0 [zfs]
  [<ffffffffc048f11e>] spa_load+0x39e/0x1c60 [zfs]
  [<ffffffffc049170d>] spa_tryimport+0xad/0x450 [zfs]
  [<ffffffffc04c42d4>] zfs_ioc_pool_tryimport+0x64/0xa0 [zfs]
  [<ffffffffc04c770b>] zfsdev_ioctl+0x44b/0x4e0 [zfs]
  [<ffffffff8122124f>] do_vfs_ioctl+0x29f/0x490
  [<ffffffff812214b9>] SyS_ioctl+0x79/0x90
  [<ffffffff818318b2>] entry_SYSCALL_64_fastpath+0x16/0x71
  [<ffffffffffffffff>] 0xffffffffffffffff

  I traced this back to 193fb6a2c94fab8eb8ce70a5da4d21c7d4023bee (merged
  in 4.4.0-6.21), which added a second parameter to lookup_bdev without
  patching the zfs module (which needs to special case the vdev-on-zvol
  case, and uses this exact method only in this special casing code
  path).

  attached you can find the output of "zfs send -R" ing such a zvol
  ("brokenvol.raw"), running "zfs receive POOL/TARGET < FILE" followed
  by "zpool import" should reproduce the hang.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.4.0-45-generic 4.4.0-45.66
  ProcVersionSignature: Ubuntu 4.4.0-45.66-generic 4.4.21
  Uname: Linux 4.4.0-45-generic x86_64
  NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
  AlsaDevices:
   total 0
   crw-rw---- 1 root audio 116,  1 Oct 25 15:46 seq
   crw-rw---- 1 root audio 116, 33 Oct 25 15:46 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
  ApportVersion: 2.20.1-0ubuntu2.1
  Architecture: amd64
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
  Date: Tue Oct 25 15:49:51 2016
  HibernationDevice: RESUME=/dev/mapper/xenial--vg-swap_1
  InstallationDate: Installed on 2016-10-25 (0 days ago)
  InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160719)
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
  Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
  PciMultimedia:
   
  ProcFB: 0 qxldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-45-generic 
root=/dev/mapper/hostname--vg-root ro
  RelatedPackageVersions:
   linux-restricted-modules-4.4.0-45-generic N/A
   linux-backports-modules-4.4.0-45-generic  N/A
   linux-firmware                            1.157.4
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 04/01/2014
  dmi.bios.vendor: SeaBIOS
  dmi.bios.version: rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org
  dmi.chassis.type: 1
  dmi.chassis.vendor: QEMU
  dmi.chassis.version: pc-i440fx-2.7
  dmi.modalias: 
dmi:bvnSeaBIOS:bvrrel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-2.7:cvnQEMU:ct1:cvrpc-i440fx-2.7:
  dmi.product.name: Standard PC (i440FX + PIIX, 1996)
  dmi.product.version: pc-i440fx-2.7
  dmi.sys.vendor: QEMU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1636517/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to