X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 31AD6385801E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maxrnd.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=maxrnd.com X-Authentication-Warning: m0.truegem.net: mark owned process doing -bs Date: Thu, 5 May 2022 16:36:45 -0700 (PDT) From: Mark Geisert X-X-Sender: mark AT m0 DOT truegem DOT net To: cygwin AT cygwin DOT com Subject: load average calculation failing Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" I've recently noticed that the 'xload' I routinely run shows zero load even with compute-bound processes running. This is on both Cygwin pre-3.4.0 as well as 3.3.4. A test program, shown below, indicates that getloadavg() is returning with 0 status, i.e. not an error but no elems of the passed-in array updated. Stepping with gdb through the test program seems weird within the loadavginfo::load_init method. Single-stepping at line loadavg.cc:68 goes to strace.h:52 and then to _sigbe ?! I had recently updated both Cygwin and Windows 10 to latest at the same time so I cannot say when the failure started. Last day or two at most. ..mark ------------------- #define _GNU_SOURCE #include #include int main (int argc, char **argv) { double loadavg[3]; int res = getloadavg (loadavg, 3); if (res == -1) return 0xFF; if (res > 0) for (int i = 0; i < res; i++) printf ("%f.2 ", loadavg[i]); return res; } -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple