Dear friends,

Right now I'm on the way to understand what's happening with this.

# strace touch b
execve("/usr/bin/touch", ["touch", "b"], 0x7ffd29f848a8 /* 7 vars */) = 0
brk(NULL)                               = 0x56007dba6000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff436afcb0) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f6bb5d2d000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
<...>
openat(AT_FDCWD, "b", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 
EOVERFLOW (Value too large for defined data type)

From ftrace/perf trace:
  877.582556 |   0)               |  /* do_sys_openat2__return: 
(__x64_sys_openat+0x55/0x90 <- do_sys_openat2) arg1=0xffffffffffffffb5 */

0xffffffffffffffb5 it's 2's complement of -EOVERFLOW error

I've finally traced it to:
static inline int may_create(struct user_namespace *mnt_userns,
                             struct inode *dir, struct dentry *child)
{
        audit_inode_child(dir, child, AUDIT_TYPE_CHILD_CREATE);
        if (child->d_inode)
                return -EEXIST;
        if (IS_DEADDIR(dir))
                return -ENOENT;
        if (!fsuidgid_has_mapping(dir->i_sb, mnt_userns))
                return -EOVERFLOW; // <<< looks like error comes from here

My suspicion is that the problem is caused by these two changes, which are 
potentially incompatible with shiftfs:
+    - fs: tweak fsuidgid_has_mapping()
+    - fs: support mapped mounts of mapped filesystems
(changelog from 
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/commit/?h=Ubuntu-5.15.0-48.54&id=941bdeb5ab2258758fce5f4d06296da98bfa7e82)

Will continue investigation.

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

Title:
  LXD containers using shiftfs on ZFS or TMPFS broken on 5.15.0-48.54

Status in linux package in Ubuntu:
  Confirmed
Status in zfs-linux package in Ubuntu:
  Confirmed

Bug description:
  Since 5.15.0-48.54 LXD containers using shiftfs ontop of ZFS or TMPFS
  are broken.

  Reproducer steps:

  ```
  sudo snap install lxd
  sudo snap set lxd shiftfs.enable=true
  sudo lxd init --auto
  lxc storage create zfs zfs
  lxc launch images:ubuntu/jammy c1 -s zfs
  lxc exec c1 -- touch /root/foo
  touch: cannot touch '/root/foo': Value too large for defined data type
  ```

  Expected result can be achieved by disabling shiftfs:

  ```
  sudo snap set lxd shiftfs.enable=false
  sudo systemctl reload snap.lxd.daemon
  lxc launch images:ubuntu/jammy c2 -s zfs
  lxc exec c2 -- touch /root/foo
  lxc exec c2 -- ls -la /root/foo
  -rw-r--r-- 1 root root 0 Sep 26 14:00 /root/foo
  ```

  Kernel 5.15.0-47-generic does not exhibit this issue.

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: linux-image-5.15.0-48-generic 5.15.0-48.54
  ProcVersionSignature: Ubuntu 5.15.0-48.54-generic 5.15.53
  Uname: Linux 5.15.0-48-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu82.1
  Architecture: amd64
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC0:  user       2240 F.... pulseaudio
  CasperMD5CheckResult: pass
  CurrentDesktop: ubuntu:GNOME
  Date: Mon Sep 26 14:55:52 2022
  InstallationDate: Installed on 2022-03-04 (205 days ago)
  InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220228)
  MachineType: LENOVO 20R1000RUS
  ProcFB: 0 i915drmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-48-generic 
root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
  RelatedPackageVersions:
   linux-restricted-modules-5.15.0-48-generic N/A
   linux-backports-modules-5.15.0-48-generic  N/A
   linux-firmware                             20220329.git681281e4-0ubuntu3.5
  RfKill:
   0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 04/15/2021
  dmi.bios.release: 1.34
  dmi.bios.vendor: LENOVO
  dmi.bios.version: N2QET40W(1.34 )
  dmi.board.asset.tag: Not Available
  dmi.board.name: 20R1000RUS
  dmi.board.vendor: LENOVO
  dmi.board.version: SDK0J40697 WIN
  dmi.chassis.asset.tag: No Asset Information
  dmi.chassis.type: 10
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: None
  dmi.ec.firmware.release: 1.15
  dmi.modalias: 
dmi:bvnLENOVO:bvrN2QET40W(1.34):bd04/15/2021:br1.34:efr1.15:svnLENOVO:pn20R1000RUS:pvrThinkPadX1Carbon7th:rvnLENOVO:rn20R1000RUS:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrNone:skuLENOVO_MT_20R1_BU_Think_FM_ThinkPadX1Carbon7th:
  dmi.product.family: ThinkPad X1 Carbon 7th
  dmi.product.name: 20R1000RUS
  dmi.product.sku: LENOVO_MT_20R1_BU_Think_FM_ThinkPad X1 Carbon 7th
  dmi.product.version: ThinkPad X1 Carbon 7th
  dmi.sys.vendor: LENOVO

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