2001-06-28 CVS ash Background Win32 Process Hang Problem

Jason Tishler Jason.Tishler@dothill.com
Fri Jul 13 12:09:00 GMT 2001


I have some more (hopefully useful) information...

On Tue, Jul 10, 2001 at 04:28:11PM -0400, Jason Tishler wrote:
> The problem does not occur in 1.3.2 -- so it has been introduced since
> that release.

It appears that this problem was introduced somewhere between 1.3.2
(which uname -a indicates was built on 2001-05-20 23:28) and when the
2001-05-22 snapshot was built.  Unfortunately, even after reviewing the
CVS commit mailing list, I could not find the culprit.

Anyway, I've attached two strace logs -- the first exhibits the hang,
then second does not.  The first one is produced by:

    $ strace -o hang.log sh hang.sh

and the second by:

    $ strace -o nohang.log bash hang.sh

Here is an interesting snippet from hang.log:

 1262  248348 [main] sh 428 spawn_guts: spawn_guts null_app_name 0 (c:\WINNT\system32\notepad.exe, c:\WINNT\system32\notepad.exe)
 1701  250049 [main] sh 428 spawn_guts: 463 = spawn_guts (/mnt/c/WINNT/system32/notepad, c:\WINNT\system32\notepad.exe)
  276  250325 [main] sh 428 proc_subproc: args: 1, 37876916
  189  250514 [main] sh 428 proc_subproc: added pid 463 to wait list, slot 0, winpid 0x1CF, handle 0x344
  171  250685 [main] sh 428 proc_subproc: returning 1                             166  250851 [main] sh 428 spawn_guts: spawned windows pid 463
  178  251029 [proc] sh 428 wait_subproc: looping

XXX hangs here XXX

55124741 55375770 [proc] sh 428 proc_subproc: args: 2, 0
  318 55376088 [proc] sh 428 proc_subproc: pid 463[0] terminated, handle 0x344, nchildren 1, nzombies 0
  220 55376308 [proc] sh 428 proc_subproc: zombifying [0], pid 463, handle 0x344, nchildren 1
  171 55376479 [proc] sh 428 proc_subproc: returning 1
  161 55376640 [proc] sh 428 sig_send: pid 428, signal 20, its_me 1
  164 55376804 [proc] sh 428 sig_send: Not waiting for sigcomplete.  its_me 1 signal 20
  162 55376966 [proc] sh 428 sig_send: returning 0 from sending signal 20
  159 55377125 [proc] sh 428 wait_subproc: looping
  171 55377296 [main] sh 428 spawn_guts: subprocess exited

Note that when the hang returns there appears to be some unusually large
numbers in column one and two which seem to indicate uninitialized or
corrupted memory.

Also attached is a gdb session obtained by attaching to the hung sh.exe.
It appears that Cygwin is hung on WaitForMultipleObjects(), but nwait is
also a huge number...

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hang.log.gz
Type: application/x-gzip
Size: 13981 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20010713/ced1dd34/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nohang.log.gz
Type: application/x-gzip
Size: 19601 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20010713/ced1dd34/attachment-0001.bin>


More information about the Cygwin-developers mailing list