Red Hat Bugzilla – Bug 1024684
Report error if there are too many open file descriptors
Last modified: 2015-07-22 02:04:25 EDT
Description of problem:
when i tried to random test with 1000 disks assigned to random controllers, targets and LUNs, but guest fail to boot up if assigned more than 992 disks.
BWT, it can do hotplug with 1024 number virtio-scsi disk to guest successfully and they can be detected in guest successfully.
Version-Release number of selected component (if applicable):
# uname -r && rpm -q qemu-kvm
Steps to Reproduce:
1.assigned more than 992 disks to random controllers, targets and LUNs.
# sh cli-random-disk.sh 512
# cat cli-random-disk.sh
ulimit -n 40960
cli="/usr/libexec/qemu-kvm -S -M pc -m 24G -smp 12 -cpu SandyBridge -vnc :1 -monitor stdio -boot menu=on -monitor unix:/tmp/monitor,server,nowait -drive file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2,if=none,id=blk1 -device virtio-blk-pci,scsi=off,drive=blk1,id=blk-disk1,bootindex=0 -netdev tap,id=netdev1,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=netdev1,mac=02:03:04:05:06:00,id=net-pci1 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/ttyS0,server,nowait"
cli="$cli -device virtio-scsi-pci,id=scsi0"
cli="$cli -device virtio-scsi-pci,id=scsi1"
for i in $(seq 0 $count)
cli="$cli -drive file=/home/disk/disk$j,if=none,id=disk$j"
cli="$cli -device scsi-hd,bus=scsi0.0,drive=disk$j,id=target$j,scsi-id=$(($i%256)),lun=$(($i/256))"
cli="$cli -drive file=/home/disk/disk$(($j+1)),if=none,id=disk$(($j+1))"
cli="$cli -device scsi-hd,bus=scsi1.0,drive=disk$(($j+1)),id=target$(($j+1)),scsi-id=$(($i%256)),lun=$(($i/256))"
after step 1, guest fail to boot up if assigned more than 992 disks, just hang there before read SeaBIOS.
it can boot up successfully and all the disk work well in guest.
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
qemu-kvm main loop won't work with > 1024 fds due to the limitation of underlying select(2) syscall interface, we should document that and also error out when it exceeds the limit.
Fix included in qemu-kvm-0.12.1.2-2.453.el6
(In reply to Fam Zheng from comment #5)
> qemu-kvm main loop won't work with > 1024 fds due to the limitation of
> underlying select(2) syscall interface, we should document that and also
> error out when it exceeds the limit.
This fixed patch brought a new QEMU core dumped(Bug 1196955), re-assign it to fix it again, please correct me if any mistake, thanks.
The only change here is the added assertion to avoid silent memory corruption. The limit will be fixed by either bz 1005016 or bz 1125735. Please verify this and don't duplicated more (1024 fd) bugs of them.
(In reply to Fam Zheng from comment #9)
> The only change here is the added assertion to avoid silent memory
> corruption. The limit will be fixed by either bz 1005016 or bz 1125735.
> Please verify this and don't duplicated more (1024 fd) bugs of them.
OK, thanks for your kindly reminds.
# uname -r && rpm -q qemu-kvm
(qemu) qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/vl.c:4042: main_loop_wait: Assertion `ioh->fd < 1024' failed.
cli-random-disk.sh: line 15: 38376 Aborted (core dumped) $cli
Base on above and comment #9, this silent memory corruption issue has been fixed. Move to VERIFIED status, please correct me if any mistake, thanks.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.