Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

From: Jason Gunthorpe
Date: Tue Mar 19 2024 - 09:59:39 EST


On Tue, Mar 12, 2024 at 07:35:40AM +0100, Mirsad Todorovac wrote:
> Hi,
>
> (This is verified on the second test box.)
>
> In the most recent 6.8.0 release of torvalds tree kernel with selftest configs on,
> process ./iommufd appears to consume 99% of a CPU core for quote a while in an
> endless loop:

There is a "bug" in the ksefltest framework where if you call a
kselftest assertion from the setup/teardown it infinite loops

The fix I know is to replace kselftest assertions with normal assert()

But I don't see an obvious thing here saying you are hitting that..

Jason