public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Odd hang in python waiting for child; strace wakes hung process?
Date: Sat, 24 Mar 2018 01:54:00 -0000	[thread overview]
Message-ID: <e2a3067b-586e-a334-e316-a4f54c99f082@SystematicSw.ab.ca> (raw)
In-Reply-To: <20180322165908.GI6761@calimero.vinschen.de>

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 <Stromeko@nexgo.de> 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

  parent reply	other threads:[~2018-03-24  1:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 17:55 Dan Kegel
2018-03-21 19:20 ` Achim Gratz
2018-03-21 22:09   ` Dan Kegel
2018-03-22  7:38     ` Brian Inglis
2018-03-22 17:10       ` Corinna Vinschen
2018-03-22 21:05         ` Dan Kegel
2018-03-24  1:54         ` Brian Inglis [this message]
2018-03-25 18:12           ` Corinna Vinschen
2018-03-25 22:16             ` Brian Inglis
2018-03-22 17:33     ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2a3067b-586e-a334-e316-a4f54c99f082@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).