delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/06/05:39:32

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 6 Dec 2011 11:38:34 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Machine very sluggish while compiling
Message-ID: <20111206103834.GL12518@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4ECEE88E DOT 5050307 AT cs DOT utoronto DOT ca> <20111125154751 DOT GP28395 AT trikaliotis DOT net> <4EDB2761 DOT 6040508 AT cs DOT utoronto DOT ca> <20111204100639 DOT GA9849 AT calimero DOT vinschen DOT de> <4EDD44E0 DOT 7070701 AT cornell DOT edu>
MIME-Version: 1.0
In-Reply-To: <4EDD44E0.7070701@cornell.edu>
User-Agent: Mutt/1.5.21 (2010-09-15)
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

On Dec  5 17:25, Ken Brown wrote:
> On 12/4/2011 5:06 AM, Corinna Vinschen wrote:
> >Anyway, stoppping the PCA service and setting its start mode to "Manual"
> >does the trick for me.
> 
> It does the trick for me too.  For a long time I've been unable to
> build emacs using cygport's default for parallel make (-j5 because I
> have 4 cores).  When I did this, I would either have the computer
> freeze (and I would have to shut it down with the power button) or
> else I would get a BSOD.
> 
> Since stopping PCA, the problem seems to be gone.

In the meantime I found another way how to avoid this problem.

Here's an excerpt from the MSDN man page of AssignProcessToJobObject:

  If the process is being monitored by the Program Compatibility
  Assistant (PCA), it is placed into a compatibility job. Therefore, the
  process must be created using CREATE_BREAKAWAY_FROM_JOB before it can
  be placed in another job. Alternatively, you can embed an application
  manifest that specifies a User Account Control (UAC) level in your
  application and PCA will not add the process to the compatibility job.

So, what I did was to change Cygwin locally to add the
CREATE_BREAKAWAY_FROM_JOB flag to the CreateProcess call when execing a
process.  With this change, I had no problems with PCA anymore.

I also tried to use an "asInvoker" side-by-side manifest for mintty, but
I had no luck with it.  PCA still wasted memory and CPU.

So I'm wondering if we should simply add the CREATE_BREAKAWAY_FROM_JOB
flag to our CreateProcess calls and be done with it.  As far as I can
see, and from what MSDN claims, there should be no problem doing that.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


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