From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22908 invoked by alias); 24 Mar 2018 01:21:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 22510 invoked by uid 89); 24 Mar 2018 01:21:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=canada, Canada, inglis, Inglis X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Mar 2018 01:21:16 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with ESMTP id zXrtegT2yXziTzXrueDbuy; Fri, 23 Mar 2018 19:21:14 -0600 X-Authority-Analysis: v=2.3 cv=X6B81lbe c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=GZHT1NftmC_ogmv2jfcA:9 a=QEXdDO2ut3YA:10 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Odd hang in python waiting for child; strace wakes hung process? To: cygwin@cygwin.com References: <877eq5fedf.fsf@Rainer.invalid> <20180322165908.GI6761@calimero.vinschen.de> From: Brian Inglis Message-ID: Date: Sat, 24 Mar 2018 01:54:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180322165908.GI6761@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfP9XFl2k2iYhdRzQuxEmBiMDp4UpxAX3KP3WiR97JBZvWaVywWfwZnhbnI6KHHT3YdEBxrRB6B0GLMWWuofRe4jamPepKEI4v/4rUau+jLlMNz74LyBg DjubHJgQm1R1WCPp0RPj5tQ0YHIS/mX6W2pEMGV5XxTtzDLX9XKmPgMx5cCBIlShJUiYh3+l5TtD/Q== X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00390.txt.bz2 On 2018-03-22 10:59, Corinna Vinschen wrote: > On Mar 21 23:41, Brian Inglis wrote: >> On 2018-03-21 16:07, Dan Kegel wrote: >>> On Wed, Mar 21, 2018 at 11:54 AM, Achim Gratz wrote: >>>> Well, with the sporadic hanging/defunct processes at work my routine is >>>> to send CONT to all Cygwin processes, then HUP/KILL to anything that's >>>> still not live or gone and then another round of CONT. This works >>>> _most_ of the time, anything more stubborn I /bin/kill -f usually. >>> >>> Since I wrote, both bots hung again. This time I verified: >>> 0) both had the defunct git process as expected >>> 1) kill -CONT the-pid doesn't do anything, nor does kill -9. It's truly wedged. >>> 2) the process stays in its spin hang until you ^C strace -p the-pid >>> 3) ^C-ing the strace causes the process to terminate (strace alone doesn't) >>> 4) taskkill /pid the-task /f also kills the process successfully. >>> >>> So I could write a script that watched for defunct git processes >>> and taskkilled their parent. Build jobs would fail, but at least >>> the bot would stay up. Of course it would be much nicer if >>> the cygwin python process didn't get wedged. >>> >>> Alternately, I suppose I could try running native python... >>> or cygwin's python3... but dangit, kill -9 should work. >> >> Seems to be looping on access failure to a Windows mailslot; not sure what this >> feature is normally used for: dmesg/syslog messages/AF_UNIX sockets? > > /dev/kmsg is implemented using a mailslot under the hood. This > feature is only used to log exceptions and for nothing else since > nobody ever found another reason to use it for. > > It would be interesting to learn if the perl hangs have the same reason. > > I guess we can simply remove /dev/kmsg support completely and drop > the mailslot code. I'm pretty sure nobody would miss it. Hardly > anybody knows it exists... Is /dev/log implemented the same way? Looks like syslog-ng stopped working around the last upgrade: $ cat /var/log/syslog-ng.log Error reading serialized data; error='Error reading file (short read)' Persistent configuration file is in invalid format, ignoring; Error binding socket; addr='AF_UNIX(/dev/log)', error='Address already in use (112)' Error initializing source driver; source='s_local', id='s_local#0' Error initializing message pipeline; ... [repeats] -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple