Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous Exception with user-v2 networking with iPXE script #3141

Open
mvgijssel opened this issue Jan 23, 2025 · 3 comments
Open

Synchronous Exception with user-v2 networking with iPXE script #3141

mvgijssel opened this issue Jan 23, 2025 · 3 comments

Comments

@mvgijssel
Copy link

mvgijssel commented Jan 23, 2025

Description

Running the following iPXE script using limactl:

#!ipxe

:start
echo Attempting to obtain a DHCP lease...
dhcp || goto dhcp_fail
echo DHCP lease obtained successfully.
echo Attempting to boot from ${boot-url}...
chain ${boot-url} || goto chain_fail # <------------------- I suspect chain NULL to be called here
echo Boot succeeded!
goto end

:dhcp_fail
echo DHCP failed. Retrying in 5 seconds...
sleep 5
goto start

:chain_fail
echo Boot failed. Retrying in 5 seconds...
sleep 5
goto start

:end
echo Script finished. This should never happen unless manually exited.

results in the following exception:

iPXE 1.21.1+ (gcc38d) -- Open Source Network Boot Firmware -- https://ipxe.org
Features: DNS HTTP iSCSI TFTP VLAN SRP AoE EFI Menu
[0000] $ #!ipxe
[0007] $ 
[0008] $ 
[000f] $ echo Attempting to obtain a DHCP lease...
Attempting to obtain a DHCP lease...
[0039] $ dhcp || goto dhcp_fail
Configuring (net0 52:55:55:38:6f:53)...... ok
[0050] $ echo DHCP lease obtained successfully.
DHCP lease obtained successfully.
[0077] $ echo Attempting to boot from ${boot-url}...
Attempting to boot from ...
[00a3] $ chain ${boot-url} || goto chain_fail


Synchronous Exception at 0x0000000079EE9C7C
PC 0x000079EE9C7C
PC 0x000079ED2814
PC 0x000079EDDCFC
PC 0x00007C09447C
PC 0x00007C11015C
PC 0x00007C05E2A0
PC 0x00007C05DA8C
PC 0x00007C05CB38
PC 0x00007C04E2E0
PC 0x00007C064E54
PC 0x00007C063A08
PC 0x00007C064894
PC 0x00007C063A08
PC 0x00007C065944
PC 0x00007C05CC30
PC 0x00007C05CE24
PC 0x00007C05CF20
PC 0x00007C05D020
PC 0x00007C135070
PC 0x00007C6B7640
PC 0x00007C6B76F0
PC 0x00007C6B8A24
PC 0x00007C6B5030
PC 0x00004768E964 (0x000047688000+0x00006964) [ 1] DxeCore.dll
PC 0x00007FCEFC08 (0x00007FCE9000+0x00006C08) [ 2] BdsDxe.dll
PC 0x00007FCF1A14 (0x00007FCE9000+0x00008A14) [ 2] BdsDxe.dll
PC 0x000047692128 (0x000047688000+0x0000A128) [ 3] DxeCore.dll
[ 1] /home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 2] /home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
[ 3] /home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

  X0 0x0000000000000000   X1 0x0000000079F56031   X2 0xFFFFFFFFFFFFFFFF   X3 0x0000000047687168
  X4 0x0000000000000000   X5 0x0000000000000000   X6 0x0000000000000000   X7 0x0000000000000000
  X8 0x0000000000000018   X9 0x000000000000003A  X10 0x000000007CB44000  X11 0x000000007E2A0FFF
 X12 0x0098989800989898  X13 0x0098989800989898  X14 0x6D657474416D3034  X15 0x6F7420676E697470
 X16 0x0000000079EC1CB4  X17 0x000000006B276AD9  X18 0x0000000000000010  X19 0x0000000079F7F138
 X20 0x0000000079F7F1D8  X21 0x0000000000000000  X22 0x0000000079F902C8  X23 0x0000000079F90358
 X24 0x0000000079F56303  X25 0x0000000047687270  X26 0x0000000079F56306  X27 0x0000000047687260
 X28 0x0000000000000023   FP 0x00000000476872C0   LR 0x0000000079ED2814  

  V0 0x00000000476871C0 00000000476871C0   V1 0xFFFFFF80FFFFFFD0 0000000047687190
  V2 0x68003146474D0074 73656769642D3166   V3 0x0000000000000000 0000000000000000
  V4 0x0000000000000000 0000000000000000   V5 0x4010040140100401 4010040140100401
  V6 0x0000000000000000 0000000000000000   V7 0x0000000000000000 0000000000000000
  V8 0x0000000000000000 0000000000000000   V9 0x0000000000000000 0000000000000000
 V10 0x0000000000000000 0000000000000000  V11 0x0000000000000000 0000000000000000
 V12 0x0000000000000000 0000000000000000  V13 0x0000000000000000 0000000000000000
 V14 0x0000000000000000 0000000000000000  V15 0x0000000000000000 0000000000000000
 V16 0x0000000000000000 0000000000000000  V17 0x0000000000000000 0000000000000000
 V18 0x0000000000000000 0000000000000000  V19 0x0000000000000000 0000000000000000
 V20 0x0000000000000000 0000000000000000  V21 0x0000000000000000 0000000000000000
 V22 0x0000000000000000 0000000000000000  V23 0x0000000000000000 0000000000000000
 V24 0x0000000000000000 0000000000000000  V25 0x0000000000000000 0000000000000000
 V26 0x0000000000000000 0000000000000000  V27 0x0000000000000000 0000000000000000
 V28 0x0000000000000000 0000000000000000  V29 0x000000007FBB5730 000000007FBB313C
 V30 0x00000000476870B0 00000000476870B0  V31 0xFFFFFF80FFFFFFD0 0000000047687080

  SP 0x0000000047687090  ELR 0x0000000079EE9C7C  SPSR 0xA0000205  FPSR 0x00000000
 ESR 0x96000007          FAR 0x0000000000000000

 ESR : EC 0x25  IL 0x1  ISS 0x00000007

Data abort: Translation fault, third level

Stack dump:
  0000047686F90: 00000000476871D0 0000000079F8F433 0000000079F8F428 0000000047687270
  0000047686FB0: 0000000079F56306 0000000047687260 00000000476871C0 00000000476871C0
  0000047686FD0: 0000000047687190 FFFFFF80FFFFFFD0 0000000000000009 0000000079EF9C64
  0000047686FF0: 0000000000000000 0000000079F8F448 0000000000000001 F6B05F554641B300
  0000047687010: 0000000079EFCCC0 0000000000000001 0000000079ED3038 0000000079F73A08
  0000047687030: 0000000047687260 0000000000000002 0000000079EC76BC 0000000079F90248
  0000047687050: 0000000000000078 0000000000000000 0000000000000080 0000000000000000
  0000047687070: 0000000079F56303 F6B05F554641B300 0000000079ED2838 0000000079F90348
> 0000047687090: 0000000079ED2860 0000000079F90248 0000000079F90378 0000000079F77740
  00000476870B0: 0000000079F0DE44 0000000079F90348 0000000079F90378 0000000079F902C8
  00000476870D0: 0000000079EBBCE0 0000000079F90248 0000000079F8F428 00000000476871C8
  00000476870F0: 0000000079F90248 0000000000000000 0000000000000000 0000000079EF62C8
  0000047687110: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
  0000047687130: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
  0000047687150: 0000000000000000 0000000000000000 0000000000000000 F6B05F554641B300
  0000047687170: 0000000079EBBD9C 0000000000000000 0000000079F90248 00000000476871C8


Synchronous Exception at 0x0000000079EE9C7C
ASSERT [ArmCpuDxe] /home/kraxel/projects/qemu/roms/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(343): ((BOOLEAN)(0==1))

Validated it works fine in slirp and bridge networking.

@AkihiroSuda
Copy link
Member

Running the following iPXE script using limactl:

How?

@mvgijssel
Copy link
Author

This is the pull request vgijssel/setup#686, but basically using a regular Ubuntu cloud image with an adjusted grub which chain loads ipxe! That way I can use a “regular” image and I don’t have to worry about the Qemu (or vz) supporting pxe on the network adapter.

@mvgijssel
Copy link
Author

BTW I solved the immediate issue by using the isset function from iPXE to validate if the variable is set and branching based of that. Though it's still surprising behaviour that the vm crashes if iPXE encounters a NULL value 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants