forgive my poor english first.
Test environment:
ServerPC: windows server 2012 iscsi target + tftp32 + latest ipxe.efi / snponly.efi
ClientPC : 1000M PCI-E NIC with UEFI network boot enabled ,local harddisk has removed.
After ClientPC boot into ipxe shell , I type
dhcp --> set keep-san 1 -> sanboot iscsi:10.10.10.253::::iqn.2019.com.test:gpt in shell , then the clientPC begin load OS image, but very very slowly, it takes about 3 - 5 minutes before the windows boot animation logo appeared.
and at this time, I found the wintarget service in server side has crashed, and once I restart the wintarget servive, it crashed immediately , after crash -> restart for 10 - 20 times , the clientPC can successfully boot into windows desktop.
I tried snponly.efi , and tried another PC with diffrent NIC, the resule always same. So I guess this is not a network or NIC problem, it maybe the ipxe send a wrong scsi command to iscsi target, and caused the target crash.
So I fetched the lates IPXE source ,and compiled with DEBUG=iscsi,scsi,efi_block:2, and enable syslog, then I replace ipxe.efi in server side, and reboot the clientPC.
the syslog is:
...................
<6>ipxe: EFIBLK 0x80 read LBA 0x0027cd38 to 0xbf4000+0x00000200 10.10.10.1 13/04 00:05:37.264
<6>ipxe: EFIBLK 0x80 write LBA 0x0027cd38 from 0xbf4000+0x00000200 10.10.10.1 13/04 00:05:37.275
<6>ipxe: iSCSI 0xe9a3008 start data out DataSN 0x0 len 0x200 10.10.10.1 13/04 00:05:37.283
<6>ipxe: EFIBLK 0x80 read LBA 0x00072800 to 0xb80000+0x00002000 10.10.10.1 13/04 00:05:37.354
<6>ipxe: EFIBLK 0x80 read LBA 0x00072800 to 0xbea000+0x00004000 10.10.10.1 13/04 00:05:37.363
<6>ipxe: EFIBLK 0x80 read LBA 0x00672800 to 0xb80000+0x00000400 10.10.10.1 13/04 00:05:37.373
<6>ipxe: EFIBLK 0x80 read LBA 0x0067280a to 0xb80000+0x00000400 10.10.10.1 13/04 00:05:37.383
<6>ipxe: EFIBLK 0x80 read LBA 0x00072960 to 0xbee000+0x00004000 10.10.10.1 13/04 00:05:37.393
<6>ipxe: EFIBLK 0x80 read LBA 0x00672d54 to 0xb80000+0x00000400 10.10.10.1 13/04 00:05:37.402
<6>ipxe: EFIBLK 0x80 read LBA 0x00075240 to 0xc00000+0x00004000 10.10.10.1 13/04 00:05:37.419
<6>ipxe: EFIBLK 0x80 read LBA 0x0067aad0 to 0xb80000+0x00000400 10.10.10.1 13/04 00:05:37.429
<6>ipxe: EFIBLK 0x80 read LBA 0x0027cd38 to 0xbf4000+0x00000200 10.10.10.1 13/04 00:05:37.439
<6>ipxe: EFIBLK 0x80 write LBA 0x0027cd38 from 0xbf4000+0x00000200 10.10.10.1 13/04 00:05:37.449
<6>ipxe: iSCSI 0xe9a3008 start data out DataSN 0x0 len 0x200 10.10.10.1 13/04 00:05:37.459
<6>ipxe: EFIBLK 0x80 read LBA 0x00072800 to 0xb80000+0x00002000 10.10.10.1 13/04 00:05:37.522
<6>ipxe: EFIBLK 0x80 read LBA 0x00000000 to 0xb80000+0x00000200 10.10.10.1 13/04 00:05:37.532
<6>ipxe: EFIBLK 0x80 read LBA 0x00000001 to 0xb80000+0x00000200 10.10.10.1 13/04 00:05:37.541
<6>ipxe: EFIBLK 0x80 read LBA 0x00000001 to 0xb80000+0x00000200 10.10.10.1 13/04 00:05:37.550
<6>ipxe: EFIBLK 0x80 read LBA 0x00000000 to 0xb80000+0x00000200 10.10.10.1 13/04 00:05:37.560
<6>ipxe: EFIBLK 0x80 read LBA 0x00000001 to 0xbf4000+0x00000200 10.10.10.1 13/04 00:05:37.569
<6>ipxe: EFIBLK 0x80 read LBA 0x00000002 to 0xbf5000+0x00004000 10.10.10.1 13/04 00:05:37.579
<6>ipxe: EFIBLK 0x80 read LBA 0x00000002 to 0xbf5000+0x00004000 10.10.10.1 13/04 00:05:37.589
<6>ipxe: EFIBLK 0x80 read LBA 0x00000800 to 0xbf5000+0x00002000 10.10.10.1 13/04 00:05:37.598
<6>ipxe: EFIBLK 0x80 read LBA 0x00032800 to 0xbf5000+0x00002000 10.10.10.1 13/04 00:05:37.608
<6>ipxe: EFIBLK 0x80 read LBA 0x00072800 to 0xc04000+0x00004000 10.10.10.1 13/04 00:05:37.618
<6>ipxe: EFIBLK 0x80 read LBA 0x00672800 to 0xbf5000+0x00000400 10.10.10.1 13/04 00:05:37.627
<6>ipxe: EFIBLK 0x80 read LBA 0x0067280a to 0xbf5000+0x00000400 10.10.10.1 13/04 00:05:37.636
<6>ipxe: EFIBLK 0x80 read LBA 0x00072960 to 0xc08000+0x00004000 10.10.10.1 13/04 00:05:37.652
<6>ipxe: EFIBLK 0x80 read LBA 0x0067ab08 to 0xbf5000+0x00000400 10.10.10.1 13/04 00:05:37.664
<6>ipxe: EFIBLK 0x80 read LBA 0x0101c830 to 0xbf5000+0x00002000 10.10.10.1 13/04 00:05:37.673
<6>ipxe: EFIBLK 0x80 read LBA 0x004a5988 to 0x24c5000+0x014c2600 10.10.10.1 13/04 00:05:37.685
<6>ipxe: iSCSI 0xe9a3008 closed: Connection reset (
http://ipxe.org/0f0a6095) 10.10.10.1 13/04 00:05:37.811
<6>ipxe: SCSI 0xe9a36e8 tag 18ae01e6 closed: Connection reset (
http://ipxe.org/0f0a6095) 10.10.10.1 13/04 00:05:37.819
<6>ipxe: iSCSI 0xe99fb08 initiator iqn.2010-04.org.ipxe:2dfe4d56-efb6-00a3-efcf-7a4242c83c9f 10.10.10.1 13/04 00:05:37.830
<6>ipxe: iSCSI 0xe99fb08 target 10.10.10.253 iqn.2019.com.test:gpt 10.10.10.1 13/04 00:05:37.834
<6>ipxe: iSCSI 0xe99fb08 entering security negotiation 10.10.10.1 13/04 00:05:37.841
<6>ipxe: SCSI 0xe9a12e8 created for LUN 0000-0000-0000-0000 10.10.10.1 13/04 00:05:37.850
<6>ipxe: iSCSI 0xe99fb08 closed: Connection reset (
http://ipxe.org/0f0a6095) 10.10.10.1 13/04 00:05:37.858
<6>ipxe: iSCSI 0xe99f908 initiator iqn.2010-04.org.ipxe:2dfe4d56-efb6-00a3-efcf-7a4242c83c9f 10.10.10.1 13/04 00:05:42.853
<6>ipxe: iSCSI 0xe99f908 target 10.10.10.253 iqn.2019.com.test:gpt 10.10.10.1 13/04 00:05:42.860
<6>ipxe: iSCSI 0xe99f908 entering security negotiation 10.10.10.1 13/04 00:05:42.868
<6>ipxe: SCSI 0xe99fb28 created for LUN 0000-0000-0000-0000 10.10.10.1 13/04 00:05:42.876
<6>ipxe: iSCSI 0xe99f908 closed: Connection reset (
http://ipxe.org/0f0a6095) 10.10.10.1 13/04 00:05:42.886
......................................
once the log line "
<6>ipxe: EFIBLK 0x80 read LBA 0x004a5988 to 0x24c5000+0x014c2600 10.10.10.1 13/04 00:05:37.685 " appeared , the wintarget crashed .
from the source , the 0x014c2600 in the log line means read size, I don't understand why the system try to read 0x014c2600 bytes (21M) data in one scsi IO.
It seems there is a bug in ipxe efi block io?
(This boot slow problem and large size scsi read request won't appear in bios mode iscsi boot, only uefi)
any one can help? thanks very much.
I simply add code :
if (len >= 0x1000000)
{
return EFI_BAD_BUFFER_SIZE;
}
in the function efi_block_io_read (efi_block.c) , the client can successfully boot in 30 - 40 seconds, and the target has not crash.
But this is not a good solution, we need to found the reason why the len argument is so big.