From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25785 invoked by alias); 13 Feb 2011 17:20:38 -0000 Received: (qmail 25776 invoked by uid 22791); 13 Feb 2011 17:20:37 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from granite1.mail.cornell.edu (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Feb 2011 17:20:33 +0000 Received: from [192.168.1.11] (cpe-67-249-196-94.twcny.res.rr.com [67.249.196.94]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p1DHKT8C025793 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 13 Feb 2011 12:20:30 -0500 (EST) Message-ID: <4D5812DD.8030600@cornell.edu> Date: Sun, 13 Feb 2011 17:20:00 -0000 From: Ken Brown User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Preremove/postinstall scripts fail with snapshot installed References: <4D55A88E.3090301@cornell.edu> <20110212142555.GB5682@calimero.vinschen.de> <4D56A002.2090707@cornell.edu> <4D56A7D5.6010104@cornell.edu> <20110212164415.GB3264@calimero.vinschen.de> <20110212181224.GC3264@calimero.vinschen.de> <20110213162449.GA20855@calimero.vinschen.de> In-Reply-To: <20110213162449.GA20855@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-02/txt/msg00332.txt.bz2 On 2/13/2011 11:24 AM, Corinna Vinschen wrote: > On Feb 12 19:12, Corinna Vinschen wrote: >> On Feb 12 17:44, Corinna Vinschen wrote: >>> On Feb 12 10:31, Ken Brown wrote: >>>> I just did a system restore to undo the last round of Windows >>>> updates, and the problem went away. I'm not sure where to go from >>>> here. >>> >>> You're right, I can reproduce it on W7 32 and 64 bit. >>> [...] >>> By installing the security updates again, one by one, I figure out >>> that it is the security update connected to KB 2393802 which triggers >>> the problem. >>> [...] >> >> Just FYI, I have a working workaround. It's not exactly how I would >> like to handle this stuff, but at least we know there *is* a solution >> which still maintains the desired ability to delete an in-use directory. > > Ok, I think I have a solution now. > > A few hours of debugging turned up that the KB 2393802 patch introduces > a change to the layout of the (undocumented) structure in which Windows > stores the CWD starting with Vista. That's the structure we called > FAST_CWD in Cygwin. The new layout is sufficiently different that > Cygwin scrambled the contents of the structure from the Win32 > perspective. > > Above all, the new structure layout is 4 bytes bigger, because > RtlSetCurrentDirectory_U now also stores some filesystem flags which > RtlGetCurrentDirectory_U uses to find out if the CWD is on a removable > device, and if that device is still available. > > If Cygwin scrambled the content effectivly enough, Win32 calls like > CreateProcess could become so confused that they potentially crash with > a SEGV. > > I just checked in a patch to Cygwin which uses the new structure layout > on systems which already have the KB 2393802 patch installed and the old > structure layout otherwise. > > I also uploaded a new Cygwin snapshot to http://cygwin.com/snapshots/ > Please give the today's snapsot a try. I tested it on Windows 2008 32 > bit as well as on W7 32 and 64 bit, with and without KB 2393802 > installed. "It works for me."(TM) Works for me on W7 64 bit with KB 2393802 installed. (I didn't test without it. I had already reinstalled the updates.) Thanks. Ken -- 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