[issue8330] Failures seen in test_gdb on buildbots

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Shouldn't this be closed?

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2012-05-16 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Oops; closing.  Thanks.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2010-04-11 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I have now applied file16808 as r79986. I'm detaching file16804, as it was 
superceded by the other patch. I also reenabled all tests in r79987, to see how 
the buildbots react.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2010-04-08 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2010-04-07 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

There's also a deprecation warning in that log:
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py:229: 
DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  if e.message != 'unichr() arg not in range(0x1) (narrow Python build)':

I'm attaching a fix for this; tested with -Wd and it works.

This doesn't yet address the other two failures.

--
keywords: +patch
stage:  - patch review
Added file: 
http://bugs.python.org/file16804/fix-test_gdb-deprection-warning.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2010-04-07 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Both of the failing tests use set inside gdb to try to corrupt the memory of 
the inferior process.

I believe the issue here is that reading through 0xDEADBEEF within gdb on this 
machine isn't generating a RuntimeError; perhaps that _is_ a valid pointer in 
the address space of that process (or perhaps we're seeing another gdb-vs-gdb 
version difference aka issue #8279)

Within PrettyPrintTests.test_corrupt_tp_name, such a situation leads to the use 
of tp_flags, and the presence of Py_TPFLAGS_INT_SUBCLASS leads to python-gdb.py 
using PyIntObject, and it correctly print 42, even after op-ob_type-tp_name 
now has a garbage value, whereas the test was expecting the fallback handler.

Within PrettyPrintTests.test_corrupt_ob_type, it appears that we're using 
FakeRepr, and that ((PyTypeObject*)0xDEADBEEF-tp_name) within the process 
pointed at a NUL byte, when my code was expecting gdb to fail to read through 
((PyTypeObject*)0xDEADBEEF-tp_name) with a RuntimeError.

I'm attaching a patch which tries to generalize the expected output from these 
tests, so that they pass if the corruption in the inferior process doesn't 
manage to confuse gdb, and if 0xDEADBEEF happens to point at something 
unexpected.

I tested this with PrettyPrintTests active (it continues to all pass on my 
machine), but commented it out when generating the patch.

This also includes the fix for the DeprecationWarning mentioned in msg102546

--
Added file: 
http://bugs.python.org/file16808/fix-overfussy-gdb_text_corruption-tests-and-deprecation-warning.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8330] Failures seen in test_gdb on buildbots

2010-04-06 Thread Dave Malcolm

New submission from Dave Malcolm dmalc...@redhat.com:

http://www.python.org/dev/buildbot/trunk/builders/alpha%20Debian%20trunk/builds/52/steps/test/logs/stdio
shows some failures in test_gdb:

==
FAIL: test_corrupt_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a corrupt ob_type is handled gracefully
--
Traceback (most recent call last):
  File 
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py, 
line 361, in test_corrupt_ob_type
'set op-ob_type=0xDEADBEEF')
  File 
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py, 
line 341, in assertSane
(gdb_repr, gdb_output))
AssertionError: Unexpected gdb representation: ' at remote 0x1202cf5a8'
Breakpoint 1 at 0x12007a9e8: file Objects/object.c, line 330.
[Thread debugging using libthread_db enabled]

Breakpoint 1, PyObject_Print (op=42, fp=0x22f87b0, flags=1)
at Objects/object.c:330
330 return internal_print(op, fp, flags, 0);
#0  PyObject_Print (op= at remote 0x1202cf5a8, fp=0x22f87b0, flags=1)
at Objects/object.c:330
#1  0x00012003eaa0 in file_PyObject_Print (op= at remote 0x1202cf5a8, f=
0x2326280, flags=1) at Objects/fileobject.c:110
#2  0x000120045bc8 in PyFile_WriteObject (v= at remote 0x1202cf5a8, f=
file at remote 0x2326280, flags=1) at Objects/fileobject.c:2470
#3  0x00012010bb90 in PyEval_EvalFrameEx (f=
Frame 0x1203a0ba0, for file string, line 1, in module (), throwflag=0)
at Python/ceval.c:1769
#4  0x0001201134bc in PyEval_EvalCodeEx (co=0x120305880, globals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, 
kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#5  0x000120107294 in PyEval_EvalCode (co=0x120305880, globals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}) at Python/ceval.c:666
#6  0x000120152e08 in run_mod (mod=0x12038b848, filename=
0x12021cf00 string, globals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, flags=0x11f48b4d8, arena=0x1203406b0)
at Python/pythonrun.c:1340
#7  0x000120152c2c in PyRun_StringFlags (str=0x1202b2010 print 42\n, 
start=257, globals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': module at remote 0x2337470, '__name__': '__main__', 
'__doc__': None, '__package__': None}, flags=0x11f48b4d8)
at Python/pythonrun.c:1303
#8  0x000120150f50 in PyRun_SimpleStringFlags (command=
0x1202b2010 print 42\n, flags=0x11f48b4d8) at Python/pythonrun.c:962
#9  0x0001200185a0 in Py_Main (argc=4, argv=0x11f48b6b8)
at Modules/main.c:525
#10 0x000120016e88 in main (argc=4, argv=0x11f48b6b8)
at ./Modules/python.c:23


==
FAIL: test_corrupt_tp_name (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_name is handled
--
Traceback (most recent call last):
  File 
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py, 
line 372, in test_corrupt_tp_name
'set op-ob_type-tp_name=0xDEADBEEF')
  File 
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py, 
line 341, in assertSane
(gdb_repr, gdb_output))
AssertionError: Unexpected gdb representation: '42'
Breakpoint 1 at 0x12007a9e8: file Objects/object.c, line 330.
[Thread debugging using libthread_db enabled]

Breakpoint 1, PyObject_Print (op=42, fp=0x22f87b0, flags=1)
at Objects/object.c:330
330 return internal_print(op, fp, flags, 0);
#0  PyObject_Print (op=42, fp=0x22f87b0, flags=1) at Objects/object.c:330
#1  0x00012003eaa0 in file_PyObject_Print (op=42, f=0x2326280, flags=1)
at Objects/fileobject.c:110
#2  0x000120045bc8 in PyFile_WriteObject (v=42, f=
file at remote 0x2326280, flags=1) at Objects/fileobject.c:2470
#3  0x00012010bb90 in PyEval_EvalFrameEx (f=
Frame 0x1203a0ba0, for file string, line 1, in module (), throwflag=0)
at Python/ceval.c:1769
#4  0x0001201134bc in PyEval_EvalCodeEx (co=0x120305880, globals=
{'__builtins__': module at remote