X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1/srI6Lkdc3rhuzJzh7Y3Z3
Date: Wed, 15 Aug 2012 10:11:16 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin crashes in kill_pgrp, _pinfo truncation issue.
Message-ID: <20120815141116.GA32249@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <CACgPhYpaRft6EfP6uDR34487TJ5-932cHDNyYssLg1nUSdr4Fw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CACgPhYpaRft6EfP6uDR34487TJ5-932cHDNyYssLg1nUSdr4Fw@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Aug 15, 2012 at 04:54:42PM +0400, Andrey Khalyavin wrote:
>I finally got a cygwin crash dump from our build bots. It shows, that
>cygwin1.dll crashes in kill_pgrp function on line:
>	  (pid > 1 && p->pgid != pid) ||
>where p is a pointer to _pinfo. This function enumerates all _pinfo's
>and executes this line for all of them which pass p->exists() check.
>In crash dump p points to _pinfo that has process_state equal to
>PID_IN_USE | PID_EXECED.

Thanks for tracking this down.  I've added a check for "execed" to
_pinfo::exists.

cgf

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

