Skip to contentSkip to conversation

Powerpc grub_func_test never exits

DISCUSSION Glenn Washburn 2 participants 7 messages Jan 8, 2022 – Jan 15, 2022

lore
Share & tools
lore
#0 lore raw

Hi Daniel and Adrian,

I'm specifically addressing you two because judging from prior list emails you both have run the make check tests for powerpc and so I think are well positioned to help make progress on this issue.

When running the grub functional tests (grub_func_test), the test is failing after an hour with a timeout on both PPC and PPC64. Looking at the QEMU output for the functional test, I can see that it finishes. However, the VM never exits/halts. Here's the last few lines from QEMU output by grub:

```
gfxterm_menu: FAIL
videotest_checksum:
 tests/videotest_checksum.c:videotest_checksum:46: assert failed: 0
 unicode font not found: no server is specified
videotest_checksum: FAIL
exfctest:
exfctest: PASS
TEST FAILURE
error: no server is specified.
```

I've attached an iso that will reproduce this issue in Debian's QEMU 5.2 and 6.1. The QEMU command to run is (not all options may be needed):

$ qemu-system-ppc -M mac99,via=pmu -m 2048M -nographic -monitor
    file:/dev/null -fw_cfg name=etc/sercon-port,string=0 -serial null
    -serial file:/dev/stdout -hda grub.iso -boot c

This issue is not present in other QEMU tests, which could indicate a GRUB issue. But if so, it doesn't seem to present itself on any other target that I've been testing. I suspect there's a bug in GRUB that is PPC specific that corrupts firmware memory such that halt doesn't happen.

I'm curious how this would behave on real hardware, does it still hang?

Getting this resolved will allow my testing to properly see this as a test failure and not a non-test error.

Glenn

#1 lore raw

Hi Glenn!

Quoted 7 lines · Glenn Washburn

I've attached an iso that will reproduce this issue in Debian's QEMU 5.2 and 6.1. The QEMU command to run is (not all options may be needed):

$ qemu-system-ppc -M mac99,via=pmu -m 2048M -nographic -monitor
    file:/dev/null -fw_cfg name=etc/sercon-port,string=0 -serial null
    -serial file:/dev/stdout -hda grub.iso -boot c
Quoted 7 lines

This issue is not present in other QEMU tests, which could indicate a GRUB issue. But if so, it doesn't seem to present itself on any other target that I've been testing. I suspect there's a bug in GRUB that is PPC specific that corrupts firmware memory such that halt doesn't happen.

I'm curious how this would behave on real hardware, does it still hang?

I'm not at home at the moment, but I will be glad to burn this to a CD-R and run it on my iBook G4 and report the results back. That will most probably happen on Monday.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#2 lore raw
In reply to Glenn Washburn

Hi Glenn!

Quoted 13 lines · Glenn Washburn

I've attached an iso that will reproduce this issue in Debian's QEMU 5.2 and 6.1. The QEMU command to run is (not all options may be needed):

$ qemu-system-ppc -M mac99,via=pmu -m 2048M -nographic -monitor
    file:/dev/null -fw_cfg name=etc/sercon-port,string=0 -serial null
    -serial file:/dev/stdout -hda grub.iso -boot c

This issue is not present in other QEMU tests, which could indicate a GRUB issue. But if so, it doesn't seem to present itself on any other target that I've been testing. I suspect there's a bug in GRUB that is PPC specific that corrupts firmware memory such that halt doesn't happen.

Quoted 4 lines

I'm curious how this would behave on real hardware, does it still hang?

Getting this resolved will allow my testing to properly see this as a test failure and not a non-test error.

I have burnt the ISO to a CD-R now and booted my iBook G4 with it.

It boots but gets stuck at "Welcome to GRUB!". I can hear CD-ROM access noises from time to time but no changes on the screen so far. I'll let it running for some time.

Let me know if you want me to try anything else.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#3 lore raw

Hi Glenn!

Quoted 5 lines · John Paul Adrian Glaubitz

