multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Can not remove newly created symbolic link

Open fderepas opened this issue 9 months ago • 1 comments

Describe the bug First a symbolic link is created on host machine from a Multipass instance in a mounted volume. The link works perfectly. Buy when trying to remove the symlink with "sudo rm -rf", the following error appears: rm: cannot remove 'my_symlink_name': Value too large for defined data type

To Reproduce

To reproduce on ubuntu simply execute the following shell script

#!/bin/bash
# remove multipass instances foo if any
if [ `multipass list | cut -d ' ' -f 1 | grep ^foo$ | wc -l` -eq 1 ]; then
    multipass delete -p foo
fi

multipass launch --name foo
multipass exec foo -- mkdir my_dir
multipass mount $PWD foo:/home/ubuntu/my_dir
multipass exec foo -- ln -s /home/ubuntu/snap /home/ubuntu/my_dir/snap
# symlink works ok:
multipass exec foo -- ls -la /home/ubuntu/my_dir/snap
# impossible to remove the newly created symlink
multipass exec foo -- sudo rm -rf /home/ubuntu/my_dir/snap

Expected behavior I would expect "rm" or "sudo rm -rf" to remove the created symlink.

Logs

Apr 04 14:48:55 x13 multipassd[2205]: Deleting instance: foo
Apr 04 14:48:55 x13 multipassd[2205]: Executing 'findmnt --type fuse.sshfs | grep -E '^/home/ubuntu/my_dir +:/home/fabrice/foo''
Apr 04 14:48:56 x13 multipassd[2205]: Stopping mount "/home/ubuntu/my_dir" in instance 'foo'
Apr 04 14:48:56 x13 multipassd[2205]: Mount "/home/ubuntu/my_dir" in instance 'foo' has stopped
Apr 04 14:48:56 x13 multipassd[2205]: Forcing shutdown
Apr 04 14:48:56 x13 multipassd[2205]: Killing process
Apr 04 14:48:56 x13 multipassd[2205]: process state changed to NotRunning
Apr 04 14:48:56 x13 multipassd[2205]: process error occurred Crashed program: qemu-system-x86_64; error: Process crashed
Apr 04 14:48:56 x13 multipassd[2205]: error: program: qemu-system-x86_64; error: Process crashed
Apr 04 14:48:56 x13 multipassd[2205]: Dropping cached SSH session
Apr 04 14:48:56 x13 multipassd[2205]: Applied AppArmor policy: multipass.qemu-img
Apr 04 14:48:56 x13 multipassd[2205]: [333115] started: qemu-img snapshot -l /var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img
Apr 04 14:48:56 x13 dnsmasq-dhcp[2483]: DHCPRELEASE(mpqemubr0) 10.215.18.26 52:54:00:f5:95:f2
Apr 04 14:48:56 x13 multipassd[2205]: Instance purged: foo
Apr 04 14:48:57 x13 multipassd[2205]: Loading "anbox-cloud-appliance" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "charm-dev" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "docker" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "jellyfin" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "minikube" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "ros2-humble" v1
Apr 04 14:48:57 x13 multipassd[2205]: Loading "ros2-jazzy" v1
Apr 04 14:48:57 x13 multipassd[2205]: [333201] started: qemu-system-x86_64 --version
Apr 04 14:48:58 x13 multipassd[2205]: Applied AppArmor policy: multipass.qemu-img
Apr 04 14:48:58 x13 multipassd[2205]: [333222] started: qemu-img info /var/snap/multipass/common/cache/multipassd/vault/images/noble-20250403/ubuntu-24.04-server-cloudimg-amd64.img
Apr 04 14:48:58 x13 multipassd[2205]: Applied AppArmor policy: multipass.qemu-img
Apr 04 14:48:58 x13 multipassd[2205]: [333230] started: qemu-img resize /var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img 5368709120
Apr 04 14:48:58 x13 multipassd[2205]: Applied AppArmor policy: multipass.qemu-img
Apr 04 14:48:58 x13 multipassd[2205]: [333237] started: qemu-img snapshot -l /var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img
Apr 04 14:48:58 x13 multipassd[2205]: Applied AppArmor policy: multipass.qemu-img
Apr 04 14:48:58 x13 multipassd[2205]: [333258] started: qemu-img amend -o compat=1.1 /var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img
Apr 04 14:48:59 x13 multipassd[2205]: process working dir '/snap/multipass/14485/qemu'
Apr 04 14:48:59 x13 multipassd[2205]: process program 'qemu-system-x86_64'
Apr 04 14:48:59 x13 multipassd[2205]: process arguments '-bios, OVMF.fd, --enable-kvm, -cpu, host, -nic, tap,ifname=tap-85a8e535edf,script=no,downscript=no,model=virtio-net-pci,mac=52:54:00:95:0d:d6, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img,if=none,format=qcow2,discard=unmap,id=hda, -device, scsi-hd,drive=hda,bus=scsi0.0, -smp, 1, -m, 1024M, -qmp, stdio, -chardev, null,id=char0, -serial, chardev:char0, -nographic, -cdrom, /var/snap/multipass/common/data/multipassd/vault/instances/foo/cloud-init-config.iso'
Apr 04 14:48:59 x13 multipassd[2205]: [333276] started: qemu-system-x86_64 -nographic -dump-vmstate /tmp/multipassd.gPZQit
Apr 04 14:48:59 x13 multipassd[2205]: Applied AppArmor policy: multipass.foo.qemu-system-x86_64
Apr 04 14:48:59 x13 multipassd[2205]: process state changed to Starting
Apr 04 14:48:59 x13 multipassd[2205]: process state changed to Running
Apr 04 14:48:59 x13 multipassd[2205]: [333278] started: qemu-system-x86_64 -bios OVMF.fd --enable-kvm -cpu host -nic tap,ifname=tap-85a8e535edf,script=no,downscript=no,model=virtio-net-pci,mac=52:54:00:95:0d:d6 -device virtio-scsi-pci,id=scsi0 -drive file=/var/snap/multipass/common/data/multipassd/vault/instances/foo/ubuntu-24.04-server-cloudimg-amd64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 1 -m 1024M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/snap/multipass/common/data/multipassd/vault/instances/foo/cloud-init-config.iso
Apr 04 14:48:59 x13 multipassd[2205]: process started
Apr 04 14:48:59 x13 multipassd[2205]: Waiting for SSH to be up
Apr 04 14:48:59 x13 multipassd[2205]: QMP: {"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 8}, "package": ""}, "capabilities": ["oob"]}}
Apr 04 14:48:59 x13 multipassd[2205]: QMP: {"return": {}}
Apr 04 14:49:01 x13 multipassd[2205]: QMP: {"timestamp": {"seconds": 1743770941, "microseconds": 315688}, "event": "RTC_CHANGE", "data": {"offset": -1, "qom-path": "/machine/unattached/device[4]/rtc"}}
Apr 04 14:49:02 x13 multipassd[2205]: QMP: {"timestamp": {"seconds": 1743770941, "microseconds": 346086}, "event": "RTC_CHANGE", "data": {"offset": -1, "qom-path": "/machine/unattached/device[4]/rtc"}}
Apr 04 14:49:13 x13 multipassd[2205]: QMP: {"timestamp": {"seconds": 1743770953, "microseconds": 606024}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unattached/device[22]/virtio-backend"}}
Apr 04 14:49:16 x13 dnsmasq-dhcp[2483]: DHCPDISCOVER(mpqemubr0) 52:54:00:95:0d:d6
Apr 04 14:49:16 x13 dnsmasq-dhcp[2483]: DHCPOFFER(mpqemubr0) 10.215.18.246 52:54:00:95:0d:d6
Apr 04 14:49:16 x13 dnsmasq-dhcp[2483]: DHCPREQUEST(mpqemubr0) 10.215.18.246 52:54:00:95:0d:d6
Apr 04 14:49:16 x13 dnsmasq-dhcp[2483]: DHCPACK(mpqemubr0) 10.215.18.246 52:54:00:95:0d:d6 foo
Apr 04 14:49:21 x13 multipassd[2205]: Caching initial SSH session
Apr 04 14:49:21 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:22 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:23 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:23 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:24 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:24 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:25 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:25 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:26 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:26 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:27 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:27 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:28 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:28 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:29 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:29 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:30 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:30 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:31 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:31 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:32 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:32 x13 multipassd[2205]: failed to run '[ -e /var/lib/cloud/instance/boot-finished ]', error message: ''
Apr 04 14:49:33 x13 multipassd[2205]: Executing '[ -e /var/lib/cloud/instance/boot-finished ]'
Apr 04 14:49:34 x13 multipassd[2205]: initializing mount /home/fabrice/foo => /home/ubuntu/my_dir in 'foo'
Apr 04 14:49:34 x13 multipassd[2205]: Executing 'which snap'
Apr 04 14:49:34 x13 multipassd[2205]: Executing 'sudo snap list multipass-sshfs'
Apr 04 14:49:35 x13 multipassd[2205]: Executing '[ -e /snap ]'
Apr 04 14:49:35 x13 multipassd[2205]: Installing the multipass-sshfs snap in 'foo'
Apr 04 14:49:35 x13 multipassd[2205]: Executing 'sudo snap install multipass-sshfs'
Apr 04 14:49:45 x13 multipassd[2205]: process program '/snap/multipass/14485/bin/sshfs_server'
Apr 04 14:49:45 x13 multipassd[2205]: process arguments '10.215.18.246, 22, ubuntu, /home/fabrice/foo, /home/ubuntu/my_dir, 1000:-1,, 1000:-1,, 3'
Apr 04 14:49:45 x13 multipassd[2205]: Applied AppArmor policy: multipass.foo.24a5bc20.sshfs_server
Apr 04 14:49:46 x13 sshfs_server[334131]: /build/multipass/parts/multipass/src/src/sshfs_mount/sshfs_mount.cpp:123 make_sftp_server(source = /home/fabrice/foo, target = /home/ubuntu/my_dir, …):
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'snap run multipass-sshfs.env'
Apr 04 14:49:46 x13 multipassd[2205]: [334131] started: /snap/multipass/14485/bin/sshfs_server 10.215.18.246 22 ubuntu /home/fabrice/foo /home/ubuntu/my_dir 1000:-1, 1000:-1, 3
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'sudo env LD_LIBRARY_PATH=/snap/multipass-sshfs/145/lib /snap/multipass-sshfs/145/bin/sshfs -V'
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'sudo /bin/bash -c 'P="/home/ubuntu/my_dir"; while [ ! -d "$P/" ]; do P="${P%/*}"; done; echo $P/''
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'id -u'
Apr 04 14:49:46 x13 sshfs_server[334131]: /build/multipass/parts/multipass/src/src/sshfs_mount/sshfs_mount.cpp:132 make_sftp_server(): `id -u` = 1000
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'id -g'
Apr 04 14:49:46 x13 sshfs_server[334131]: /build/multipass/parts/multipass/src/src/sshfs_mount/sshfs_mount.cpp:137 make_sftp_server(): `id -g` = 1000
Apr 04 14:49:46 x13 sshfs_server[334131]: Executing 'sudo env LD_LIBRARY_PATH=/snap/multipass-sshfs/145/lib /snap/multipass-sshfs/145/bin/sshfs -o slave -o transform_symlinks -o allow_other -o Compression=no -o dir_cache=no :"/home/fabrice/foo" "/home/ubuntu/my_dir/."'
Apr 04 14:49:46 x13 multipassd[2205]: QMP: {"timestamp": {"seconds": 1743770986, "microseconds": 891828}, "event": "RTC_CHANGE", "data": {"offset": 0, "qom-path": "/machine/unattached/device[4]/rtc"}}

Additional info

  • OS: Linux x13 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

  • CPU architecture or model: x86

  • multipass version multipass 1.15.1

  • multipass info Name: foo State: Running Snapshots: 0 IPv4: 10.215.18.26 Release: Ubuntu 24.04.2 LTS Image hash: 071fceadf1ea (Ubuntu 24.04 LTS) CPU(s): 1 Load: 0.07 0.18 0.09 Disk usage: 1.9GiB out of 4.8GiB Memory usage: 305.8MiB out of 956.0MiB Mounts: /home/xxx/foo => /home/ubuntu/my_dir UID map: 1000:default GID map: 1000:default

  • multipass get local.driver qemu

fderepas avatar Apr 04 '25 12:04 fderepas

Hi @fderepas,

Thank you for bringing this to our attention. I’ve been able to reproduce the issue on the latest main as well with the provided script and encountered the same error message. We're currently looking into the root cause of this and will work on resolving it as quickly as possible.

levkropp avatar Apr 07 '25 12:04 levkropp