[Kernel-packages] [Bug 1946686] Re: Fix zfs_get_data access to files with wrong generation causing panics

2021-10-20 Thread Andrew Berry
Thanks for your prompt work on this.

I enabled the proposed repository and have upgraded the zfs packages. As
this fix is in the zfs kernel module, I thought I would need to update
the kernel packages too:

```
$ dpkg-query -S /lib/modules/5.4.0-89-generic/kernel/zfs/zfs.ko
linux-modules-5.4.0-89-generic: /lib/modules/5.4.0-89-generic/kernel/zfs/zfs.ko
```

I upgraded to `linux-image-5.4.0-90-generic`, but the module version
looks to be old:

```
[4.366482] ZFS: Loaded module v0.8.3-1ubuntu12.12, ZFS pool version 5000, 
ZFS filesystem version 5

$ uname -r
5.4.0-90-generic
```

I would have expected that version to be `0.8.3-1ubuntu12.14`. Any
suggestions?

```
$ dpkg -l | grep zfs
ii  libzfs2linux 0.8.3-1ubuntu12.14
amd64OpenZFS filesystem library for Linux
ii  zfs-auto-snapshot1.2.4-2   
all  ZFS automatic snapshot service
ii  zfs-initramfs0.8.3-1ubuntu12.14
amd64OpenZFS root filesystem capabilities for Linux - initramfs
ii  zfs-zed  0.8.3-1ubuntu12.14
amd64OpenZFS Event Daemon
ii  zfsutils-linux   0.8.3-1ubuntu12.14
amd64command-line tools to manage OpenZFS filesystems
```

```
$ dpkg -l | grep linux- | grep -v '^rc'
ii  linux-base   4.5ubuntu3.6  
all  Linux image base package
ii  linux-firmware   1.187.19  
all  Firmware for Linux kernel drivers
ii  linux-image-5.4.0-88-generic 5.4.0-88.99   
amd64Signed kernel image generic
ii  linux-image-5.4.0-89-generic 5.4.0-89.100  
amd64Signed kernel image generic
ii  linux-image-5.4.0-90-generic 5.4.0-90.101  
amd64Signed kernel image generic
ii  linux-image-generic  5.4.0.89.93   
amd64Generic Linux kernel image
ii  linux-modules-5.4.0-88-generic   5.4.0-88.99   
amd64Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-5.4.0-89-generic   5.4.0-89.100  
amd64Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-5.4.0-90-generic   5.4.0-90.101  
amd64Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.4.0-88-generic 5.4.0-88.99   
amd64Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.4.0-89-generic 5.4.0-89.100  
amd64Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
```

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

Title:
  Fix zfs_get_data access to files with wrong generation causing panics

Status in zfs-linux package in Ubuntu:
  In Progress
Status in zfs-linux source package in Focal:
  Fix Committed
Status in zfs-linux source package in Hirsute:
  Fix Committed
Status in zfs-linux source package in Impish:
  Fix Released

Bug description:
  == SRU Focal/Hirsute ==

  [Impact]

  ZFS: Fix a panic while acquiring a lock.

  If TX_WRITE is create on a file, and the file is later deleted and a new
  directory is created on the same object id, it is possible that when
  zil_commit happens, zfs_get_data will be called on the new directory.
  This may result in panic as it tries to do range lock. 

  Upstream ZFS bug #10593, #11682, upstream fix:

  commit 296a4a369bc1078a694f88570972330985b3b1b8
  Author: Chunwei Chen 
  Date: Fri Mar 19 22:53:31 2021 -0700

  Fix zfs_get_data access to files with wrong generation

  This patch fixes this issue by record the generation number during
  zfs_log_write, so zfs_get_data can check if the object is valid.

  The fix is already in Ubuntu ZFS 2.0.6 in Impish. The fix is a
  relatively simple backport with only minor backporting effort required
  in moving some of the module specific upstream changes into the pre-
  renamed module specific os specific parts of the ZFS module.

  [Test Plan]

  This is difficult to reproduce, see
  https://github.com/openzfs/zfs/issues/10593

  The fix has been tested with the complete ubuntu autotest ZFS
  regression tests that exercise ZFS core functionality (smoke tests),
  file system POSIX compliance (fs tests), extra XFS tests and every
  mount option with stress-ng file I/O stress tests.

  [Where problems could occur]

  This fix could regress the ZIL (ZFS intent log) commit writes since it
  modifies this code to now checks for generation numbers. Testing with
  ZFS autotests with intent logs have not 

[Kernel-packages] [Bug 1946686] [NEW] Fix zfs_get_data access to files with wrong generation causing panics

2021-10-11 Thread Andrew Berry
Public bug reported:

As mentioned at https://answers.launchpad.net/ubuntu/+source/zfs-
linux/+question/696659, the following pull request fixes a panic
acquiring a lock: https://github.com/openzfs/zfs/pull/11682

This fix does not appear to be a part of the latest Ubuntu 20.04
release:

zfsutils-linux:
  Installed: 0.8.3-1ubuntu12.12
  Candidate: 0.8.3-1ubuntu12.12
  Version table:
 *** 0.8.3-1ubuntu12.12 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
100 /var/lib/dpkg/status
 0.8.3-1ubuntu12.9 500
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
 0.8.3-1ubuntu12 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

Of note is this issue where the bug is reported against the Ubuntu 0.8.3
packages: https://github.com/openzfs/zfs/issues/10642

** Affects: zfs-linux (Ubuntu)
 Importance: Undecided
 Status: New

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

Title:
  Fix zfs_get_data access to files with wrong generation causing panics

Status in zfs-linux package in Ubuntu:
  New

Bug description:
  As mentioned at https://answers.launchpad.net/ubuntu/+source/zfs-
  linux/+question/696659, the following pull request fixes a panic
  acquiring a lock: https://github.com/openzfs/zfs/pull/11682

  This fix does not appear to be a part of the latest Ubuntu 20.04
  release:

  zfsutils-linux:
Installed: 0.8.3-1ubuntu12.12
Candidate: 0.8.3-1ubuntu12.12
Version table:
   *** 0.8.3-1ubuntu12.12 500
  500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
  100 /var/lib/dpkg/status
   0.8.3-1ubuntu12.9 500
  500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
   0.8.3-1ubuntu12 500
  500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

  Of note is this issue where the bug is reported against the Ubuntu
  0.8.3 packages: https://github.com/openzfs/zfs/issues/10642

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1946686/+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


[Kernel-packages] [Bug 1423796] Re: Unable to mount lvmcache root device at boot time

2019-09-06 Thread Andrew Berry
This is still broken in Ubuntu 18.04.

-- 
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/1423796

Title:
  Unable to mount lvmcache root device at boot time

Status in initramfs-tools package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed
Status in lvm2 package in Ubuntu:
  Confirmed

Bug description:
  I'm experimenting with Vivid Vervet on a virtual machine and tried a
  new LVM feature, lvmcache. I made a cache for the root file system,
  rebuilt the initrd and rebooted the VM.

  At boot time, the system failed to activate the root LV. After some
  investigation, I found out, it's because the initrd is missing some
  essential stuff needed for activating a cached LV.

  The initrd was missing the dm-cache module. I regenerated the initrd
  with explicitly listing dm-cache in /etc/initramfs-tools/modules, but
  the system still can't boot up, because now it is missing the
  /usr/sbin/cache_check utility.

  As SSDs are becoming more and more common, I think it will be common
  to use them as cache for root file systems, thus it is mandatory to
  make sure that an initrd can mount an lvmcached root device when
  necessary, preferably without /etc/initramfs-tools/modules and other
  manual initrd hacking.

  System details:

  Linux lvmvm 3.18.0-13-generic #14-Ubuntu SMP Fri Feb 6 09:55:14 UTC
  2015 x86_64 x86_64 x86_64 GNU/Linux

  Distributor ID:   Ubuntu
  Description:  Ubuntu Vivid Vervet (development branch)
  Release:  15.04
  Codename: vivid

  LVM version: 2.02.111(2) (2014-09-01)
  Library version: 1.02.90 (2014-09-01)
  Driver version:  4.28.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1423796/+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