From owner-freebsd-questions@FreeBSD.ORG Thu Jan 10 01:04:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442FF16A41B for ; Thu, 10 Jan 2008 01:04:35 +0000 (UTC) (envelope-from danny@ricin.com) Received: from smtpq1.groni1.gr.home.nl (smtpq1.groni1.gr.home.nl [213.51.130.200]) by mx1.freebsd.org (Postfix) with ESMTP id D4EF113C467 for ; Thu, 10 Jan 2008 01:04:34 +0000 (UTC) (envelope-from danny@ricin.com) Received: from [213.51.130.188] (port=46163 helo=smtp3.groni1.gr.home.nl) by smtpq1.groni1.gr.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JClqT-0000U1-97; Thu, 10 Jan 2008 02:04:33 +0100 Received: from cp1228410-a.dbsch1.nb.home.nl ([84.27.157.163]:62288 helo=desktop.homenet) by smtp3.groni1.gr.home.nl with smtp (Exim 4.60) (envelope-from ) id 1JClqS-0007cY-CR; Thu, 10 Jan 2008 02:04:33 +0100 Received: by desktop.homenet (sSMTP sendmail emulation); Thu, 10 Jan 2008 02:04:15 +0100 From: "Danny Pansters" To: freebsd-questions@freebsd.org Date: Thu, 10 Jan 2008 02:02:17 +0100 User-Agent: KMail/1.9.7 References: <47851504.8090006@gmail.com> In-Reply-To: <47851504.8090006@gmail.com> X-Face: (Zs+'ncTcchkOX|~t6{?Iii=O!G#WEK!+OD0|-F=i%1pvP5V_Sz4PaJC8o)=?utf-8?q?MiSnH/JMJFy=0A=09oBN-My?=, v":S7, (=?utf-8?q?mmkPm=27U=7BMgT+eM=2EBd=5Cp/P!dr=5DhOTXqpse21O!=25Ct=60SE=2EOodq?= =?utf-8?q?=5Dry=5E=23kU=5E=0A=09-?=GT.[8D}i$6P>=" =?utf-8?q?=23=0A=09*J+4d=7E?= MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801100202.17511.danny@ricin.com> X-Spam-Score: 0.0 (/) Cc: Gunther Mayer Subject: Re: Python threading - some ports depend on it, others break with it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2008 01:04:35 -0000 On Wednesday 09 January 2008 19:40:04 Gunther Mayer wrote: > Hi guys, > > I'm having so much trouble with this. I'm hosting a trac based project > which is implemented in python and uses an sqlite db backend along with > its python bindings. Now it turns out that pysqlite breaks badly > (compiles and installs fine but chokes on import, see > http://lists.initd.org/pipermail/pysqlite/2006-May/000553.html) if > python itself is compiled *without threading* support. > > However, on the same box I run a postgresql development and testing > database and we have some triggers and other functions implemented in > pl/python. Guess what? The compile of postgresql-plpython chokes upon > configure if python is built *with threading* support. Running it seems > to work fine, but there's a reason upstream put this check into > configure because supposedly this is known to break things. > > Chicken and egg - one of my ports insists on python with threads > enabled, the other port insists I use python without thread support. My > workaround is to compile python without threading, install(or upgrade) > postgresql-plpython, then recompile python with threading, install(or > upgrade) trac and pray that plpython won't eat my dog when I use it. A > really painful and error prone exercise, especially when an upgrade > comes along (security or otherwise). > > I need both of these ports on one box and I'm not sure what to do to > sort out this mess properly. Any ideas? What's up with Python's > threading support on FreeBSD in any case, why is is broken? > > To get you an idea of what versions I'm running, the affected postgresql > ports are > > postgresql-plpython-8.2.6 > postgresql-server-8.2.6 > > for the trac dependencies the involved culprits are: > > py25-pysqlite-2.0.7_1 > python25-2.5.1_1 > python-2.5,2 > sqlite-3.3.8 # peripheral > > I remember with python 2.4 I had the same endless issues over a year ago > so it's not 2.5's fault. Oh, and btw, I'm running 6.2-RELEASE-p9 i386. > > Gunther > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" It's my understanding that threading *in* python works well, but threading *with* python doesn't and you shouldn't use/rely on it. I'm afraid I can't tell you much more without an hour of googling and I wouldn't be sure if I can adequately explain after. I think it has to do with the GIL. I suggest to ask at freebsd-python@freebsd.org. Dan