X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <4756F09D.7060305@symantec.com> Date: Wed, 05 Dec 2007 10:40:29 -0800 From: srp Reply-To: sean_pierce AT symantec DOT com User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.5.24 format.com hangs through ssh References: <120320072211 DOT 2441 DOT 47547F1A000B21E0000009892216566276CFCECF9F9D9C AT comcast DOT net> <475484D4 DOT 50807 AT cygwin DOT com> <47548955 DOT 1030703 AT symantec DOT com> <475581D6 DOT 7070205 AT symantec DOT com> <4756EB42 DOT 70509 AT symantec DOT com> <04c401c8376c$b4bd2730$2e08a8c0 AT CAM DOT ARTIMI DOT COM> In-Reply-To: <04c401c8376c$b4bd2730$2e08a8c0@CAM.ARTIMI.COM> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Your good Dave. $ echo "y " | format.com Z: /FS:NTFS /Q /V:zlbl The type of the file system is RAW. The new file system is NTFS. WARNING, ALL DATA ON NON_REMOVABLE DISK DRIVE Z: WILL BE LOST! Proceed with Format (Y/N)? QuickFormatting 100m Creating file system structures. Format complete. 102399 KB total disk space. 100126 KB are available Yay! Thank you. -srp Dave Korn wrote: > On 05 December 2007 18:18, srp wrote: > >> windbg stack after answering "Proceed with Format (Y/N)?" is >> 0:002> ~* >> 0 Id: 5bc.ce0 Suspend: 1 Teb: 7ffdf000 Unfrozen >> Start: format!mainCRTStartup (010067ea) >> Priority: 0 Priority class: 32 Affinity: f >> 1 Id: 5bc.fac Suspend: 1 Teb: 7ffde000 Unfrozen >> Start: kernel32!BaseThreadStartThunk (77e617ec) >> Priority: 0 Priority class: 32 Affinity: f >> . 2 Id: 5bc.d34 Suspend: 1 Teb: 7ffdd000 Unfrozen >> Start: ntdll!DbgUiRemoteBreakin (7c83fdb4) >> Priority: 0 Priority class: 32 Affinity: f > > Thread 2 is a special thread created by the debugger to get your process stopped and under debug control by issuing an exception from within the process context. > > Thread 1 is the cygwin signal-handling thread. > > Thread 0 is the actual main application itself. > > >> 0:001> ~0s >> ntdll!KiFastSystemCallRet: >> 7c8285ec c3 ret >> 0:000> k >> ChildEBP RetAddr >> 0006f748 7c82776b ntdll!KiFastSystemCallRet >> 0006f74c 77e418b2 ntdll!NtReadFile+0xc >> 0006f7b4 71f8b9ba kernel32!ReadFile+0x16c >> 0006f7dc 71f84ea8 ulib!PIPE_STREAM::FillBuffer+0x3c >> 0006f820 71f8523c ulib!BUFFER_STREAM::GetBuffer+0x30 >> 0006f898 71f8c72c ulib!BUFFER_STREAM::ReadString+0x44 >> 0006f8d4 71f8c857 ulib!STREAM_MESSAGE::ReadLine+0x5c >> 0006f934 01005b8c ulib!STREAM_MESSAGE::IsYesResponse+0x70 >> 0006ff44 01006919 format!main+0x992 >> 0006ffc0 77e6f23b format!mainCRTStartup+0x12f >> 0006fff0 00000000 kernel32!BaseProcessStart+0x23 > >> I am unable to step into ~0 without hitting the hang. > > I think all this means is that the thread is in a wait state, as in it has called WaitForMultipleObjects or similar. The thread is not really hung so much as it is in a not-ready-for-scheduling state, so the kernel is not giving it any cpu time. > >> I am able to trace into ~1 after waiting a bit for the initial step to >> complete. ~1 seems to be spinning un-checked. I see what seems to be a >> regular repeated pattern of cmds here. >> >> Process Explorer prior to "Proceed with Format (Y/N)?" PE shows the that >> the thread stack is: >> format.com+
>> ntdll.dll!RtlSetLastWin32ErrorAndNtStatusFromNtStatus+0x59 >> >> After answering (Y/N)? ntdll.dll! goes away. >> >> No new threads start and the format stack does not change. The state >> continues to be Wait:Executive and no user or kernel time accumulates. >> Am I missing the thread seen in windbg or am I stuck in the kernel >> somewhere? > > You are seeing thread 0, the main thread, in the wait state. It might be instructive if you could find out what handle it is waiting for - looking at the presence of "IsYesResponse" in the stack trace, it seems as if despite your pressing Y or N, the key event has not been delivered to wake up the thread. > > cheers, > DaveK -- 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/