public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Quanah Gibson-Mount <quanah@symas.com>
To: cygwin@cygwin.com
Subject: Bug report: Killing a native process may not actually kill it
Date: Thu, 25 Jul 2019 17:32:00 -0000	[thread overview]
Message-ID: <D2D1E09243A3854178C12845@[192.168.1.39]> (raw)

As found and reported to the MSYS team back in 2006 by Howard Chu, if a 
native process is spawned, control-C, the kill command, etc, may not 
actually kill the process.  Details are here:

<http://mingw.5.n7.nabble.com/Re-Ctrl-Break-handler-td28010.html>

as well as here:

<https://sourceforge.net/p/mingw/bugs/1783/>

Given that there is now 64-bit windows, the issue would be a bit more 
complex to resolve, as an updated patch would need to query first to see if 
the target process is 32-bit or 64-bit, and then a 64-bit version of the 
patch needs to be created.

The inability to properly kill such a spawned process can lead to things 
like the dreaded "Device or resource busy" error, since the process that is 
using the related file has actually never terminated.

It's fairly trivial to reproduce this in the OpenLDAP test suite, 
particularly test001, which spawns a slapd process, kills it, then spawns 
another slapd process, which will fail because the original slapd never 
actually got killed.

Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>


--
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

             reply	other threads:[~2019-07-25 17:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 17:32 Quanah Gibson-Mount [this message]
2019-07-25 18:30 ` openldap on Cygwin (was: Bug report: Killing a native process may not actually kill it) Achim Gratz
2019-07-25 19:04   ` openldap on Cygwin Quanah Gibson-Mount
2019-08-28 15:46 ` Bug report: Killing a native process may not actually kill it Quanah Gibson-Mount
2019-08-28 15:59   ` Corinna Vinschen
2019-08-28 16:02     ` Quanah Gibson-Mount
2019-08-28 20:33       ` Corinna Vinschen
2019-08-28 22:43       ` Kaz Kylheku
2019-08-29  0:02         ` Quanah Gibson-Mount
2019-08-29  1:01           ` Steven Penny
2019-09-03  5:38             ` Ray Donnelly

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='D2D1E09243A3854178C12845@[192.168.1.39]' \
    --to=quanah@symas.com \
    --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).