Bug 1870048
| Summary: | virtio-fs: failed to boot up one vm if try to boot up two vms simultaneously to share the same directory on the host | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | xiagao | ||||
| Component: | qemu-kvm | Assignee: | Hanna Czenczek <hreitz> | ||||
| qemu-kvm sub component: | virtio-fs | QA Contact: | xiagao | ||||
| Status: | CLOSED NOTABUG | Docs Contact: | |||||
| Severity: | medium | ||||||
| Priority: | medium | CC: | dgilbert, drjones, kkiwi, lijin, virt-maint, xiagao | ||||
| Version: | unspecified | Keywords: | Regression, Triaged | ||||
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-01-19 08:35:34 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1897025 | ||||||
| Attachments: |
|
||||||
|
Description
xiagao
2020-08-19 09:30:41 UTC
Run 80 times with qemu-kvm-4.2.0-29.module+el8.2.1+7668+93a32c6b.1.x86_64, all pass. So it's a regression. Hit a similar issue with virtio-fs device. 1) boot up vm with file-backed memory. virtiofsd daemon: # /usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu1 -o source=/home/virtiofs_test1 -o cache=always -d qemu-cmd line: -m 4G -smp 4,maxcpus=12,cores=4,threads=1,sockets=3 -chardev socket,id=char0,path=/tmp/vhostqemu1 \ -device vhost-user-fs-pci,chardev=char0,tag=myfs_11,bus=pci.11 \ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm1,share=on \ -numa node,memdev=mem \ 2)shutdown this vm and start it again with step1, but it failed. (qemu) qemu-kvm: -device ide-drive,bus=ide.0,unit=0,drive=drive_system_disk,id=ide0-0-0: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead qemu-kvm: -device ide-drive,drive=drive-ide0-1-0,id=ide0-1-0,serial=GAGENT_TEST: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead error: kvm run failed Bad address EAX=00000000 EBX=00000000 ECX=00000010 EDX=000efced ESI=00000000 EDI=00000000 EBP=00000000 ESP=00007000 EIP=000efced EFL=00010006 [-----P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy GDT= 000f6200 00000037 IDT= 000f623e 00000000 CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=47 d0 0f 00 0f b7 d2 8d 44 24 02 e8 46 c4 ff ff 83 c4 28 c3 <53> 83 ec 20 e8 38 c8 ff ff bb 00 00 00 40 8d 44 24 0c 50 8d 44 24 0c 50 8d 4c 24 0c 8d 54 3)change mem-path to another dir, vm still couldn't boot up. -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm2,share=on \ qemu-kvm-5.1.0-7.module+el8.3.0+8099+dba2fe3e.x86_64(In reply to xiagao from comment #2) > Hit a similar issue with virtio-fs device. > 1) boot up vm with file-backed memory. > virtiofsd daemon: > # /usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu1 -o > source=/home/virtiofs_test1 -o cache=always -d > qemu-cmd line: > -m 4G -smp 4,maxcpus=12,cores=4,threads=1,sockets=3 > -chardev socket,id=char0,path=/tmp/vhostqemu1 \ > -device vhost-user-fs-pci,chardev=char0,tag=myfs_11,bus=pci.11 \ > -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm1,share=on \ > -numa node,memdev=mem \ > > 2)shutdown this vm and start it again with step1, but it failed. > (qemu) qemu-kvm: -device > ide-drive,bus=ide.0,unit=0,drive=drive_system_disk,id=ide0-0-0: warning: > 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead > qemu-kvm: -device > ide-drive,drive=drive-ide0-1-0,id=ide0-1-0,serial=GAGENT_TEST: warning: > 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead > error: kvm run failed Bad address > EAX=00000000 EBX=00000000 ECX=00000010 EDX=000efced > ESI=00000000 EDI=00000000 EBP=00000000 ESP=00007000 > EIP=000efced EFL=00010006 [-----P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] > SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= 000f6200 00000037 > IDT= 000f623e 00000000 > CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 > DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=47 d0 0f 00 0f b7 d2 8d 44 24 02 e8 46 c4 ff ff 83 c4 28 c3 <53> 83 ec > 20 e8 38 c8 ff ff bb 00 00 00 40 8d 44 24 0c 50 8d 44 24 0c 50 8d 4c 24 0c > 8d 54 > > 3)change mem-path to another dir, vm still couldn't boot up. > -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm2,share=on \ pkg: qemu-kvm-5.1.0-7.module+el8.3.0+8099+dba2fe3e.x86_64 kernel-4.18.0-236.el8.x86_64 seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch How big is your host memory and the /dev/shm's ? I think you're just running out of RAM. (In reply to Dr. David Alan Gilbert from comment #4) > How big is your host memory and the /dev/shm's ? I think you're just running > out of RAM. [root@dell-per730-47 dev]# cat /proc/meminfo MemTotal: 32623152 kB [root@dell-per730-47 dev]# ll -lh shm1 -rw-r--r-- 1 root root 4.0G Sep 27 03:27 shm1 (In reply to xiagao from comment #5) > (In reply to Dr. David Alan Gilbert from comment #4) > > How big is your host memory and the /dev/shm's ? I think you're just running > > out of RAM. > > [root@dell-per730-47 dev]# cat /proc/meminfo > MemTotal: 32623152 kB > > [root@dell-per730-47 dev]# ll -lh shm1 > -rw-r--r-- 1 root root 4.0G Sep 27 03:27 shm1 OK, I think that's legal, but a bit odd. /dev/shm1 is a file created in the /dev tmpfs filesytsem, rather than in the /dev/shm filesystem. Still, if your host is 32G, /dev will be created as a 16G tmpfs I think, so should allow 4 4G VMs in it OK. Hi, I ran a script that I’ll attach in a minute (with the binary paths adjusted accordingly, where arch.iso is an Arch Linux ISO, and archiso.img is the initrd from that ISO) ten times and I couldn’t reproduce the problem. (I mounted a tmpfs (8G size) to /dev/shm2.) My host is (Arch) Linux 5.8.12, the guest kernel is 4.18.0-236.el8, the qemu version is 5.1.0-7.module+el8.3.0. Both guest kernel and qemu were compiled by me, though, and I didn’t use the RHEL configuration for the guest kernel. The issue in comment 2 looks different, I can’t imagine virtio-fs to be the cause of KVM errors. Max Created attachment 1717901 [details]
Launch two VMs simultaneously, and mount the same host directory on both through virtio-fs
Hi, Can you still reproduce this issue? If so, can you perhaps provide a script that invokes qemu and virtiofsd in such a way to reproduce it? Max (In reply to Max Reitz from comment #10) > Hi, > > Can you still reproduce this issue? If so, can you perhaps provide a script > that invokes qemu and virtiofsd in such a way to reproduce it? > > Max OK,I'm trying to reproduce, once it's reproduced I will let you know. Hi, I tried to reproduce again with qemu-kvm-5.2.0-8.module+el8.4.0 and Linux 4.18.0-298.el8 in the guest, but I still wasn’t “lucky”. What’s most interesting from the automation log is that it is always exactly every second run that fails, i.e. it’s always one passing and then one failing, and again and again. That seems suspicious to me and rather seems to indicate there might be some interaction going on between each consecutive run (i.e. passing runs leave behind something that makes the next run fail, but the failing run then cleans it up). In comment 0, you said the reproducibility would be 4/10, though, i.e. not exactly every second run. And you said you can manually reproduce it, too. So was the automation log just a very lucky coincidence? (Does the first run always pass?) Because I can’t reproduce it, I’m afraid I’ll have to ask: Can you perhaps give me a stacktrace for the hanging virtiofsd and qemu instances? Max Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release. I talked with QE who is responsible for memory feature.She said Generally we don't use a general file as a memory backend file, we often use hugepage or tmpfs to be the backend file. So I think this is not a bz. mount hugtlbfs in host and echo memory_size of your test needed #mount -t hugetlbfs none /mnt/hugetlbfs # echo $memory_size > /proc/sys/vm/nr_hugepage -m 4G / -object memory-backend-file,host-nodes=0,policy=bind,id=mem-0,size=2048M,prealloc=yes,mem-path=/mnt/hugetlbfs -numa node,memdev=mem-0 \ I will close it,and feel free to reopen it if you have any other opinion. Thanks. |