threefoldtech / 0-fs

A new filesystem for zero-os that leverage on unionfs and a thin fuse layer to get the files on demand
Apache License 2.0
0 stars 1 forks source link

re-mounting 0-fs twice using the same backend directory crashes in 0-OS #26

Closed zaibon closed 4 years ago

zaibon commented 4 years ago

I found this issue while working on https://github.com/threefoldtech/zos/issues/793

It seems when we mount 0-fs on the same backend directory after a node reboot. The second time the overlayfs is corrupted and returns IO errors.

To reproduce:

The same scenario doesn't give any error when tested on my laptop running arch with Linux 5.6.13-arch1-1

Here are some error from dmesg: https://gist.github.com/zaibon/7c89c908069005eac9b72afdafed7617

Like shown below, the read-only and read-write layer seems to be healthy. Only the mountpoint of the overlayfs gives issue.

/mnt/e811f02b-ba2d-4c3f-b164-9d4c50b9d73b/9200-1 # cat ro/etc/ssh/ssh_host_ed25519_key.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN5nZ/h+ZN8MfP8EaBY8s1zaskxpc4LhYIhilFYNXvR root@4b75be6da8df
/mnt/e811f02b-ba2d-4c3f-b164-9d4c50b9d73b/9200-1 # cat rw/etc/ssh/ssh_host_ed25519_key.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN5nZ/h+ZN8MfP8EaBY8s1zaskxpc4LhYIhilFYNXvR root@4b75be6da8df
/mnt/e811f02b-ba2d-4c3f-b164-9d4c50b9d73b/9200-1 # cat /var/cache/modules/flistd/mountpoint/9200-1/etc/ssh/ssh_host_ed25519_key.pub
cat: can't open '/var/cache/modules/flistd/mountpoint/9200-1/etc/ssh/ssh_host_ed25519_key.pub': Input/output error
zaibon commented 4 years ago

Found a bug report that seems to be related: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824407

zaibon commented 4 years ago

I start to wonder if the problem doesn't come from the flist I was using to test. I tried to reproduce using other flists and I cannot make it fail anymore.