delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/15/13:50:40

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
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Wed, 15 Oct 2003 12:49:18 -0500 (CDT)
From: Brian Ford <ford AT vss DOT fsi DOT com>
X-X-Sender: ford AT eos
To: cygwin <cygwin AT cygwin DOT com>
Subject: RE: setup hangs during postinstall
In-Reply-To: <D721826DEE793D49BC49582C121EDD3E3F55C8@exchange.perwill.com>
Message-ID: <Pine.GSO.4.56.0310151242250.823@eos>
References: <D721826DEE793D49BC49582C121EDD3E3F55C8 AT exchange DOT perwill DOT com>
MIME-Version: 1.0

On Wed, 15 Oct 2003, Steve Fairbairn wrote:

> OK, so I tried a lot of things already tried, and at least one thing that
> hadn't been tried ;).  I must admit I haven't followed everything said in
> the threads so didn't realise we already knew cygpath wasn't actually
> starting.
>
No problem here.

> So, getting this straight in my own head.
>
I'll try and answer some of these with my somewhat limited knowledge.

> Setup runs normally.
> Setup creates a new thread or process to run our bash script - Is this
> done with sh, then sh runs bash because of the #/bin/bash, or does setup
> run bash straight?
>
/bin/sh -c bash_script.sh

> Bash starts up and does some parts of the script.
> Bash then tries to run cygpath....  At this point does the cygwin DLL
> emulates a fork & exec (as windows only has CreateProcess) ?
>
Yes, for bash.

> If cygpath isn't starting.... Does this mean it's still running
> bash/cygwin1.dll code at the point of the hang?
>
Well, the real cygpath does exist.  It is just hung.  There is still an
exec stub of bash (called cygpath is ps) that is waiting on the real
cygpath to get further up.

I don't know how this communication works when bash is starting a
non-Cygwin process, though.

> Is it possible to put a nice big sleep into the bash script before the it
> gets to the cygpath.
> Attach gdb to bash during this sleep
> Add a break point to the exec or whatever the function is
> Continue until breakpoint is hit
> Step through the whole operation of launching cygpath?
>
Sure, or just CYGWIN_DEBUG=bash.

> Is it possible?  Could it potentially be useful?  Would we hit Windows
> internal code that stops us getting to anything useful?
>
Not sure.

I think a *real* expert may have to look at this since even a non-Cygwin
SHLWAPI based executable hangs.  It must be something that happened in the
long chain shown at the bottom of here that mucks up Windows:

http://www.cygwin.com/ml/cygwin/2003-10/msg00949.html

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

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