delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/23/06:29:51

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record:x-gm-message-state; bh=9P/olmPo6YfYygt7bJ0RnfEIL0QINGmauIfxLuswHYE=; b=mx6RPB5PY9o1dYsxy7HgWolwDWr19SRt8VYAzGz0kGp23iJHlFO4+3saO+/SxuWbAm NX3Z1SDQL+4FmzJvki1MWb1nOF6LY8mbuh3APchyVwF9Ctk5M/E+BLvY7yuavsjJz7JZ SWqKoWPSmOPzhqR+9VgB6i54Uz3L+GpDaEpAHwljldr8wRcomTVF5DCFhM9RzWNnx8h2 IaaF0XqvTshyvpLu8UWKUrGNVeJiVP5W2ScEk7Sofe4X+prYSuEMSvbvuJtGwIt/DWsP 8uYjTHQwtmszuHxHsuRzHPfbPYzQpZ2+gexH1KIEuJtn+xzNkiGqNFFjR9PpgoTIp/5V gNiA==
MIME-Version: 1.0
Date: Thu, 23 Aug 2012 14:29:21 +0400
Message-ID: <CACgPhYrxk8_DvbZ44afZ9OrLTvXHn1-geyuL2EpfPWeeDG1yZw@mail.gmail.com>
Subject: Re: Cygwin crashes in kill_pgrp, _pinfo truncation issue.
From: Andrey Khalyavin <halyavin AT google DOT com>
To: cygwin AT cygwin DOT com
X-System-Of-Record: true
X-Gm-Message-State: ALoCoQnGm1by1zINYFeKcI5/oA1NzukbqJkAVDwrdmcXIcJuRthEY1XzS2As8GpHTWmJMrDeeVH5Ez5sxVzyaR7+H7AyXMI9YMuTCwVHVYfH5kkdd2lwxTivlK7C4D39t+ji5+kPNRF7a6YP7uVsWND3Fq2AbiItZn928Cz9Mh/kLiQNg+GvvZlF2qTK1BzCyiTUXTSkIf+O
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, 15 Aug 2012 10:11:16 -0400, Christopher Faylor wrote:
>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

I got two more crash dumps from our bots running 20120816 snapshot.
Both of them crashed in this place. process_state equals to
PID_IN_USE | PIE_EXECED and your new check in _pinfo::exist is really there.
So the race condition on process_state field does happens in practice.

Andrey Khalyavin

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019