I have burnt the ISO to a CD-R now and booted my iBook G4 with it.

It boots but gets stuck at "Welcome to GRUB!". I can hear CD-ROM access noises from time to time but no changes on the screen so far. I'll let it running for some time.

OK, so the machine just shut itself off. There was no other output besides the message "Welcome to GRUB!", but I assume that is as expected and the tests run silently, then shut the machine off.

So, it seems to work on real hardware.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#4 lore raw
Quoted 1 line · On Fri, 14 Jan 2022 09:48:56 +0100 John Paul Adrian Glaubitz…

Hi Glenn!

Hi Adrian, thanks for testing this for me.

Quoted 7 lines · John Paul Adrian Glaubitz
Quoted 5 lines

I have burnt the ISO to a CD-R now and booted my iBook G4 with it.

It boots but gets stuck at "Welcome to GRUB!". I can hear CD-ROM access noises from time to time but no changes on the screen so far. I'll let it running for some time.

Quoted 5 lines

OK, so the machine just shut itself off. There was no other output besides the message "Welcome to GRUB!", but I assume that is as expected and the tests run silently, then shut the machine off.

So, it seems to work on real hardware.

I forgot the output gets sent to the serial port, so that's why you don't see anything. That's good that it works (ie shuts itself down). That leads me to believe there's a bug in PowerPC Open Firmware.

Glenn

#5 lore raw

Hi Glenn!

Quoted 3 lines · Glenn Washburn

On Fri, 14 Jan 2022 09:48:56 +0100

Hi Adrian, thanks for testing this for me.

You're welcome!

Quoted 11 lines
Quoted 11 lines · John Paul Adrian Glaubitz
Quoted 5 lines

I have burnt the ISO to a CD-R now and booted my iBook G4 with it.

It boots but gets stuck at "Welcome to GRUB!". I can hear CD-ROM access noises from time to time but no changes on the screen so far. I'll let it running for some time.

OK, so the machine just shut itself off. There was no other output besides the message "Welcome to GRUB!", but I assume that is as expected and the tests run silently, then shut the machine off.

Quoted 5 lines
Quoted 1 line

So, it seems to work on real hardware.

I forgot the output gets sent to the serial port, so that's why you don't see anything. That's good that it works (ie shuts itself down). That leads me to believe there's a bug in PowerPC Open Firmware.

Ah, serial output indeed explains why I didn't see anything. The problem is that this is an iBook G4 which doesn't have a serial output I could use, so output to the framebuffer would be better.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#6 lore raw
Quoted 22 lines · On Fri, 14 Jan 2022 23:05:01 +0100 John Paul Adrian Glaubitz…

Hi Glenn!

Quoted 3 lines · Glenn Washburn

On Fri, 14 Jan 2022 09:48:56 +0100

Hi Adrian, thanks for testing this for me.

You're welcome!

Quoted 13 lines
Quoted 12 lines · John Paul Adrian Glaubitz
Quoted 5 lines

I have burnt the ISO to a CD-R now and booted my iBook G4 with it.

It boots but gets stuck at "Welcome to GRUB!". I can hear CD-ROM access noises from time to time but no changes on the screen so far. I'll let it running for some time.

OK, so the machine just shut itself off. There was no other output besides the message "Welcome to GRUB!", but I assume that is as expected and the tests run silently, then shut the machine off.

So, it seems to work on real hardware.

Quoted 7 lines
Quoted 3 lines

I forgot the output gets sent to the serial port, so that's why you don't see anything. That's good that it works (ie shuts itself down). That leads me to believe there's a bug in PowerPC Open Firmware.

Ah, serial output indeed explains why I didn't see anything. The problem is that this is an iBook G4 which doesn't have a serial output I could use, so output to the framebuffer would be better.

Agreed, the ISO was created by the make check tests which output to serial so it can see if the output was expected. I wouldn't want to modify the ISO for your test (at least for the initial test) to make sure that your results wouldn't be tainted by some change caused by mucking with the ISO.

Glenn