intel_gpu_top crashes with intel_gpu_top: ../tools/intel_gpu_top.c:1202: print_percentage_bar: Assertion `max_len > 0' failed.

Bug #1949314 reported by Leonardo Müller
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel-gpu-tools (Ubuntu)
Fix Released
Undecided
Hector CAO
Jammy
Fix Committed
Undecided
Hector CAO
Mantic
Fix Committed
Undecided
Hector CAO
Noble
Fix Released
Undecided
Hector CAO

Bug Description

[ Impact ]

When resizing the terminal window, intel_gpu_top may crash if the window
becomes small enough. The output when it crashes is:

intel_gpu_top: ../tools/intel_gpu_top.c:1202: print_percentage_bar: Assertion
`max_len > 0' failed.

The fix has been reported and fixed upstream recently : https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/143

The fix has been part of a serie of fixes that improve intel_gpu_top UI behavior for some corner cases : https://patchwork.freedesktop.org/series/124890/

The proposed fix consists of backporting these fixes to affected Ubuntu releases (Jammy, Mantic and Noble)

Tvrtko Ursulin (4):
  tools/intel_gpu_top: Fix clients header width when no clients
  tools/intel_gpu_top: Fix client layout on first sample period
  tools/intel_gpu_top: Optimise interactive display a bit
  tools/intel_gpu_top: Handle narrow terminals more gracefully

NOTES:
For Noble, all the 4 patches will be backported
For Mantic, Jammy, only "tools/intel_gpu_top: Handle narrow terminals more gracefully" will be backported because the others are not applicable to Jammy/Mantic (related to refactoring that happened after Mantic release)

[ Test Plan ]

Run intel_gpu_top inside a console
Resize the console with the mouse to it smallest size

[ Where problems could occur ]

The problem occurs when intel_gpu_top try to draw information on the console

[ Other Info ]

This fix should not cause regression on any other feature.

----

When resizing the terminal window, intel_gpu_top may crash if the window become small enough. The output when it crashes is:

intel_gpu_top: ../tools/intel_gpu_top.c:1202: print_percentage_bar: Assertion `max_len > 0' failed.
Abortado

I was able to reproduce this crash with tilix and xterm.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: intel-gpu-tools 1.26-2
ProcVersionSignature: Ubuntu 5.13.0-19.19-generic 5.13.14
Uname: Linux 5.13.0-19-generic x86_64
ApportVersion: 2.20.11-0ubuntu72
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Sun Oct 31 21:06:01 2021
InstallationDate: Installed on 2017-06-13 (1601 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: intel-gpu-tools
UpgradeStatus: Upgraded to jammy on 2019-12-22 (679 days ago)
modified.conffile..etc.cron.daily.apport: [deleted]

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Hector CAO (hectorcao) wrote :

I was able to reproduce this problen on 22.04

Changed in intel-gpu-tools (Ubuntu):
status: New → Confirmed
Hector CAO (hectorcao)
Changed in intel-gpu-tools (Ubuntu):
assignee: nobody → Hector CAO (hectorcao)
status: Confirmed → In Progress
Revision history for this message
Hector CAO (hectorcao) wrote :

Here is the debdiff for the proposed fix

Hector CAO (hectorcao)
description: updated
Changed in intel-gpu-tools (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → Hector CAO (hectorcao)
Hector CAO (hectorcao)
description: updated
Hector CAO (hectorcao)
description: updated
description: updated
Revision history for this message
Hector CAO (hectorcao) wrote :
Revision history for this message
Hector CAO (hectorcao) wrote :

debdiff for noble

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

This bug was fixed in the package intel-gpu-tools - 1.28-1ubuntu2

---------------
intel-gpu-tools (1.28-1ubuntu2) noble; urgency=medium

  * Fix various intel_gpu_top UI layout issues (LP: #1949314)

 -- Hector Cao <email address hidden> Mon, 15 Apr 2024 10:51:29 +0200

Changed in intel-gpu-tools (Ubuntu Noble):
status: In Progress → Fix Released
Hector CAO (hectorcao)
Changed in intel-gpu-tools (Ubuntu Mantic):
status: New → In Progress
Hector CAO (hectorcao)
Changed in intel-gpu-tools (Ubuntu Mantic):
assignee: nobody → Hector CAO (hectorcao)
Hector CAO (hectorcao)
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Leonardo, or anyone else affected,

Accepted intel-gpu-tools into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/intel-gpu-tools/1.27.1-1ubuntu0.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-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. 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 intel-gpu-tools (Ubuntu Mantic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-mantic
Changed in intel-gpu-tools (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

Hello Leonardo, or anyone else affected,

Accepted intel-gpu-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/intel-gpu-tools/1.26-2ubuntu0.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
Leonardo Müller (leozinho29-eu) wrote :

Hi, I'm sorry, but I no longer have Intel hardware, so I can't test this.

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.