From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10104 invoked by alias); 18 Apr 2006 18:38:59 -0000 Received: (qmail 10089 invoked by uid 22791); 18 Apr 2006 18:38:58 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (217.40.213.68) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Apr 2006 18:38:56 +0000 Received: from mail.artimi.com ([192.168.1.3]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 18 Apr 2006 19:38:54 +0100 Received: from rainbow ([192.168.1.165]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 18 Apr 2006 19:38:53 +0100 From: "Dave Korn" To: "'tricksy codes'" Subject: RE: FW: cygwin-1.dll long-time bug Date: Tue, 18 Apr 2006 18:38:00 -0000 Message-ID: <002e01c66317$581533e0$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20060418182547.GC18086@trixie.casa.cgf.cx> Mailing-List: contact cygwin-talk-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: cygwin-talk-owner@cygwin.com Reply-To: The Cygwin-Talk Malingering List X-SW-Source: 2006-q2/txt/msg00054.txt.bz2 On 18 April 2006 19:26, Christopher Faylor wrote: > On Tue, Apr 18, 2006 at 07:13:38PM +0100, Dave Korn wrote: >> where Mark Russinovich says >> >> "As for the issues looking at threads, the problem is a Cygwin behavior >> that's incompatible with the Windows API, >> RtlQueryProcessDebugInformation, that Process Explorer uses to obtain >> the list of modules loaded into a process. That API injects a thread >> into the remote process to query the loader data structures. The >> target process DLLs get a DLL_THREAD_ATTACH notification, which causes >> some Cygwin DLL thread to hang and the RtlQueryProcessDebugInformation >> to never return." > > So, rather than saying "I wonder why Cygwin would hang when a thread is > injected?" the conclusion is that "Cygwin behavior which is incompatible > with the Windows API" and the fix is to "thread injection gracefully". > > I don't see what more there is to say on the subject. Clearly with just > a little more grace, Cygwin's problems would be solved. > > cgf Well, I think it's reasonable enough to say that cygwin does things that are pushing the envelope of what's documented to work in relation to how we handle forking and process startup. After all we just had that lockup caused by the fact that you can't even call GetModuleName[*] from DllMain safely. Things happen in an unusual order in cygwin processes and threads, and it's probably not something that gets a whole load of testing in microsoft's QA dept.... ;) cheers, DaveK [*] - or whatever it was, I haven't been and looked up the original thread yet. -- Can't think of a witty .sigline today....