Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72807
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <Nikolaus@rath.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'exercise': 0.04; 'preferred.': 0.05; 'context': 0.07; 'debugging': 0.07; 'skip:" 60': 0.07; 'wrapped': 0.09; 'assume': 0.14; 'thread': 0.14; '(without': 0.16; '1024)': 0.16; '58,': 0.16; 'ast': 0.16; 'conditional': 0.16; 'fetch': 0.16; 'fingerprint:': 0.16; 'fruit': 0.16; 'gpg': 0.16; 'key)': 0.16; 'modules,': 0.16; 'nevertheless': 0.16; 'self.close()': 0.16; 'skip:= 10': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'stack': 0.19; '>>>': 0.22; 'putting': 0.22; 'tests': 0.22; 'id:': 0.23; 'header:User-Agent:1': 0.23; 'skip:e 30': 0.24; 'looks': 0.24; "i've": 0.25; 'source': 0.25; 'extension': 0.26; 'skip:" 40': 0.26; 'least': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; "i'm": 0.30; "skip:' 10": 0.31; 'occurs': 0.31; 'skip:= 20': 0.31; 'writes:': 0.31; 'file': 0.32; 'call.': 0.33; 'guess': 0.33; 'skip:_ 10': 0.34; 'problem': 0.35; 'something': 0.35; 'but': 0.35; 'skip:" 50': 0.36; 'subject:?': 0.36; 'should': 0.36; 'changing': 0.37; 'seconds': 0.37; 'unit': 0.37; 'wrong': 0.37; 'two': 0.37; 'being': 0.38; 'filter': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:org': 0.40; 'called': 0.40; 'even': 0.60; 'skip:t 30': 0.61; 'high': 0.63; 'more': 0.64; 'here': 0.66; 'close': 0.67; 'repeat': 0.74; 'flies': 0.84; 'messed': 0.84; 'together,': 0.84; 'encrypted': 0.91; 'ominous': 0.91; 'obtained': 0.96 |
| From | Nikolaus Rath <Nikolaus@rath.org> |
| To | python-list@python.org |
| Subject | Re: Missing stack frames? |
| References | <87fvjlv22v.fsf@vostro.rath.org> <CAPTjJmqzgZnziz3+yZb-4bsYtfxT2AG5HQ9Pb3Ya8AWDW8+oHA@mail.gmail.com> <87bnu8uhbu.fsf@vostro.rath.org> |
| Mail-Copies-To | never |
| Mail-Followup-To | python-list@python.org |
| Date | Thu, 05 Jun 2014 18:45:01 -0700 |
| In-Reply-To | <87bnu8uhbu.fsf@vostro.rath.org> (Nikolaus Rath's message of "Wed, 04 Jun 2014 21:10:45 -0700") |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10799.1402019105.18130.python-list@python.org> (permalink) |
| Lines | 133 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1402019105 news.xs4all.nl 2926 [2001:888:2000:d::a6]:56859 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:72807 |
Show key headers only | View raw
Nikolaus Rath <Nikolaus@rath.org> writes:
> Chris Angelico <rosuav@gmail.com> writes:
>> On Wed, Jun 4, 2014 at 12:30 PM, Nikolaus Rath <Nikolaus@rath.org> wrote:
>>> I've instrumented one of my unit tests with a conditional
>>> 'pdb.set_trace' in some circumstances (specifically, when a function is
>>> called by a thread other than MainThread).
>>
>> I think the likelihood of this being an issue with interactive
>> debugging and threads is sufficiently high that you should avoid
>> putting the two together, at least until you can verify that the same
>> problem occurs without that combination.
>
> Here's stacktrace as obtained by traceback.print_stack():
>
> tests/t1_backends.py:563: test_extra_data[mock_s3c-zlib] PASSED
> tests/t1_backends.py:563: test_extra_data[mock_s3c-bzip2] PASSED
>
> ======================== 87 tests deselected by '-kextra' =========================
> =============== 5 passed, 1 skipped, 87 deselected in 0.65 seconds ================
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 853, in close
> self.fh.close()
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 691, in close
> traceback.print_stack(file=sys.stdout)
> something is wrong
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 853, in close
> self.fh.close()
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 691, in close
> traceback.print_stack(file=sys.stdout)
> something is wrong
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 1050, in close
> self.fh.close()
> File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 691, in close
> traceback.print_stack(file=sys.stdout)
>
> Still no context before the ominous close() call. I'm very confused.
It get's even funnier if I just repeat this exercise (without changing
code). Here are some more "tracebacks" that I got:
File "/usr/bin/py.test-3", line 5, in <module>
sys.exit(load_entry_point('pytest==2.5.2', 'console_scripts', 'py.test')())
[...]
File "/usr/lib/python3/dist-packages/py/_code/code.py", line 524, in repr_traceback_entry
source = self._getentrysource(entry)
File "/usr/lib/python3/dist-packages/py/_code/code.py", line 450, in _getentrysource
source = entry.getsource(self.astcache)
File "/usr/lib/python3/dist-packages/py/_code/code.py", line 199, in getsource
astnode=astnode)
File "/usr/lib/python3/dist-packages/py/_code/source.py", line 367, in getstatementrange_ast
astnode = compile(content, "source", "exec", 1024) # 1024 for AST
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 1050, in close
self.fh.close_real()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 702, in close_real
traceback.print_stack(file=sys.stdout)
or also
File "/usr/bin/py.test-3", line 5, in <module>
sys.exit(load_entry_point('pytest==2.5.2', 'console_scripts', 'py.test')())
[...]
File "/usr/lib/python3.4/logging/__init__.py", line 1474, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.4/logging/__init__.py", line 842, in handle
rv = self.filter(record)
File "/usr/lib/python3.4/logging/__init__.py", line 699, in filter
for f in self.filters:
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 853, in close
self.fh.close()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 1050, in close
self.fh.close_real()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 702, in close_real
traceback.print_stack(file=sys.stdout)
and this one looks actually the way I would expect:
[...]
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 335, in fetch
return self.perform_read(do_read, key)
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 58, in wrapped
return method(*a, **kw)
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 309, in perform_read
return fn(fh)
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 859, in __exit__
self.close()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 853, in close
self.fh.close()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/common.py", line 1050, in close
self.fh.close_real()
File "/home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py", line 702, in close_real
traceback.print_stack(file=sys.stdout)
I am not using any C extension modules, but I guess I nevertheless have
to assume that something seriously messed up either the stack or the
traceback printing routines?
Best,
Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Missing stack frames? Nikolaus Rath <Nikolaus@rath.org> - 2014-06-05 18:45 -0700
csiph-web