load average calculation failing -- fixed by Windows update
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu May 12 09:48:00 GMT 2022
On May 11 16:40, Mark Geisert wrote:
> Jon Turney wrote:
> > On 10/05/2022 09:34, Mark Geisert wrote:
> > > Corinna Vinschen wrote:
> > > > [redirect back to cygwin-developers]
> >
> > > >
> > > > > > 0x800007D0 == PDH_CSTATUS_NO_MACHINE. The code (at line 68 mentioned
> > > >
> > > > This is a weird error.
> > > >
> > > > "The path did not contain a computer name and the function was unable
> > > > to retrieve the local computer name."
> > > >
> > > > Yeah, sure.
> > > >
> > > > Mark, did you try to add the computer name to the path by calling
> > > > GetComputerName() in load_init?
> >
> > As we've seen before, this error also seems to be also used for "not
> > authorized" problems.
> >
> > https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=de7f13aa9acec022ad1e4b3f929d4dc982ddf60b
>
> Sheesh. This all seems entirely too complicated.
>
> But thankfully, after installing latest Windows patches (from yesterday's MS
> Patch Tuesday) I find myself on W10 21H2 Build 19044.1706. Xload, uptime,
> and Jon's initial PoC code now show good load averages. I had previously
> been on Build 19044.1645.
>
> The first counter read now gets error 0xC0000BC6 == PDH_INVALID_DATA, but no
> errors on subsequent counter reads. This sounds like it now matches what
> Corinna reported for W11. I wonder if she's running build 1706 already.
Erm... looks like I didn't read your mail throughly enough.
This behaviour, the first call returning with PDH_INVALID_DATA and only
subsequent calls returning valid(?) values, is what breaks the
getloadavg function and, consequentially, /proc/loadavg. So maybe xload
now works, but Cygwin is still broken.
Corinna
More information about the Cygwin-developers
mailing list