Re: failed open: No data available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > and 'grep Y /sys/module/overlay/parameters/*'
> >
> > /sys/module/overlay/parameters/redirect_always_follow:Y
> > /sys/module/overlay/parameters/xino_auto:Y

That's likely the reason that you are affected.
If you do not need the xino feature, you can set this to N or mount with
xino=off your system should be good.

As the commit a888db3101 message says:

    To avoid the reported regression while still allowing the new features
    with single lower squashfs, do not allow decoding origin with lower null
    uuid unless user opted-in to one of the new features that require
    following the lower inode of non-dir upper (index, xino, metacopy).

You or someone related to your distro opted-in to xino by
CONFIG_OVERLAY_FS_XINO_AUTO=y

which is smart to do IMO, but it probably exposed a bug.

I still do not understand what the bug is, but please try the workaround.

> >
> > >
> > > Do you see any "overlayfs:" logs in kmsg?
> >
> > [    4.828299] overlayfs: "xino" feature enabled using 32 upper inode bits.
> >
> > >
> > > If you do not need nfs export, you could try to create squashfs image with
> > > -no-exports as a possible workaround.
> >
> > If the problem persists, I will try that.  I'm not exporting anything
> > from the overlay.
>
> Ok, I can reproduce the problem 100% of the time using the attached
> squashfs image in 5.9 or 5.10.  In 5.8.18 and 5.4.83, everything works
> just fine.
>
>  mkdir -p t tt ttt
>  mount borky2.sqsh t
>  mount -t tmpfs tmp tt
>  mkdir -p tt/upper/{upper,work}
>  mount -t overlay -o \
>     lowerdir=t,upperdir=tt/upper/upper,workdir=tt/upper/work blarg ttt
> [ 1685.825956] overlayfs: "xino" feature enabled using 2 upper inode bits.
>
>  echo hello there > ttt/FOO
> zsh: no data available: ttt/FOO
>
>  echo hello there > ttt/BAR
> for some reason, that file is editable
>
>  touch ttt/*
> touch: cannot touch 'ttt/BAZ': No data available
> touch: cannot touch 'ttt/FOO': No data available
> touch: cannot touch 'ttt/FOO-symlink': No data available
>
> Things look completely broken now that I'm looking this closely at a
> fresh overlay... I'm honestly surprised my system was usable at all.
> I guess most of the files on my lower layer had already been
> upgraded prior to me starting to use the 5.9 kernel.
>
> I also tried creating a squashfs file w/ -no-exports...  exact same results.
>
> In case it helps, here are the relevant kernel config items:
>
> CONFIG_OVERLAY_FS=y
> # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
> CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
> # CONFIG_OVERLAY_FS_INDEX is not set
> CONFIG_OVERLAY_FS_XINO_AUTO=y
> # CONFIG_OVERLAY_FS_METACOPY is not set
>
> CONFIG_SQUASHFS=y
> # CONFIG_SQUASHFS_FILE_CACHE is not set
> CONFIG_SQUASHFS_FILE_DIRECT=y
> # CONFIG_SQUASHFS_DECOMP_SINGLE is not set
> # CONFIG_SQUASHFS_DECOMP_MULTI is not set
> CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
> CONFIG_SQUASHFS_XATTR=y
> CONFIG_SQUASHFS_ZLIB=y
> CONFIG_SQUASHFS_LZ4=y
> CONFIG_SQUASHFS_LZO=y
> CONFIG_SQUASHFS_XZ=y
> CONFIG_SQUASHFS_ZSTD=y
> # CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
> # CONFIG_SQUASHFS_EMBEDDED is not set
> CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
>

Thanks for the reproducer and all the info, but it does not reproduce
on my test machine with v5.10.0.
I even changed my kernel config to match yours.

So I am going to have to ask you to debug this and figure out which
overlayfs execution path is responsible for the error.

First thing in order is to get an strace to see which system call is
failing and try to enable overlayfs debug prints with:
echo "file fs/overlayfs/*  +p" > /sys/kernel/debug/dynamic_debug/control

If that is not enough to pin point the problem, will need to ask you do
add debug prints in overlayfs code to understand the path of failure.

Thanks,
Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux