X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.6 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=eh1UfKXeR8eDUb6x1d1xgcoTsiczvmEVadB5WvO0QKg=; b=YJenid8nXmEv0j0KG8isWEcq06q7xDl40C8kw6hXgSB8SZ8dnx/F36FZehRjaLBv6+ R/XNpaEcAHzpasC2i5c8P/zX4kmkjbrQ4/JbThZqYepskhB9JNL+McSFnEj+42dGyUJp Gw5ZkH8jncJhmFm6Umg0uxwYzRhjuEFzPFCGEiGXyVp+C6m9ACN2az+4hIFo5m4AfJig cEbfKfNwUWZ0mvSY05R35P/BjHKf2QX3RqKOdItwXd18ydWGGGWfE7Q4KpGh39l1NaEH iF63ayNU77fY49JCSA0SoSoPZpWh+ZXOFQx93R93B1C2LzkyI9VndQQyVxJYs2I0bj8l +ZlA== MIME-Version: 1.0 Date: Thu, 16 Aug 2012 20:20:37 +0400 Message-ID: Subject: Re: Cygwin crashes in kill_pgrp, _pinfo truncation issue. From: Andrey Khalyavin To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQndayVgQRtMlkPSXQ8AOA0qBdkI1rMjnDdx5Ah3nHRQzpDqqltOQ8YZ5e0tHGggL7qS22sLvVyQnT5ynveAuVjqxmSvh5TMolil8foXZCv7hqeMnlC6e8sZS4VSi3qpoh7RPAU3hW1Z2Qj1OOolhOpIE19W5hfaW/lL/YlHLbA1y8Gy+aeeFDluTojZAmJKO45WUQMs Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 updated core libraries from 20120803 snapshot to 20120815 snapshot and now bash crashes when I execute rm -rf dir. Reproducibility is strange. It crashed for hours when I entered cd /tmp mkdir a rm -rf a commands but now suddenly stopped crashing in this case. It is still crashes on rm -rf in the real script we use though. Crash happens in setup_handler function on line HANDLE hth = (HANDLE) *tls; because tls->tid equals to zero. Definition of this operation is in sygtls.h: operator HANDLE () const {return tid->win32_obj_id;}. setup_handler is called from sigpacket::process which in turn called from wait_sig. Signal number is 20, signal code is 28. All fields of tls structure are zero with exception stacklock equal to 1 and stackptr equal to address of tls->stack. I don't understand what goes wrong here. Can you suggest what I can look for in the debugger? 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