boot fails on hi1620, thunderx2 platforms

Bug #1897819 reported by dann frazier
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Critical
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

Unfortunately we've found that the GRUB in -proposed is causing Hi1620-based systems to fail to boot. Here's the tail of the boot log w/ 'set debug=all':

script/lexer.c:336: token 259 text [
]
script/script.c:50: malloc 0x202f9ba604a0
script/script.c:50: malloc 0x202f9ba60460
script/lexer.c:336: token 0 text []
script/script.c:50: malloc 0x202f9ba60580
script/script.c:50: malloc 0x202f9ba60420
script/script.c:65: free 0x202f9ba60420
script/script.c:65: free 0x202f9ba60580
script/script.c:65: free 0x202f9ba60460
script/script.c:65: free 0x202f9ba604a0
loader/efi/fdt.c:63: allocating 1155 bytes for fdt
loader/arm64/linux.c:102: Initrd @ 0x2795d000-0x2c9461e2
loader/efi/fdt.c:95: Installed/updated FDT configuration table @ 0x2fee0000
loader/arm64/linux.c:119: Installed/updated FDT configuration table @
0x2fee0000
kern/efi/fdt.c:38: found registered FDT @ 0x2fee0000
loader/efi/fdt.c:63: allocating -1347439697 bytes for fdt

Related branches

Revision history for this message
Colin Ian King (colin-king) wrote :

Does this indicate that the Flattened Device Tree is corrupted? It would be useful to get a dump of FDT to check if it's not compliant

Revision history for this message
Colin Ian King (colin-king) wrote :

basically a memmap of /dev/mem from 0x2fee0000 to 0x2fee0000 + 0x483 should be sufficient

Revision history for this message
Colin Ian King (colin-king) wrote :

the uint32_t @ 0x2eee0004 should be the correct value for the totalsize, in this case it seems to be -1347439697 (0xafafb3af) which looks like total garbage.

Revision history for this message
dann frazier (dannf) wrote :

Also fails on thunderx2:

script/script.c:65: free 0xbf98bc4a00
script/script.c:65: free 0xbf98bc4b60
script/script.c:65: free 0xbf98bc4a40
script/script.c:65: free 0xbf98bc4a80
loader/efi/fdt.c:63: allocating 1155 bytes for fdt
loader/arm64/linux.c:102: Initrd @ 0xf2007000-0xf6ff0160
loader/efi/fdt.c:95: Installed/updated FDT configuration table @ 0xf9a96000
loader/arm64/linux.c:119: Installed/updated FDT configuration table @
0xf9a96000
kern/efi/fdt.c:38: found registered FDT @ 0xf9a96000
loader/efi/fdt.c:63: allocating -1347439697 bytes for fdt

Synchronous Exception at 0x00000000F8CC47F8
PC 0x0000F8CC47F8
PC 0x00BF98F81C34

summary: - boot fails on hi1620 platforms
+ boot fails on hi1620, thunderx2 platforms
Revision history for this message
dann frazier (dannf) wrote :
Revision history for this message
dann frazier (dannf) wrote :
Revision history for this message
dann frazier (dannf) wrote :
Changed in grub2 (Ubuntu):
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

It's unfortunate this was not reported via the isotracker sooner. The VM-based subiquity tests did not catch this as it only appears on real hardware. I'm worried we'll have to ship beta as-is, only release-noting it and getting a fix in ASAP afterwards.

Changed in grub2 (Ubuntu):
milestone: none → ubuntu-20.10
Revision history for this message
dann frazier (dannf) wrote :

Thanks @xnox. Verified on a Cavium ThunderX CRB1S, Cavium ThunderX2 Saber, Gigabyte Thunderx R120, HiSilicon Hi1616 D05, and a Hisilicon Hi1620 x6000.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.04-1ubuntu35

---------------
grub2 (2.04-1ubuntu35) groovy; urgency=medium

  * postinst.in, grub-multi-install: fix logic of skipping installing onto
    any device, if one chose to not install bootloader on any device. LP:
    #1896608
  * Do not finalize params twice on arm64. LP: #1897819

 -- Dimitri John Ledkov <email address hidden> Thu, 01 Oct 2020 22:59:51 +0800

Changed in grub2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

While there isn't a specific test case for this bug its easy to deduce.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted grub2 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.04-1ubuntu26.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2 (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (grub2/2.04-1ubuntu26.6)

All autopkgtests for the newly accepted grub2 (2.04-1ubuntu26.6) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-image/1.10+20.04ubuntu1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#grub2

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
dann frazier (dannf) wrote :

I've verified that this is fixed in the current focal-proposed build (ThunderX2 tested). However, since upgrading forces off the old grub2-signed, all wait to mark this verified until a matching grub2-signed is available.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.04-1ubuntu26.6

---------------
grub2 (2.04-1ubuntu26.6) focal; urgency=medium

  * postinst.in, grub-multi-install: fix logic of skipping installing onto
    any device, if one chose to not install bootloader on any device. LP:
    #1896608
  * Do not finalize params twice on arm64. LP: #1897819

grub2 (2.04-1ubuntu26.5) focal; urgency=medium

  * ubuntu-linuxefi-arm64.patch: Fix build on armhf (LP: #1862279)

 -- Dimitri John Ledkov <email address hidden> Thu, 01 Oct 2020 23:19:24 +0800

Changed in grub2 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for grub2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.