DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 45SKCME33826691 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=jvRZuQQa X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C524738245BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1719605540; bh=98DAfB43WK0WKb5mwxNfZlLKELOwKT0YLYGrRHA/Oz0=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jvRZuQQapHcEDEQlrU2mL5A/Gmp4UK0mmj0COHiF/2jx0DRn6DidpunVqz5y+ptnu wrCx32BpO7f43hHelVq3kDe1F1u+gj0dbwaJhvANEFj3+WEV3Ws1PWnZcFrk0Bx42a lBCQcJq0smst2Xr9tuqscZGDgTAEAyvXoV1HLTuk= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B2513826DFA ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6B2513826DFA ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719605519; cv=none; b=rO9zr2oHRX2AMLfk9hLxczzZmT8JVPx0TwmvELVI/CVBD8lOLdkq5NuYUj6ZtHGs7dIXBGcyvX8bbpQHAcsyEA/Qn+ZyN/Xzh6Ppz5vP/mvp9WJBRr9RB9ysE6h/stXLF1oQqJRQWWBwsEWmskhy9jFky5Zl9ZoKeHirTySiluY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719605519; c=relaxed/simple; bh=83oEQH5W4uS4TmMHvuw/GEyKd28WnqCKU4tzfblKA+s=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=dIqe+y/Y06kO+MW5qNgkfLq62d5jq7T2PfDhY3xxHj/MwaLgH6W9pdls/Py99Xr3Ut6Trif4LaBYmL2jBzbEafPidQz2NoXPlHx92P6BFbFB429elH7rDAJGUBzrnCXEY3jWCzX3LozVGFhs6y/iz3HBzk2HKjuY+/4JZzF7L/8= ARC-Authentication-Results: i=1; server2.sourceware.org X-ASG-Debug-ID: 1719605515-05edb41414113bb80001-w5GHUG X-Barracuda-Envelope-From: dkoski AT sutinen DOT com X-Barracuda-Effective-Source-IP: mail.sutinen.com[74.208.116.7] X-Barracuda-Apparent-Source-IP: 74.208.116.7 X-ASG-Whitelist: Client Message-ID: <31b01777-2ea3-4b17-b42d-2f1dd2214802@sutinen.com> Date: Fri, 28 Jun 2024 13:11:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: cygwin AT cygwin DOT com Subject: Running multiple instances of bash script fails X-ASG-Orig-Subj: Running multiple instances of bash script fails X-Barracuda-Connect: mail.sutinen.com[74.208.116.7] X-Barracuda-Start-Time: 1719605516 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://10.0.0.5:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sutinen.com X-Barracuda-Scan-Msg-Size: 1267 X-Barracuda-BRTS-Status: 1 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: David Koski via Cygwin Reply-To: David Koski Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 45SKCME33826691 I developed a bash script to get SMART stats from hard drives and it has been working with success for years.  It is working for both Linux and Windows using Cygwin.  Recently I ran into a new installation of this script on a Server 2022 Standard host and found it failed.  On closer examination, I found it was more than an order of magnitude slower than on Linux.  There are many calls to external programs like grep, sed, awk and tr.  The script is called by a Zabbix agent and multiple querries are triggered at the same time. Not to be deterred, I added caching for the SMART output with file locking to prevent conflicts to speed things up.  But the call to smartctl was not nearly as much of a delay as the accumulated delays within the script. After extensive debugging to a debug log, I can now see the script is terminating prematurely, except for the first call.  I have a trap command to report the event on exit of the script, but script is terminating in somewhat random places without getting trapped in instances where it otherwise fails to complete.  I can't see how this is not a bug in Cygwin. Cygwin Setup version 2.932 (x86_64). Updates applied. Any suggestions welcome. Regards, David Koski -- 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