This is the mail archive of the cygwin-developers@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]

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@40
#1  0x77f686de in _system_dlls__ ()_RtlpValidateCurrentDirectory@4
#2  0x77f65df6 in _system_dlls__ ()_RtlGetFullPathName_Ustr@24
#3  0x77f658fe in _system_dlls__ ()_RtlDosPathNameToNtPathName_U@16
#4  0x77dc2f05 in _system_dlls__ ()_GetFileSecurityW@20
#5  0x77dc3018 in _system_dlls__ ()_GetFileSecurityA@20
#6  0x61074600 in read_sd (file=0x616106dc "f:\\cygwin\\tmp\\temp.ar.327",
    sd_buf=0x241e684, sd_size=0x241f690)
    at /usr/local/cygwin-src/src/winsup/cygwin/security.cc:1030
#7  0x61074aa7 in get_nt_attribute (
    file=0x616106dc "f:\\cygwin\\tmp\\temp.ar.327", attribute=0x241fcfc,
    uidret=0x241f770, gidret=0x241f76c)
    at /usr/local/cygwin-src/src/winsup/cygwin/security.cc:1136
#8  0x61075382 in get_file_attribute (use_ntsec=-2147483648,
    file=0x616106dc "f:\\cygwin\\tmp\\temp.ar.327", attribute=0x241fcfc,
    uidret=0x241f770, gidret=0x241f76c)
    at /usr/local/cygwin-src/src/winsup/cygwin/security.cc:1278
#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/fhandler_disk_file.cc:273
#10 0x61021496 in fhandler_disk_file::fstat_by_handle (this=0x61611254,
    buf=0x241fcf4, pc=0x241f934)
    at /usr/local/cygwin-src/src/winsup/cygwin/fhandler_disk_file.cc:95
#11 0x61021aed in fhandler_disk_file::fstat (this=0x61611254, buf=0x241fcf4,
    pc=0x241f934)
    at /usr/local/cygwin-src/src/winsup/cygwin/fhandler_disk_file.cc:198
#12 0x6108d425 in stat_worker (name=0x61611654 "/tmp/temp.ar.327",
    buf=0x241fcf4, nofollow=1, pc=0x241f934)
    at /usr/local/cygwin-src/src/winsup/cygwin/syscalls.cc:1134
#13 0x6108d6fd in lstat64 (name=0x61611654 "/tmp/temp.ar.327", buf=0x241fcf4)
    at /usr/local/cygwin-src/src/winsup/cygwin/syscalls.cc:1178
#14 0x6108d736 in cygwin_lstat (name=0x61611654 "/tmp/temp.ar.327",
    buf=0x241fde4) at /usr/local/cygwin-src/src/winsup/cygwin/syscalls.cc:1186
#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/dcrt0.cc:774
#20 0x61006a59 in _dll_crt0 ()
    at /usr/local/cygwin-src/src/winsup/cygwin/dcrt0.cc:872
#21 0x61006ab1 in dll_crt0 (uptr=0x0)
    at /usr/local/cygwin-src/src/winsup/cygwin/dcrt0.cc:885
#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 temp.ar.327 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
SPIRENT COMMUNICATIONS
15200 Omega Drive
Rockville, MD 20850-3240 USA
Phone: +1 301.590.3600
Fax: +1 301.590.3692
www.spirentcom.com


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