This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: setup hangs during postinstall


OK, again with simple tests...  I've added a printf to the very start of
main in cygpath.cc...

---
Steve Fairbairn@stevefnec /etc/postinstall
$ ./setup_from_win.sh
+ CYGWIN_DEBUG=/bin/cygpath
+ set CYGWIN_SLEEP=20000
+ echo -e 'CYGWIN_DEBUG=/bin/cygpath\tCYGWIN_SLEEP='
CYGWIN_DEBUG=/bin/cygpath       CYGWIN_SLEEP=
++ cygpath -A -P
+ TOPFOLDER=Entered cygpath
/cygdrive/c/Documents and Settings/All Users/Start
Menu/Programs/Cygwin-XFree86
+ echo Entered cygpath /cygdrive/c/Documents and Settings/All Users/Start
Menu/Programs/Cygwin-XFree86
Entered cygpath /cygdrive/c/Documents and Settings/All Users/Start
Menu/Programs/Cygwin-XFree86
---

The 'Entered cygpath' bit is my addition.  When this is run via setup
however...

---
Steve Fairbairn@stevefnec /etc/postinstall
$ tail -11 /var/log/setup.log.full
2003/10/15 13:22:50 running: D:\cygwin\bin\sh.exe -c
/etc/postinstall/setup_from_win.sh
+ CYGWIN_DEBUG=/bin/cygpath
+ set CYGWIN_SLEEP=20000
+ echo -e 'CYGWIN_DEBUG=/bin/cygpath\tCYGWIN_SLEEP='
CYGWIN_DEBUG=/bin/cygpath       CYGWIN_SLEEP=
++ cygpath -A -P
+ TOPFOLDER=/Cygwin-XFree86
+ echo /Cygwin-XFree86
/Cygwin-XFree86
2003/10/15 13:27:13 mbox note: Nothing needed to be installed
2003/10/15 13:27:14 Ending cygwin install
---

Which implies main isn't even being reached.

I have tried HUP and USR1 as kill signals to cygpath, but it doesn't seem to
handle any signals so all terminate the program in the same way.

I have attached strace to the process once it has hung, but there is no
output until the process recieves a signal from kill and then the output
just seems to be the signal handling/termination (attached anyway).

> -----Original Message-----
> From: Christopher Faylor
> Sent: 10 October 2003 01:28
> Subject: Re: setup hangs during postinstall
> 
> In any event, can you set the CYGWIN_DEBUG=cygpath and maybe do some
> search and destroy debugging to see precisely where it is hanging?
> 

I can't get CYGWIN_DEBUG=cygpath to do anything at all, inside bash or from
setup.

>From another email:
> 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.
>

Tried this as well, but I may be ammending the wrong code, or my simple
change isn't good enough...

---
static void __stdcall
build_argv (char *cmd, char **&argv, int &argc, int winshell)
{
  int argvlen = 0;
  int nesting = 0;              // monitor "nesting" from insert_file

  argc = 0;
  argvlen = 0;
  argv = NULL;

  if (strstr(cmd, "cygpath"))
  {
    argvlen = argc + 10;
    argv = (char **) realloc (argv, (1 + argvlen) * sizeof (argv[0]));
    argv[argc++] = "gdb";
    argv[argc++] = "/bin/cygpath.exe";
    *cmd = 0;
  }

  /* Scan command line until there is nothing left. */
  while (*cmd)
    {
---

The rest of the function is unchanged.  When I use cygpath on the command
line in bash, all works as it did before as if my addition doesn't exist.  I
did make sure no cygwin processes were running, I did remake and install the
dll, I did copy it into /bin over the top of my existing debugging dll.

I'm running out of random things to prod at in random ways ;)

If any of this is being any use, please let me know.  If anyone can tell me
what I'm doing wrong with my attempts above then please yell.  If anyone
wants me to try anything else and can explain it well enough for me to do,
then brign it on.

Cheers,

Steve.
-- 
-- LONG DISCLAIMER --

******************************************************* 
This email has originated from Perwill plc (Registration No. 1906964) 
Office registered at: 13A Market Square, Alton, Hampshire, GU34 1UR, UK 
Tel: +44 (0)1420 545000 
Fax: +44 (0)1420 545001 
www.perwill.com 
******************************************************* 
Privileged, confidential and/or copyright information may be contained 
in this email, and is only for the use of the intended addressee. 
To copy, forward, disclose or otherwise use it in any way if you are not 
the intended recipient or responsible for delivering to him/her is
prohibited.
If you receive this email by mistake, please advise the sender immediately, 
by using the reply facility in your email software.

We may monitor the content of emails sent and received via our network 
for the purposes of ensuring compliance with policies and procedures. 
This message is subject to and does not create or vary any contractual 
relationships between Perwill plc and the recipient. 
******************************************************* 
Any opinions expressed in the email are those of the sender and not 
necessarily of Perwill plc.
******************************************************* 
This email has been scanned for known viruses using 
McAfee WebShield 4.5 MR1a 
******************************************************* 


  

Attachment: strace_out_HUP.txt
Description: Text document

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]