delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/07/30/16:14:29

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Sat, 30 Jul 2011 16:13:48 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.10s 20110729 - problem listing services in /proc
Message-ID: <20110730201347.GA29022@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4E3302E5 DOT 6000602 AT acm DOT org> <j105ne$jrp$1 AT dough DOT gmane DOT org> <20110730082130 DOT GI26203 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20110730082130.GI26203@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 Sat, Jul 30, 2011 at 10:21:30AM +0200, Corinna Vinschen wrote:
>On Jul 30 14:44, jojelino wrote:
>> Breakpoint 2, fhandler_registry::close (this=0x612cba5c)
>>     at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:856
>> 856           cfree (value_name);
>> 10: this->value_name = 0x612cb374 L"services"
>> (gdb)
>> Continuing.
>> 
>> 0x612cba5c->value_name = 0
>> 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374
>> L"services" (quadruple-freed but known as not freed)
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x7c80bef7 in RaiseException () from
>> /cygdrive/c/WINDOWS/system32/kernel32.dll
>> 
>> In brief, same address quadruple-freed. because of dangling pointer.
>> Regards.
>
>It turned out that I could reproduce the problem, I just didn't notice
>it.  I expected an error message but find died silently, so I took that
>as "it works".  Serves me right for looking into Cygwin bug reports too
>late at night.

Funny.  I did exactly the same thing maybe for the same reason.  If I
had run the command under strace, I would have seen that it failed.

The snapshot bisection + jojelino's debugging did point at the reason
for the problem, though.  I changed the way dup() worked slightly back
in May and that tickled a nascent problem in fhandler_registry::dup.

Thanks to everyone who contributed debugging details.

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

- Raw text -


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