From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: autocompilation support in master Date: Wed, 10 Jun 2009 00:29:24 -0400 Message-ID: <20090610042924.GB1796@fibril.netris.org> References: <87hbyujpof.fsf@arudy.ossau.uklinux.net> <87vdn6gvgf.fsf@arudy.ossau.uklinux.net> <20090609005226.GA3468@fibril.netris.org> <20090609184723.GA3694@fibril.netris.org> <20090610033923.GA2020@fibril.netris.org> <20090610041117.GA1796@fibril.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244608187 14422 80.91.229.12 (10 Jun 2009 04:29:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jun 2009 04:29:47 +0000 (UTC) Cc: Neil Jerram , guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 10 06:29:40 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MEFRR-0005Gq-UZ for guile-devel@m.gmane.org; Wed, 10 Jun 2009 06:29:38 +0200 Original-Received: from localhost ([127.0.0.1]:40850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEFRR-0007FR-57 for guile-devel@m.gmane.org; Wed, 10 Jun 2009 00:29:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEFRO-0007EA-Fa for guile-devel@gnu.org; Wed, 10 Jun 2009 00:29:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEFRJ-0007D4-7b for guile-devel@gnu.org; Wed, 10 Jun 2009 00:29:34 -0400 Original-Received: from [199.232.76.173] (port=49674 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEFRJ-0007D1-3N for guile-devel@gnu.org; Wed, 10 Jun 2009 00:29:29 -0400 Original-Received: from world.peace.net ([204.107.200.8]:46351) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MEFRI-0001Wn-Qe for guile-devel@gnu.org; Wed, 10 Jun 2009 00:29:28 -0400 Original-Received: from localhost ([127.0.0.1] helo=fibril.netris.org ident=hope7) by world.peace.net with esmtp (Exim 4.69) (envelope-from ) id 1MEFRG-0005r6-BR; Wed, 10 Jun 2009 00:29:26 -0400 Content-Disposition: inline In-Reply-To: <20090610041117.GA1796@fibril.netris.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8662 Apologies for sending so many emails in so short a time, but I've put together the final pieces of this puzzle. GNU Make 3.81, the version in Debian lenny, sets the stack soft limit to match the hard limit "so that alloca does not fail". On my system, the default stack hard limit is infinite, so Make sets the soft limit to be infinite as well. When both the hard and soft limits are infinite, Guile's init_stack_limit() function in debug.c leaves the internal stack limit at the initial value of 40000 words, i.e. 160 kilobytes, as set in eval.c. On my system, I need somewhere between 384-512 kilobytes to compile the ecmascript code. 512k succeeds, and 384k fails. That's all. Time for sleep now :) Mark > I wrote: > > > (show-file-name #t stack 40000 debug backtrace depth 100 maxdepth 1000 frames 3 indent 10 width 79 procnames cheap) > > > > Notice the "stack 40000", which means that the stack limit (as far as > > guile is concerned) is only 40000 words, i.e. 160 kilobytes. Other > > times, I see much larger numbers there, which are close to the actual > > stack resource limit (as set by setrlimit), and in those cases the > > stack doesn't overflow. > > It turns out that 40000 is the initial value of guile's internal stack > limit, as part of the definition of scm_debug_opts[] in eval.c. That > value is supposed to be overwritten by init_stack_limit() in debug.c, > but it will be left unchanged if getrlimit() fails, or if both the > hard and soft stack limits are set to infinity. > > I suggest increasing the initial value of 40000 to something more > reasonable, perhaps 128000 words (which is approximately what my > system needs to successfully compile the ecmascript code), and > printing an error message if getrlimit fails. > > Mark >