Emulation of fence.tso hangs in endless loop

Bug #1995860 reported by Heinrich Schuchardt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
opensbi (Debian)
Fix Released
Unknown
opensbi (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned
u-boot (Ubuntu)
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned
u-boot-nezha (Ubuntu)
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

OpenSBI 1.1 has added an emulation of the fence.tso instruction missing on the Allwinner D1 SOC. This emulation hangs in an endless loop. This is fixed by the following upstream patch:

111afc12306e ("lib: sbi_illegal_insn: Fix FENCE.TSO emulation infinite trap loop")

We need to rebuild packages u-boot and u-boot-nezha with the updated OpenSBI to make use of the fix.

[ Test Plan ]

* Boot QEMU, SiFive Unmatched and Nezha D1 with the updated U-Boot.
* Install package clang.
* Execute command clang -v (which uses the fence.tso command).
* Reboot.

[ Where problems could occur ]

The patch added concerns only the fence.tso emulation.

If the patch were wrong, the Nezha D1 might still fail in the emulation.

A defective OpenSBI might lead to failure to boot, to reboot, to poweroff or to crashes when Linux calls into SBI.

[ Other Info ]

n/a

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Add Origin field to patch (which is not strictly required if author of patch is given)

Changed in opensbi (Ubuntu):
status: New → Fix Committed
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Submitted to Debian as bug #1023616.

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

This bug was fixed in the package opensbi - 1.1-1ubuntu1

---------------
opensbi (1.1-1ubuntu1) lunar; urgency=medium

  * Fix emulation of fence.tso hanging in endless loop on Allwinner D1
    d/p/lib-sbi_illegal_insn-Fix-FENCE.TSO-emulation-infinit.patch
    (LP: #1995860)

 -- Heinrich Schuchardt <email address hidden> Mon, 07 Nov 2022 17:46:03 +0100

Changed in opensbi (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Rebuild u-boot-nezha agains updated OpenSBI.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

* Rebuild package u-boot against updated OpenSBI
  Fixes emulation of fence.tso on Allwinner D1 (LP: #1995860)
* Enable reset via SBI on PolarFire Icicle Kit (LP: #1995932)
  d/p/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch

Changed in u-boot-nezha (Ubuntu):
status: New → Fix Committed
Changed in u-boot (Ubuntu):
status: New → Fix Committed
description: updated
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Update OpenSBI in Kinetic

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

This bug was fixed in the package u-boot-nezha - 2022.04+git20220405.7446a472-0ubuntu3

---------------
u-boot-nezha (2022.04+git20220405.7446a472-0ubuntu3) lunar; urgency=medium

  * No change rebuild against updated OpenSBI.
    Fixes emulation of fence.tso hanging in endless loop (LP: #1995860)

 -- Heinrich Schuchardt <email address hidden> Tue, 08 Nov 2022 10:07:47 +0100

Changed in u-boot-nezha (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Heinrich, or anyone else affected,

Accepted opensbi into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/opensbi/1.1-1ubuntu0.22.10.1 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-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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 opensbi (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

No change rebuild u-boot-nezha on kinetic

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Heinrich, or anyone else affected,

Accepted opensbi into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/opensbi/1.1-0ubuntu0.22.04.1 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 opensbi (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Changed in opensbi (Debian):
status: Unknown → Fix Committed
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

This is the update for the u-boot package in Kinetic. A u-boot 2022.07+dfsg-1ubuntu4.1 is available in ppa:xypron/gnu-efi.

Changed in u-boot-nezha (Ubuntu Kinetic):
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Heinrich, or anyone else affected,

Accepted u-boot-nezha into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/u-boot-nezha/2022.04+git20220405.7446a472-0ubuntu2.22.10.0 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-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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.

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

SRU test results:

The SiFive Unmatched board boots successfully with a Kinetic U-Boot built against OpenSBI 1.1-1ubuntu0.22.10.1 . clang -v works. Reset works.

The Nezha board boots successfully with u-boot-nezha 2022.04+git20220405.7446a472-0ubuntu2.22.10.0 built against OpenSBI 1.1-1ubuntu0.22.10.1 . clang -v works. Reset works.

QEMU boots successfully with u-boot-nezha 2022.04+git20220405.7446a472-0ubuntu2.22.10.0 built against OpenSBI 1.1-1ubuntu0.22.10.1 . clang -v works. Reset works.

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

This bug was fixed in the package u-boot - 2022.07+dfsg-1ubuntu6

---------------
u-boot (2022.07+dfsg-1ubuntu6) lunar; urgency=medium

  * Fix probing of virtio devices (LP: #1996285)
    d/p/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch

 -- Heinrich Schuchardt <email address hidden> Fri, 11 Nov 2022 16:14:13 +0100

Changed in u-boot (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Heinrich, or anyone else affected,

Accepted u-boot into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/u-boot/2022.07+dfsg-1ubuntu4.1 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-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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 u-boot (Ubuntu Kinetic):
status: New → Fix Committed
Changed in opensbi (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

SRU to Kinetic tested successfully:

Installed u-boot-sifive_2022.07+dfsg-1ubuntu4.1_riscv64.deb on Unmatched board.
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

Installed u-boot-qemu_2022.07+dfsg-1ubuntu4.1_all.deb, opensbi_1.1-1ubuntu0.22.10.1_all.deb and booted ubuntu-22.10-preinstalled-server-riscv64+unmatched.img
* The image boots
* clang -v succeeds
* Reboot from Linux succeeds
* U-Boot's reset command succeeds

Installed u-boot-microchip_2022.07+dfsg-1ubuntu4.1_riscv64.deb on PolarFire Icicle Kit.

u-boot-qemu_2022.07+dfsg-1ubuntu4.1_all.deb
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

Installed u-boot-nezha_2022.04+git20220405.7446a472-0ubuntu2.22.10.0_all.deb on Allwinner Nezha D1.
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

SRU to Jammy tested successfully:

Installed u-boot-sifive_2022.01+dfsg-2ubuntu2.1_riscv64.deb on Unmatched board.
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

Installed u-boot-qemu_2022.01+dfsg-2ubuntu2.1_all.deb, opensbi_1.1-0ubuntu0.22.04.1_all.deb and booted ubuntu-22.04.1-preinstalled-server-riscv64+unmatched.img
* The image boots
* clang -v succeeds
* Reboot from Linux succeeds
* U-Boot's reset command succeeds

Installed u-boot-microchip_2022.01+dfsg-2ubuntu2.1_riscv64.deb on PolarFire Icicle Kit.

u-boot-qemu_2022.07+dfsg-1ubuntu4.1_all.deb
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

Installed u-boot-nezha_2022.04+git20220405.7446a472-0ubuntu0.2_all.deb on Allwinner Nezha D1.
* U-Boot's reset command succeeds
* Board boots
* clang -v succeeds
* Rebooting from Linux succeeds

tags: added: verification-done verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-jammy
tags: removed: verification-needed-kinetic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u-boot-nezha - 2022.04+git20220405.7446a472-0ubuntu2.22.10.0

---------------
u-boot-nezha (2022.04+git20220405.7446a472-0ubuntu2.22.10.0) kinetic; urgency=medium

  * No change rebuild against updated OpenSBI.
    Fixes emulation of fence.tso hanging in endless loop (LP: #1995860)

 -- Heinrich Schuchardt <email address hidden> Wed, 16 Nov 2022 12:03:59 +0100

Changed in u-boot-nezha (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for u-boot-nezha 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.

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

This bug was fixed in the package opensbi - 1.1-1ubuntu0.22.10.1

---------------
opensbi (1.1-1ubuntu0.22.10.1) kinetic; urgency=medium

  * Fix emulation of fence.tso hanging in endless loop on Allwinner D1
    d/p/lib-sbi_illegal_insn-Fix-FENCE.TSO-emulation-infinit.patch
    (LP: #1995860)

 -- Heinrich Schuchardt <email address hidden> Tue, 08 Nov 2022 16:45:04 +0100

Changed in opensbi (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package opensbi - 1.1-0ubuntu0.22.04.1

---------------
opensbi (1.1-0ubuntu0.22.04.1) jammy; urgency=medium

  * New upstream release (LP: #1995261)
  * Fix emulation of fence.tso hanging in endless loop on Allwinner D1
    d/p/lib-sbi_illegal_insn-Fix-FENCE.TSO-emulation-infinit.patch
    (LP: #1995860)
  * Dropping all other patches as they already integrated in the new source.

 -- Heinrich Schuchardt <email address hidden> Tue, 15 Nov 2022 17:10:37 +0100

Changed in opensbi (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u-boot - 2022.07+dfsg-1ubuntu4.1

---------------
u-boot (2022.07+dfsg-1ubuntu4.1) kinetic; urgency=medium

  * Rebuild against updated OpenSBI
    Fixes emulation of fence.tso (LP: #1995860)
  * Fix probing of virtio devices (LP: #1996285)
    d/p/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch
  * Enable reset via SBI on PolarFire Icicle Kit (LP: #1995932)
    d/p/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch

 -- Heinrich Schuchardt <email address hidden> Fri, 18 Nov 2022 12:51:39 +0100

Changed in u-boot (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
tags: removed: foundations-todo
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Heinrich, or anyone else affected,

Accepted opensbi into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/opensbi/1.3-1ubuntu0.23.04.1 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-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. 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 opensbi (Ubuntu Lunar):
status: Fix Released → Fix Committed
tags: added: verification-needed verification-needed-lunar
removed: verification-done
Changed in opensbi (Ubuntu Jammy):
status: Fix Released → Fix Committed
tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Heinrich, or anyone else affected,

Accepted opensbi into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/opensbi/1.3-1ubuntu0.22.04.1 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The remaining SRU work is obsoleted by LP #2026588 which moves OpenSBI 1.3 to Jammy and Lunar.

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

This bug was fixed in the package opensbi - 1.3-1ubuntu0.23.04.1

---------------
opensbi (1.3-1ubuntu0.23.04.1) lunar; urgency=medium

  * New upstream release (LP: #2026588)

opensbi (1.1-2) unstable; urgency=medium

  [ Lintian Brush ]
  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
    Repository-Browse.

  [ Heinrich Schuchardt ]
  * Fix emulation of fence.tso hanging in endless loop on Allwinner D1
    d/p/lib-sbi_illegal_insn-Fix-FENCE.TSO-emulation-infinit.patch (LP:
    #1995860) (Closes: #1023616)

 -- Heinrich Schuchardt <email address hidden> Wed, 12 Jul 2023 14:43:34 +0200

Changed in opensbi (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package opensbi - 1.3-1ubuntu0.22.04.1

---------------
opensbi (1.3-1ubuntu0.22.04.1) jammy; urgency=medium

  * SRU OpenSBI 1.3 to Jammy (LP: #2026588)

opensbi (1.3-1) unstable; urgency=medium

  * New upstream release.
  * debian/copyright: Update for v1.3.

opensbi (1.2-1) unstable; urgency=medium

  * debian/watch: Update for new upstream source location.
  * Update upstream URLs.
  * debian/copyright: Update for v1.2.
  * debian/patches: Drop all patches, applied upstream.
  * debian/control: Add Build-Depends on python3.
  * debian/control: Update to Standards-Version 4.6.2.

opensbi (1.1-2) unstable; urgency=medium

  [ Lintian Brush ]
  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
    Repository-Browse.

  [ Heinrich Schuchardt ]
  * Fix emulation of fence.tso hanging in endless loop on Allwinner D1
    d/p/lib-sbi_illegal_insn-Fix-FENCE.TSO-emulation-infinit.patch (LP:
    #1995860) (Closes: #1023616)

 -- Heinrich Schuchardt <email address hidden> Mon, 10 Jul 2023 09:26:57 +0200

Changed in opensbi (Ubuntu Jammy):
status: Fix Committed → Fix Released
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.