delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/12/27/15:50:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_STOCKTIP,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Forefront-Antispam-Report: CIP:157.56.242.197;KIP:(null);UIP:(null);IPV:NLI;H:BL2PRD0512HT002.namprd05.prod.outlook.com;RD:none;EFVD:NLI
X-SpamScore: 0
X-BigFish: PS0(zz146dM1447Izz1de0h1202h1e76h1d1ah1d2ahzz75dfhb412mz32i2a8h668h839h947hd25he5bhf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h1765h1155h)
Message-ID: <50DCB454.9030400@coverity.com>
Date: Thu, 27 Dec 2012 15:49:24 -0500
From: Tom Honermann <thonermann AT coverity DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version: 1.0
To: <cygwin AT cygwin DOT com>
Subject: Re: Intermittent failures retrieving process exit codes - snapshot test requested
References: <50D401EF DOT 9040705 AT coverity DOT com> <20121221103241 DOT GD18188 AT calimero DOT vinschen DOT de> <20121221161024 DOT GA10871 AT ednor DOT casa DOT cgf DOT cx> <20121221170219 DOT GF18188 AT calimero DOT vinschen DOT de> <20121221193620 DOT GA29203 AT ednor DOT casa DOT cgf DOT cx> <50D4E144 DOT 706 AT gmail DOT com> <20121222024943 DOT GA5773 AT ednor DOT casa DOT cgf DOT cx> <20121222031430 DOT GA8355 AT ednor DOT casa DOT cgf DOT cx> <50D57818 DOT 1070706 AT gmail DOT com> <20121222175041 DOT GA14475 AT ednor DOT casa DOT cgf DOT cx> <20121223165621 DOT GA9935 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20121223165621.GA9935@ednor.casa.cgf.cx>
X-OriginatorOrg: coverity.com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

I've been doing some testing with the latest source (pulled updates 
about 30 minutes ago).  I'm no longer able to reproduce any problems 
with incorrect exit codes (Yay!  Thanks for the quick turn around on 
that!), but I am seeing some new errors when terminating the infinite 
loop via ctrl-c using the test case below.  This is a test case I was 
using previously to help isolate the original problem - I had added 
special_printf() calls in a few places and was using strace -m special 
to trigger them.  All of my changes have been reverted and I'm back to 
using vanilla source code.  This test is run with a newly built 
strace.exe and cygwin1.dll (the false.exe is an old one)

c:\>type test-strace.bat
@echo off
setlocal

set PATH=%CD%;%PATH%

:loop
echo test...
strace -m special false
if not errorlevel 1 (
     echo exiting...
     exit /B 1
)
goto loop


When interrupting the test run, I'll often (but not always) get the 
following error:

c:\>test-strace.bat
test...
test...
test...
test...
--- Process 8092, exception 40010005 at 75E26D67
Terminate batch job (Y/N)? y


Additionally, some of the Cygwin gcc built utilities that I've built for 
testing now occasionally hang upon interruption by ctrl-c.  Basic 
diagnostics courtesy of gdb follow.

This utility was one used in place of strace in the test case above.  It 
does a fork() and execlp() of its first parameter and then calls 
waitpid() on the child and asserts that the exit code received is 1.

If anyone knows of a way to get accurate stack traces when both gcc and 
Microsoft compiled modules are present, I'll be happy to regenerate the 
stack traces below.

$ gdb --pid=6908
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
...
Reading symbols from 
/home/thonermann/cygwin/test-install/bin/expect-false-execve-cygwin32.exe...done.
...
(gdb) info shared
 From        To          Syms Read   Shared Object Library
