Re: [hackers] [slstatus][PATCH] cpu_perc: Check for division by zero

From: Michael Buch <>
Date: Fri, 15 Feb 2019 00:20:21 +0000

Ah I see, thanks for the example. Sorry, I overlooked your initial
email since it wasn't part of your patch mail. The patch seems fine
then, but I don't run OpenBSD at the moment and on the other platforms
this never occurred to me but perhaps someone who has encountered this
or can reproduce it with a trace can chime in.


Am Do., 14. Feb. 2019 um 23:41 Uhr schrieb Ingo Feinerer <>:
> On Thu, Feb 14, 2019 at 09:16:23PM +0000, Michael Buch wrote:
> > Thanks for changing, on second thought though, I have my doubts about this
> > situation being possible. The cp times are millisecond increments since
> > boot and would only not increment from our perspective if we sampled at
> > submillisecond frequency. You can maximally
> > configure slstatus to 1ms so I dont think we need a check here
> > Did this happen to you?
> Yes, as I wrote in my initial explanatory mail
> ( this happens
> regularly (but not always) after a suspend and resume cycle on OpenBSD.
> This causes slstatus to crash.
Received on Fri Feb 15 2019 - 01:20:21 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 15 2019 - 01:24:22 CET