Replies: 7 comments 27 replies
|
From the stack backtrace, I see that you are using the virtio-net driver. This driver was replaced in its entirety a week or so ago. Are you able to reproduce with the current master branch? |
|
There aren't many places in iPXE where queued I/O buffers can accumulate without limit. Received packets get processed immediately (in The neighbour resolution deferred transmission queue is one of the few queues that doesn't have a limit. It would be interesting to see if simply limiting the size of the deferred transmission queue would make the problem go away. Another option would be to add a second cache discarder mechanism (not marked as expensive) to It's worth noting that under packet flood conditions it's quite likely that the TCP connection will stall. iPXE uses small receive ring fill levels, and a sustained flood is likely to cause packets to be dropped by the NIC. The above suggestions should help ensure that iPXE recovers more gracefully after a flood, but probably won't allow progress to be made while the flood is ongoing. |
I've pushed commit 2d8236995 which implements this approach. I have tested by flood pinging with This may not fix every aspect of your issue, but it will definitely change the underlying behaviour. Could you please retest with the current master branch (commit 2d8236995) and report back? |
|
Here is a backtrace... ... and another one... |
|
@mcb30 Ping? Is there any chance you can take look at this? Or at least give some guidance? |
|
Hmmm... Interesting... I was able to reproduce the issue on hardware and QEMU. Though I was using in QEMU virtio net device, iPXE in ROM, iPXE as an EFI application served from TFTP server and iSCSI target hosted on separate virtual machine. Could you try virtio net driver? Did you flood iPXE machine with packates during Could you share OVMF version which you are using in QEMU? |
|
Hi Michael, I was asked to investigate this issue as we have customers hitting the issue. I was able to reproduce the issue - very easily and consistently - with the following setup: HOST: x86_64 desktop tower Here are the detailed reproduction steps:
This will result in iPXE going into a doom-loop and the EFI app is effectively hung and the VM eventually reset after several minutes. We believe this is the BUG/issue our customers are experiencing. More details: The VMs and host are bridged with tap0/tap1 devices. VM2 is booting using the following QEMU options: /usr/libexec/qemu-kvm IPXE was built using: Embedded script is: NOTE: Daniel's app does a stall followed by a file read in an infinite loop. I increased the stall timeout from 10 to 30 to more easily determine when the app is stalling or reading from the block file. Something very important to note is, from my observations, the nping packet flood must happen concurrently with the file read period of the app. If the packet flood is limited to just during the stall period, iPXE recovers. So, this possibly points to some sort of concurrency issue in iPXE packet handling while accessing the iSCSI block device. If you need another config details, please let me know. A key difference between my setup and yours could be the iSCSI server on a separate VM (mine) versus the host (yours)? Perhaps you can try to reproduce again using the above more specific configuration? If I can be of any further assistance (to obtain debug information, run specific tests, etc.), let me know. Thanks! -Aaron |
Uh oh!
There was an error while loading. Please reload this page.
Environment: An UEFI platform which loads iPXE which loads the GRUB over iSCSI. The GRUB load fails/hangs, sometimes with read errors, when you flood network interface with tons of packets.
You can flood network interface with following commands:
nping --tcp --flags syn --dest-port 46017 --rate 1000 --win 62580 --mtu 9000 --count 0 <ip_addr>nping --udp --dest-port 46017 --rate 1000 --count 0 <ip_addr>nping --icmp --icmp-type 8 --icmp-code 0 --rate 1000 --count 0 <ip_addr>In practice the most important parameter is rate. The other arguments are almost not relevant. I was able to reproduce the issue in my environment on every boot by rising rate to 1000.
Output from iPXE with some debug enabled:
iSCSI server: 192.0.2.1
iPXE client: 192.0.2.2
The problem is that it is very easy to stop machine network boot by flooding network interface to which iPXE is bound. As I said earlier, type of packets does not matter. Only packets generation speed matters. I think backtrace below explains that:
AIUI huge influx of packets leads to memory exhaustion by allocating tons of I/O buffers to service unestablished connections. Then memory allocator is not able to get any longer more memory from the heap and it has to release some caches. Unfortunately the allocator is not aware what is happening in TCP layer and simply it kills active iSCSI session by deallocating, among others, TCP I/O buffer. Then TCP transmission, and subsequently iSCSI session, from iPXE POV fails...
A fix for this probably is not easy and requires quite significant changes in the iPXE code. I am happy to work on it but I am not very familiar with iPXE internals. So, I need some guidance.
All reactions