[Bug 272182] [virtio-9p] git clone doesn't work from guest on virtio-9p shared file system

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 24 Jun 2023 15:02:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272182

            Bug ID: 272182
           Summary: [virtio-9p] git clone doesn't work from guest on
                    virtio-9p shared file system
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: m.viey@wanadoo.fr

I guess it comes with virtio-9p but maybe I am wrong. But I don't think it
comes from the guest.

STEP TO REPRODUCE (tested with debian 10 guest)

run a vm with virtio-9p sharing:

sudo bhyve -A -H -P -s 0:0,hostbridge \
    -s 1:0,lpc \
    -s 2:0,virtio-net,tap0 \
    -s 3:0,virtio-blk,/dev/zvol/data/linuxdisk0 \
    -s 15,virtio-9p,sharename=/home/mik/Dev \
    -l com1,stdio \
    -c 4 -m 4096M linuxdev


from the guest mount the fs:

mount -t 9p -w -o trans=virtio -o version=9p2000.u sharename /root/host

then:

cd ~/host

root@debian:~/host# git clone https://github.com/grehan-freebsd/grub2-bhyve.git
Cloning into 'grub2-bhyve'...
remote: Enumerating objects: 2013, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 2013 (delta 1), reused 2 (delta 1), pack-reused 2004
Receiving objects: 100% (2013/2013), 8.27 MiB | 8.32 MiB/s, done.
Resolving deltas: 100% (598/598), done.
error: index file
/root/host/grub2-bhyve/.git/objects/pack/pack-4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx
is too small
error: index file
/root/host/grub2-bhyve/.git/objects/pack/pack-4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx
is too small
error: index file
/root/host/grub2-bhyve/.git/objects/pack/pack-4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx
is too small
error: index file
/root/host/grub2-bhyve/.git/objects/pack/pack-4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx
is too small

...

4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx is too small
error: index file
/root/host/grub2-bhyve/.git/objects/pack/pack-4cb7b9db9e6119d1bee75527e6a9d91e82d67df0.idx
is too small
fatal: bad object a2a1a8f716a00a8f42b36a8b91ac5b3e2328d39c
fatal: remote did not send all necessary objects
root@debian:~/host# git clone https://github.com/freebsd/freebsd-src.git
Cloning into 'freebsd-src'...
remote: Enumerating objects: 4850989, done.
remote: Counting objects: 100% (472/472), done.
remote: Compressing objects: 100% (268/268), done.
remote: Total 4850989 (delta 210), reused 397 (delta 195), pack-reused 4850517
Receiving objects: 100% (4850989/4850989), 2.62 GiB | 19.55 MiB/s, done.
Resolving deltas: 100% (3318931/3318931), done.
error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small
error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small
error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small

...

error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small
error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small
error: index file
/root/host/freebsd-src/.git/objects/pack/pack-f1360eef024eaa91d66af5d169a7fe0dde7b661d.idx
is too small
fatal: remote did not send all necessary objects
root@debian:~/host#

-- 
You are receiving this mail because:
You are the assignee for the bug.