Mail Archives: cygwin-developers/2002/07/15/12:44:53

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-ID: <>
Date: Mon, 15 Jul 2002 12:44:48 -0400
X-Sybari-Trust: b9cad503 b923d9bf 0879ee9b 00000109
From: Joe Buehler <jbuehler AT hekimian DOT com>
Reply-To: joseph DOT buehler AT spirentcom DOT com
Organization: Spirent Communications
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cygwin Developers <cygwin-developers AT cygwin DOT com>
Subject: cygwin hang problem

I am using Cygwin to run a build system.  I have spent a couple weeks
and fixed a couple Cygwin problems, but am in the midst of
one that is very difficult to pin down.

The problem is that processes will sometimes just hang in a Win32
API call for no apparent reason.  Here is an example stack trace
of an invocation of "rm" that is hung (I have added the names for
the system dll stuff at top of stack):

(gdb) bt
#0  0x77f67a1b in _system_dlls__ ()_NtFsControlFile AT 40
#1  0x77f686de in _system_dlls__ ()_RtlpValidateCurrentDirectory AT 4
#2  0x77f65df6 in _system_dlls__ ()_RtlGetFullPathName_Ustr AT 24
#3  0x77f658fe in _system_dlls__ ()_RtlDosPathNameToNtPathName_U AT 16
#4  0x77dc2f05 in _system_dlls__ ()_GetFileSecurityW AT 20
#5  0x77dc3018 in _system_dlls__ ()_GetFileSecurityA AT 20
#6  0x61074600 in read_sd (file=0x616106dc "f:\\cygwin\\tmp\\",
     sd_buf=0x241e684, sd_size=0x241f690)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#7  0x61074aa7 in get_nt_attribute (
     file=0x616106dc "f:\\cygwin\\tmp\\", attribute=0x241fcfc,
     uidret=0x241f770, gidret=0x241f76c)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#8  0x61075382 in get_file_attribute (use_ntsec=-2147483648,
     file=0x616106dc "f:\\cygwin\\tmp\\", attribute=0x241fcfc,
     uidret=0x241f770, gidret=0x241f76c)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#9  0x61021f4b in fhandler_disk_file::fstat_helper (this=0x20024,
     buf=0x241fcf4, pc=0x241f934, ftCreationTime=
       {dwLowDateTime = 2679934098, dwHighDateTime = 29502071},
     ftLastAccessTime={dwLowDateTime = 2682590433, dwHighDateTime = 29502071},
     ftLastWriteTime={dwLowDateTime = 2680871628, dwHighDateTime = 29502071},
     nFileSizeHigh=0, nFileSizeLow=53, nFileIndexHigh=13500416,
     nFileIndexLow=24461, nNumberOfLinks=1)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#10 0x61021496 in fhandler_disk_file::fstat_by_handle (this=0x61611254,
     buf=0x241fcf4, pc=0x241f934)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#11 0x61021aed in fhandler_disk_file::fstat (this=0x61611254, buf=0x241fcf4,
     at /usr/local/cygwin-src/src/winsup/cygwin/
#12 0x6108d425 in stat_worker (name=0x61611654 "/tmp/",
     buf=0x241fcf4, nofollow=1, pc=0x241f934)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#13 0x6108d6fd in lstat64 (name=0x61611654 "/tmp/", buf=0x241fcf4)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#14 0x6108d736 in cygwin_lstat (name=0x61611654 "/tmp/",
     buf=0x241fde4) at /usr/local/cygwin-src/src/winsup/cygwin/
#15 0x0040867d in _size_of_stack_reserve__ ()
#16 0x00408769 in _size_of_stack_reserve__ ()
#17 0x004034cc in _size_of_stack_reserve__ ()
#18 0x00401970 in _size_of_stack_reserve__ ()
#19 0x610065b0 in dll_crt0_1 ()
     at /usr/local/cygwin-src/src/winsup/cygwin/
#20 0x61006a59 in _dll_crt0 ()
     at /usr/local/cygwin-src/src/winsup/cygwin/
#21 0x61006ab1 in dll_crt0 (uptr=0x0)
     at /usr/local/cygwin-src/src/winsup/cygwin/
#22 0x0040fc27 in _size_of_stack_reserve__ ()
#23 0x0040103d in _size_of_stack_reserve__ ()
#24 0x77f1ba06 in _system_dlls__ ()

It is not apparent to me why GetFileSecurity() would hang.  According
to the "handle" utility available from sysinternals on the net,
nothing has the file open except the "rm" process itself.

I have also seen similar hangs in calls to GetFileSecurity().

Any ideas what might be going on here?

The hang is on a dual-processor NT 4 machine running service pack 5.

The same test ran fine a half-dozen times over the weekend
on a single-processor XP machine.
Joe Buehler
Principal Software Engineer
Hekimian Division
15200 Omega Drive
Rockville, MD 20850-3240 USA
Phone: +1 301.590.3600
Fax: +1 301.590.3692

- Raw text -

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