0x77461000  0x775c5d1c  Yes (*)     /cygdrive/c/Windows/SysWOW64/ntdll.dll
0x75d71000  0x75e6bd58  Yes (*) 
/cygdrive/c/Windows/syswow64/kernel32.dll
0x74ba1000  0x74be5a08  Yes (*) 
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
0x61001000  0x61490000  Yes 
/home/thonermann/cygwin/test-install/bin/cygwin1.dll
0x76271000  0x76354198  Yes (*)     /cygdrive/c/Windows/system32/user32.dll
0x74f11000  0x74f8292c  Yes (*)     /cygdrive/c/Windows/syswow64/GDI32.dll
0x76181000  0x761892f8  Yes (*)     /cygdrive/c/Windows/syswow64/LPK.dll
0x74d71000  0x74e0c9fc  Yes (*)     /cygdrive/c/Windows/syswow64/USP10.dll
0x75bf1000  0x75c9b2c4  Yes (*)     /cygdrive/c/Windows/syswow64/msvcrt.dll
0x75eb1000  0x75f4f04c  Yes (*) 
/cygdrive/c/Windows/syswow64/ADVAPI32.dll
0x74ed1000  0x74ee8ed8  Yes (*)     /cygdrive/c/Windows/SysWOW64/sechost.dll
0x76371000  0x76445e04  Yes (*)     /cygdrive/c/Windows/syswow64/RPCRT4.dll
0x74b41000  0x74b821f0  Yes (*)     /cygdrive/c/Windows/syswow64/SspiCli.dll
0x74b31000  0x74b3b474  Yes (*) 
/cygdrive/c/Windows/syswow64/CRYPTBASE.dll
0x76581000  0x765c1ce0  Yes (*)     /cygdrive/c/Windows/system32/IMM32.DLL
0x75ca1000  0x75d6bebc  Yes (*)     /cygdrive/c/Windows/syswow64/MSCTF.dll
0x70e41000  0x70e8b464  Yes (*)     /cygdrive/c/Windows/system32/apphelp.dll
(*): Shared library is missing debugging information.

(gdb) info thread
   Id   Target Id         Frame
* 4    Thread 6908.0x1950 0x7747000d in ntdll!LdrFindResource_U ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
   3    Thread 6908.0x1d8c 0x7747f8e5 in ntdll!RtlUpdateClonedSRWLock ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
   2    Thread 6908.0x1d34 0x7747f8b1 in ntdll!RtlUpdateClonedSRWLock ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
   1    Thread 6908.0x1344 0x7748013d in 
ntdll!RtlEnableEarlyCriticalSectionEventCreation ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll

(gdb) thread 1
[Switching to thread 1 (Thread 6908.0x1344)]
#0  0x7748013d in ntdll!RtlEnableEarlyCriticalSectionEventCreation ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0  0x7748013d in ntdll!RtlEnableEarlyCriticalSectionEventCreation ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
#1  0x7748013d in ntdll!RtlEnableEarlyCriticalSectionEventCreation ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
#2  0x74bb0bdd in WaitForMultipleObjectsEx () from 
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3  0x00000002 in ?? ()
#4  0x00000001 in ?? ()
#5  0x00000000 in ?? ()

(gdb) thread 2
[Switching to thread 2 (Thread 6908.0x1d34)]
#0  0x7747f8b1 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0  0x7747f8b1 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1  0x7747f8b1 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2  0x74bb0a91 in WaitForSingleObjectEx () from 
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3  0x00000034 in ?? ()
#4  0x00000000 in ?? ()

(gdb) thread 3
[Switching to thread 3 (Thread 6908.0x1d8c)]
#0  0x7747f8e5 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0  0x7747f8e5 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1  0x7747f8e5 in ntdll!RtlUpdateClonedSRWLock () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2  0x74bad348 in ReadFile () from 
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3  0x00000118 in ?? ()
#4  0x00000000 in ?? ()

(gdb) thread 4
[Switching to thread 4 (Thread 6908.0x1950)]
#0  0x7747000d in ntdll!LdrFindResource_U () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0  0x7747000d in ntdll!LdrFindResource_U () from 
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1  0x774ff896 in ntdll!RtlQueryTimeZoneInformation ()
    from /cygdrive/c/Windows/SysWOW64/ntdll.dll
#2  0x5dfded78 in ?? ()
#3  0x00000000 in ?? ()

Tom.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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