The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* RFC: KCSAN single report "feature"
@ 2026-07-07 14:34 Breno Leitao
  2026-07-07 21:36 ` Marco Elver
  0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2026-07-07 14:34 UTC (permalink / raw)
  To: elver, dvyukov; +Cc: kasan-dev, linux-kernel, kernel-team

Hello Marco and KCSAN community

KCSAN rate-limits reports so that a given data race is printed at most once
per CONFIG_KCSAN_REPORT_ONCE_IN_MS (3s by default): duplicates within that
window are dropped, but once it elapses the race is printed again in full.

On a long-running machine a persistent race therefore reprints the same
multi-line report every few seconds for as long as the racy code runs, flooding
dmesg/netconsole with identical reports and drowning out genuinely new ones.

Raising REPORT_ONCE_IN_MS only widens the window — the full report still
eventually recurs — and setting it to 0 disables rate limiting entirely, so
there is no way today to get a race reported just once.

I have some debug kernel running in my of Meta fleet, with these debug features
and I would like to enable KCSAN, but, this behaviour is flooding our data
pipeline.

I've recently solved something similar on kmemleak and I am wondering if there
is interested in solving something similar on KCSAN.

	77d100d11c87e mm/kmemleak: dedupe verbose scan output by allocation backtrace

Would it be OK to have a "report once" mode that prints each race once and never
re-reports it,  maybe exposed as a bool CONFIG_KCSAN_REPORT_ONCE or a
kcsan.report_once module parameter ?

Thanks,
--breno

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-07 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 14:34 RFC: KCSAN single report "feature" Breno Leitao
2026-07-07 21:36 ` Marco Elver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox