-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refreshing BTRFS backed instances is causing a segfault #13085
Comments
Strange its not failing the main test suite? |
There is a potential fix upstream which isn't yet merged but I can confirm the error cannot be reproduced when Btrfs is built from kdave/btrfs-progs#643. |
I've for a fix in the works for snapshot cleanup too |
Do u think this ever worked and is a regression in the btrfs tooling? |
Ah seems like its caused by certain content inside the instance kdave/btrfs-progs#606 (comment) |
Yeah this also raised my attention. What I am wondering is what might cause a write in our case as we are freezing the FS. |
So it looks to be that this has started failing from In the snap we currently use the |
Any ideas why our main test suite doesn't experience this? Is it because its using a busybox image rather than ubuntu? |
Hopefully it'll be fixed when we switch to core24 |
Interesting idea, I have just tried it several times and I can say it consistently doesn't happen for the busybox image: julian@thinkpad:~/dev/lxd/test/deps$ lxc launch 7c18be75dd3c c1 -s b # 7c18be75dd3c is busybox
Creating c1
Starting c1
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2
julian@thinkpad:~/dev/lxd/test/deps$ lxc snapshot c1
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c1 c2 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc launch ubuntu:jammy c3 -s b
Creating c3
Starting c3
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c3 c4
julian@thinkpad:~/dev/lxd/test/deps$ lxc snapshot c3
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c3 c4 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c3 c4 --refresh
Error: Refresh instance: Failed BTRFS receive: signal: segmentation fault (core dumped) (ERROR: clone: did not find source subvol)
julian@thinkpad:~/dev/lxd/test/deps$
julian@thinkpad:~/dev/lxd/test/deps$
julian@thinkpad:~/dev/lxd/test/deps$ lxc launch 7c18be75dd3c c5 -s b
Creating c5
Starting c5
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c5 c6
julian@thinkpad:~/dev/lxd/test/deps$ lxc snapshot c5
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c5 c6 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c5 c6 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c5 c6 --refresh
julian@thinkpad:~/dev/lxd/test/deps$ lxc cp c5 c6 --refresh
julian@thinkpad:~/dev/lxd/test/deps$
|
Right so it appears to be due to the contents of the ubuntu image then (as well as the btrfs bug itself). |
This is related to the bug canonical/lxd#13085. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
This is related to the bug canonical/lxd#13085. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
When refreshing Btrfs backed instances the command hangs infinitely and doesn't return. The affected LXD versions are both
latest/edge
and5.0/edge
.The error is caused in https://github.com/canonical/lxd/blob/main/lxd/storage/drivers/driver_btrfs_volumes.go#L882 when running the
btrfs receive
command.This was first discovered in canonical/lxd-ci#101.
Steps to reproduce
The same is happening for containers. If the source container is stopped it doesn't occur. For VMs it doesn't matter if the VM is running or stopped.
The text was updated successfully, but these errors were encountered: