From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 989 invoked by alias); 4 Dec 2011 19:27:58 -0000 Received: (qmail 979 invoked by uid 22791); 4 Dec 2011 19:27:57 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mho-02-ewr.mailhop.org (HELO mho-02-ewr.mailhop.org) (204.13.248.72) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Dec 2011 19:27:42 +0000 Received: from pool-173-76-42-41.bstnma.fios.verizon.net ([173.76.42.41] helo=cgf.cx) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1RXHiw-00090Y-57 for cygwin@cygwin.com; Sun, 04 Dec 2011 19:27:42 +0000 Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 95E1113C0D3 for ; Sun, 4 Dec 2011 14:27:41 -0500 (EST) X-Mail-Handler: MailHop Outbound by DynDNS X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+79ayms+ob1ARvvHKmE45z Date: Sun, 04 Dec 2011 19:27:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: gnome-keyring bug in snapshots Message-ID: <20111204192741.GA21203@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20111203184459.GA21371@ednor.casa.cgf.cx> <20111203213047.GA24925@ednor.casa.cgf.cx> <20111203230408.GC12518@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111203230408.GC12518@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) 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-12/txt/msg00059.txt.bz2 On Sun, Dec 04, 2011 at 12:04:08AM +0100, Corinna Vinschen wrote: >On Dec 3 16:30, Christopher Faylor wrote: >> On Sat, Dec 03, 2011 at 01:44:59PM -0500, Christopher Faylor wrote: >> >On Tue, Nov 29, 2011 at 09:19:10PM -0600, Yaakov (Cygwin/X) wrote: >> >>For some time now, snapshots have displayed a bug wrt gnome-keyring, >> >>namely that passwords don't "register" when entered. This wreaks >> >>havoc on the GNOME desktop where so many programs rely on >> >>gnome-keyring. >> >>[...] >> According to strace, the "couldn't allocate secure memory..." messages >> seems to be caused by this: >> >> gnome-keyring-daemon 3820 seterrno_from_nt_status: /cygnus/src/uberbaum/winsup/cygwin/mmap.cc:1399 status 0xC0000061 >> >> That is coming from mlock() which hasn't changed in months. >> >> The status above translates to: STATUS_PRIVILEGE_NOT_HELD and that is >> coming from NtLockVirtualMemory() . >> >> Yaakov or Corinna does any of the above mean anything to you? > >As documented in mmap.cc, mlock functionality requires the SE_LOCK_MEMORY >privilege which only the SYSTEM account holds by default. Mlock is >unchanged since it has been introduced in 2005. > >Having said that, after searching the net for a while I found out that >the privilege requirement is excessive. In 2005 I stumbled over the >wrong interpretation of what the VirtualLock function is doing. Not >even Microsoft guys are immune to that(*), apparently. > >I dropped the requirement for the SE_LOCK_MEMORY privilege in CVS so >every process should be able to call mlock successfully now. Thanks. As you surmised this had nothing to do with the problem. It apparently just a random error in a log file from gnome-keyring-daemon. The real problem seemed to be a change introduced after 1.7.9 which subtly broke the handling of signals during I/O. That should be fixed in the latest snapshot but, like so much of what I've worked on in Cygwin lately, it touched a fundamental part of the code. I wish I hadn't had to make this change just before 1.7.10 but, in theory, it should make it possible for a signal handler to be caught in a thread - that's a first for Cygwin and it's something I've been meaning to get to for a while. This isn't perfect though and I hope that doesn't mean that I've introduced other corner case problems. cgf -- 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