From: Khoo Yit Phang <khooyp@cs.umd.edu>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Khoo Yit Phang <khooyp@cs.umd.edu>, Hui Zhu <teawater@gmail.com>,
gdb-patches@sourceware.org, David Malcolm <dmalcolm@redhat.com>
Subject: Re: [patch] Re: Disable -lmcheck when Python has threads (Re: [BUG] gdb crash when "python import gtk")
Date: Thu, 30 Aug 2012 19:28:00 -0000 [thread overview]
Message-ID: <184D5CC3-BC35-4CA1-BE77-FC4D30D50E84@cs.umd.edu> (raw)
In-Reply-To: <20120830190523.GA781@host2.jankratochvil.net>
Hi,
On Aug 30, 2012, at 3:05 PM, Jan Kratochvil wrote:
> Hi David,
>
> 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");
>>>
>>> Unfortunately it does not work for me with python-2.7, only with python-3.3,
>>> tested on Fedora 18 x86_64:
>>>
>>> $ python3 -m threading;echo $?
>>> 0
>>> $ python3 -m threadin;echo $?
>>> /usr/bin/python3: No module named threadin
>>> 1
>>>
>>> but:
>>>
>>> $ 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 <module>
>>> _test()
>>> File "/usr/lib64/python2.7/threading.py", line 969, in _test
>>> Q = BoundedQueue(QL)
>>> File "/usr/lib64/python2.7/threading.py", line 912, in __init__
>>> self.queue = deque()
>>> NameError: global name 'deque' is not defined
>>> 255
>>>
>>> python3-3.3.0-0.3.b2.fc18.x86_64
>>> python-2.7.3-13.fc18.x86_64
>>>
>>> GDB moveover currently is not compatible with python3.x at all.
>>>
>>> I do not know much Python but I would guess thread-less Pythons are rare,
>>> aren't they? There would be also a possibility to assume Python is threaded,
>>> if one already links with Python.
>>
>> 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 Python
>> is threaded, this new patch does that.
>
> On RHEL-5.8 I have python-2.4.3-46.el5 (not Python 2.6.6) although I can
> confirm it works there:
>
> $ 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 threading._test function, which is what gets run under "python -m threading". The bug has been fixed, see http://bugs.python.org/issue15567.
Yit
August 30, 2012
next prev parent reply other threads:[~2012-08-30 19:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CANFwon0wEXd+40H85veHyRTg+itYyL2jjgsCMYByxk5K0MTLHA@mail.gmail.com>
[not found] ` <20120719073959.GA10044@host2.jankratochvil.net>
[not found] ` <A681786A-58A1-41E6-8410-8EBD8330E6BE@cs.umd.edu>
2012-08-30 16:43 ` Jan Kratochvil
2012-08-30 18:05 ` Khoo Yit Phang
2012-08-30 18:21 ` Jan Kratochvil
2012-08-30 18:58 ` Khoo Yit Phang
2012-08-30 19:05 ` Jan Kratochvil
2012-08-30 19:28 ` Khoo Yit Phang [this message]
2012-08-31 1:32 ` Khoo Yit Phang
2012-08-31 8:14 ` Jan Kratochvil
2012-08-31 15:30 ` Khoo Yit Phang
2012-08-31 15:41 ` Andreas Schwab
2012-08-31 16:08 ` Khoo Yit Phang
2012-08-31 17:02 ` Andreas Schwab
2012-08-31 18:03 ` Khoo Yit Phang
2012-08-31 18:23 ` Jan Kratochvil
2012-08-31 18:41 ` Khoo Yit Phang
2012-09-02 15:37 ` Jan Kratochvil
2012-09-06 19:31 ` Khoo Yit Phang
2012-08-30 18:22 ` Sergio Durigan Junior
2012-08-30 18:45 ` Khoo Yit Phang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=184D5CC3-BC35-4CA1-BE77-FC4D30D50E84@cs.umd.edu \
--to=khooyp@cs.umd.edu \
--cc=dmalcolm@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox