From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28843 invoked by alias); 30 Aug 2012 19:28:22 -0000 Received: (qmail 28832 invoked by uid 22791); 30 Aug 2012 19:28:21 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from server-nat-6.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Aug 2012 19:28:08 +0000 Received: from wireless-206-196-164-53.umd.edu (wireless-206-196-164-53.umd.edu [206.196.164.53]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 30420B40793; Thu, 30 Aug 2012 15:28:06 -0400 (EDT) Subject: Re: [patch] Re: Disable -lmcheck when Python has threads (Re: [BUG] gdb crash when "python import gtk") Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: <20120830190523.GA781@host2.jankratochvil.net> Date: Thu, 30 Aug 2012 19:28:00 -0000 Cc: Khoo Yit Phang , Hui Zhu , gdb-patches@sourceware.org, David Malcolm Content-Transfer-Encoding: quoted-printable Message-Id: <184D5CC3-BC35-4CA1-BE77-FC4D30D50E84@cs.umd.edu> References: <20120719073959.GA10044@host2.jankratochvil.net> <20120830164317.GA27381@host2.jankratochvil.net> <310D6419-544D-4D08-BB8B-21BC87C8241A@cs.umd.edu> <20120830182122.GA31421@host2.jankratochvil.net> <5C297339-3CCE-4350-9C7B-2C99B9FA01CA@cs.umd.edu> <20120830190523.GA781@host2.jankratochvil.net> To: Jan Kratochvil X-CSD-MailScanner-ID: 30420B40793.A8732 X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=not spam, ALL_TRUSTED -50.00) X-CSD-MailScanner-From: khooyp@cs.umd.edu X-CSD-MailScanner-Watermark: 1346959686.35537@6yeonV/gYzDwe0wJb3BDPQ Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00878.txt.bz2 Hi, On Aug 30, 2012, at 3:05 PM, Jan Kratochvil wrote: > Hi David, >=20 > On Thu, 30 Aug 2012 20:58:21 +0200, Khoo Yit Phang wrote: >> On Aug 30, 2012, at 2:21 PM, Jan Kratochvil wrote: >>> On Thu, 30 Aug 2012 20:05:01 +0200, Khoo Yit Phang wrote: >>>> 1) I reverted python-config.py and used a different method to test for >>>> threads ("python -m threading"); >>>=20 >>> Unfortunately it does not work for me with python-2.7, only with python= -3.3, >>> tested on Fedora 18 x86_64: >>>=20 >>> $ python3 -m threading;echo $? >>> 0 >>> $ python3 -m threadin;echo $? >>> /usr/bin/python3: No module named threadin >>> 1 >>>=20 >>> but: >>>=20 >>> $ python2 -m threading;echo $? >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main >>> "__main__", fname, loader, pkg_name) >>> File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code >>> exec code in run_globals >>> File "/usr/lib64/python2.7/threading.py", line 985, in >>> _test() >>> File "/usr/lib64/python2.7/threading.py", line 969, in _test >>> Q =3D BoundedQueue(QL) >>> File "/usr/lib64/python2.7/threading.py", line 912, in __init__ >>> self.queue =3D deque() >>> NameError: global name 'deque' is not defined >>> 255 >>>=20 >>> python3-3.3.0-0.3.b2.fc18.x86_64 >>> python-2.7.3-13.fc18.x86_64 >>>=20 >>> GDB moveover currently is not compatible with python3.x at all. >>>=20 >>> I do not know much Python but I would guess thread-less Pythons are rar= e, >>> aren't they? There would be also a possibility to assume Python is thr= eaded, >>> if one already links with Python. >>=20 >> That's strange, it works for me under Ubuntu 11.04 with Python 2.7.1 and >> RHEL5 with Python 2.6.6. I suppose it would be easier to just assume Pyt= hon >> is threaded, this new patch does that. >=20 > On RHEL-5.8 I have python-2.4.3-46.el5 (not Python 2.6.6) although I can > confirm it works there: >=20 > $ python -m threading; echo $? > Producer-1.1 > [...] > Producer-3.5 > 0 I see what the problem is now: there is bug in Python 2.7.3 in the threadin= g._test function, which is what gets run under "python -m threading". The b= ug has been fixed, see http://bugs.python.org/issue15567. Yit August 30, 2012