delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/05/13:29:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <120320072211 DOT 2441 DOT 47547F1A000B21E0000009892216566276CFCECF9F9D9C AT comcast DOT net> <475484D4 DOT 50807 AT cygwin DOT com> <47548955 DOT 1030703 AT symantec DOT com> <fj2kvn$i0p$1 AT ger DOT gmane DOT org> <475581D6 DOT 7070205 AT symantec DOT com> <fj43uf$c36$1 AT ger DOT gmane DOT org> <4756EB42 DOT 70509 AT symantec DOT com>
Subject: RE: 1.5.24 format.com hangs through ssh
Date: Wed, 5 Dec 2007 18:29:00 -0000
Message-ID: <04c401c8376c$b4bd2730$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <4756EB42.70509@symantec.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id lB5ITEnu006910

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+<address>
>     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
-- 
Can't think of a witty .sigline today....


--
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/


- Raw text -


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