delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/14/12:56:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Tue, 14 Oct 2003 12:55:22 -0400
From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: setup hangs during postinstall
Message-ID: <20031014165522.GF16944@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT GSO DOT 4 DOT 56 DOT 0310131207550 DOT 791 AT eos> <20031014025019 DOT GA31727 AT redhat DOT com> <Pine DOT GSO DOT 4 DOT 56 DOT 0310141018270 DOT 791 AT eos>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.56.0310141018270.791@eos>
User-Agent: Mutt/1.4.1i

On Tue, Oct 14, 2003 at 10:27:45AM -0500, Brian Ford wrote:
>On Mon, 13 Oct 2003, Christopher Faylor wrote:
>
>> On Mon, Oct 13, 2003 at 12:22:12PM -0500, Brian Ford wrote:
>> >Since setup must be launched from explorer to hang, I set
>> >CYGWIN_DEBUG=cygpath in my system environment variables and rebooted.  To
>> >make sure it worked, I launched a bash under rxvt and did a "cygpath -S".
>> >Up popped the gdb cmd shell.  But, under setup, no dice.
>>
>> Are you saying that there was no popup?  That would imply that CYGWIN_DEBUG
>> is not in the environment.  You could just hack on the code in dcrt0.cc to
>> automatically pop up a gdb when command line contains cygpath, as a temporary
>> measure, of course.
>>
>Yes, but I'm sure it *was* in the environment.  In fact, after terminating
>my manually attached gdb session, it popped up (this is NT4, so cypath
>had to exit at gdb detach time).

So it must not really be cygpath that is hanging, then.  The stack trace that
you provided was more likely for an execed bash stub.  You could try setting
CYGWIN_DEBUG=bash to test that theory.

>> The stack trace below is from a process that is running cygpath not
>> from cygpath itself.
>>
>Ok.  That is what it looked like to me too, but I don't know how the
>Cygwin "fork exec" stuff works yet (spawn_guts is huge), so I wasn't
>entirely sure.
>
>Maybe I was just too rushed, but I'm almost positive I attached to
>the only thing ps -ef said was cygpath.  Why does the spawner (bash?) say
>it's cygpath?

The name of the stub changes when it execs a process.  It goes something
like this:

1) Call exec

2) exec calls CreateProcess, sets up pinfo structure with newly created
   windows pid, maintaining the cygwin pid.

3) exec (stub) changes name in pinfo structure to that of execed program.

4) exec (stub) waits for execed program to say "I'm here".

4) exec (stub) exits.

So, for a brief time there are two processes attached to the same pinfo.
The task manager (and maybe ps -W) will tell you the "real" windows
process that is running.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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