X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org From: Haojun Bao To: cygwin AT cygwin DOT com Subject: Re: Emacs can't start-process more than 30~40 processes In-Reply-To: <4A6ECC33.2020306@gmail.com> (Dave Korn's message of "Tue, 28 Jul 2009 11:00:19 +0100") References: <83iqhlbgoc DOT fsf AT gmail DOT com> <4A6727A8 DOT 2090905 AT cornell DOT edu> <83iqhkur2h DOT fsf AT gmail DOT com> <834osy98jo DOT fsf_-_ AT gmail DOT com> <83tz0xtt6c DOT fsf AT gmail DOT com> <4A6ECC33 DOT 2020306 AT gmail DOT com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (cygwin) Date: Wed, 29 Jul 2009 11:39:29 +0800 Message-ID: <83vdlc5f9q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dave Korn writes: > Haojun Bao wrote: > >> >> My question is, is there anyway out of this? Can I just rebase >> cygwin1.dll to the end of all other DLLs? > > It ought to work. Would you mind giving it a try and letting us know if it > helps? It might be a good idea to tweak rebaseall to do this for us. > Yes, it helped, the max start-process number is improved from ~30 to ~37. I think it's hit another issue. Here's the details: I can't run rebase.exe on cygwin1.dll directly, since the latter is loaded by the former. I wrote a .bat file to rebase it: cd c:\cygwin\bin c: copy cygwin1.dll 2.dll rebase -b 0x45000000 2.dll copy 2.dll cygwin1.dll I did not try to rebase cygwin1.dll to the end of all other DLLs though, I don't know if that is feasible. Instead, I just make it a lot more far away from the DLL that's next to it in the address space. (The old base for cygwin1 is 0x61000000, and next is cygncurses-9.dll based at 0x61650000, the max cygheap is ~6.6M; new cygwin1 base is 0x45000000, and the next DLL is cygz.dll, with a base 0x54950000, with a max cygheap ~256M). After this, the emacs can start more processes, but still not unlimited, neither will it segfault; it just exits will code 255 after printing "Wrong type argument: stringp, 0". This must be another issue now, I will debug it when I have more time. $/bin/emacs --batch -q --execute '(let ((num 0)) (while (< num 80) (setq num (+ num 1)) (message "num is %d" num) (start-process "hello" nil "/usr/bin/echo")))' ---------------- output ---------------- ... ... num is 37 Wrong type argument: stringp, 0 -- 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