From owner-freebsd-hardware@FreeBSD.ORG Thu Jan 29 16:16:17 2004 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2558D16A4CE for ; Thu, 29 Jan 2004 16:16:17 -0800 (PST) Received: from mail.acis.com.au (atlantis.acis.com.au [203.14.230.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 4826A43D2D for ; Thu, 29 Jan 2004 16:16:14 -0800 (PST) (envelope-from andymac@bullseye.apana.org.au) Received: (qmail 52328 invoked from network); 30 Jan 2004 00:16:11 -0000 Received: from dialup16-async.civ.acis.com.au (HELO bullseye.apana.org.au) (203.10.77.16) by atlantis.acis.com.au with SMTP; 30 Jan 2004 00:16:11 -0000 Received: from bullseye.apana.org.au (localhost.apana.org.au [127.0.0.1]) i0TLsjOj008470; Fri, 30 Jan 2004 08:54:45 +1100 (EST) (envelope-from andymac@bullseye.apana.org.au) Received: from localhost (andymac@localhost)i0TLsjTo008467; Fri, 30 Jan 2004 08:54:45 +1100 (EST) (envelope-from andymac@bullseye.apana.org.au) Date: Fri, 30 Jan 2004 08:54:45 +1100 (EST) From: Andrew MacIntyre To: Tony Holmes In-Reply-To: <20040129101031.B93034@crosswinds.net> Message-ID: <20040130083530.M8430@bullseye.apana.org.au> References: <20040128121913.A54789@crosswinds.net> <20040129101031.B93034@crosswinds.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Per von Zweigbergk cc: freebsd-hardware@freebsd.org Subject: Re: Signal 10? X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2004 00:16:17 -0000 On Thu, 29 Jan 2004, Tony Holmes wrote: > > The pthreads implementation on 4.x (-lc_r) will also provoke a bus error > > if the primary thread's stack (which is hard coded at 1MB) is exhausted. > > I'm getting sig 10 from python only and it is linked with pthreads.... this > could explain it. It's a 4.9-Release box. Python version & gcc version? Using regexps? Some special handling for pthreads linkage on FreeBSD was added to Python 2.3.3 (maybe 2.3.2 as well) to limit the recursiion depth of the SRE regexp engine due to this problem. If this is the problem, the limit was determined based on the behaviour of Python's regression test suite, but your app's stack usage may be more stack hungry than the test suite resulting in the sig10s. Recent releases of gcc at higher optimisation levels (eg -O3) use considerably larger stack frames than 2.95, which makes the -lc_r limit more restrictive. I've just recently started to see similar reports from people in the Python Linux community. This doesn't affect Python from CVS, as SRE is no longer a recursive engine. If you wish to rebuild Python with a smaller SRE recursion limit, adjust the USE_RECURSION_LIMIT macro at the top of Modules/_sre.c in the Python source tree (somewhere around line 80, depending on Python version). -- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac@bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac@pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia