[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2020-06-11 Thread STINNER Victor


STINNER Victor  added the comment:

I fail to reproduce the issue on the master branch of Python on Fedora 32:

* Python master at commit 9727694f08cad4b019d2939224e3416312b1c0e1
* Fedora 32
* gcc (GCC) 10.1.1
* GNU gdb (GDB) Fedora 9.1-5.fc32

Notice that multiple tests are skipped:

$ ./configure --with-lto && make && ./python -m test -v test_gdb 
(...)
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g 
-std=c99 (...)
(...)
== CPython 3.10.0a0 (heads/master:9727694f08, Jun 11 2020, 15:31:25) [GCC 
10.1.1 20200507 (Red Hat 10.1.1-1)]
== Linux-5.6.16-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian
== cwd: /home/vstinner/python/master/build/test_python_139705
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.77 Run tests sequentially
0:00:00 load avg: 2.77 [1/1] test_gdb
GDB version 9.1:
GNU gdb (GDB) Fedora 9.1-5.fc32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
test_NULL_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with NULL ob_type is handled gracefully ... ok
test_NULL_ptr (test.test_gdb.PrettyPrintTests)
Ensure that a NULL PyObject* is handled gracefully ... ok
test_builtin_method (test.test_gdb.PrettyPrintTests) ... ok
test_builtins_help (test.test_gdb.PrettyPrintTests)
Ensure that the new-style class _Helper in site.py can be handled ... ok
test_bytes (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of bytes ... ok
test_corrupt_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... ok
test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_flags is handled ... ok
test_corrupt_tp_name (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_name is handled ... ok
test_dicts (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of dictionaries ... ok
test_exceptions (test.test_gdb.PrettyPrintTests) ... ok
test_frames (test.test_gdb.PrettyPrintTests) ... ok
test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets ... ok
test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... ok
test_int (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various int values ... ok
test_lists (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of lists ... ok
test_modern_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of new-style class instances ... ok
test_selfreferential_dict (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a dict doesn't lead proxyval ... ok
test_selfreferential_list (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a list doesn't lead proxyval ... ok
test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... ok
test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... ok
test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets ... ok
test_singletons (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of True, False and None ... ok
test_strings (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of unicode strings ... ok
test_subclassing_list (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a list subclass ... ok
test_subclassing_tuple (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a tuple subclass ... ok
test_truncation (test.test_gdb.PrettyPrintTests)
Verify that very long output is truncated ... ok
test_tuples (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of tuples ... ok
test_bt (test.test_gdb.PyBtTests)
Verify that the "py-bt" command works ... skipped 'Python was compiled with 
optimizations'
test_bt_full (test.test_gdb.PyBtTests)
Verify that the "py-bt-full" command works ... skipped 'Python was compiled 
with optimizations'
test_gc (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates if a thread is garbage-collecting ... skipped 
'Python was compiled with optimizations'
test_pycfunction (test.test_gdb.PyBtTests)
Verify that "py-bt" displays invocations of PyCFunction instances ... skipped 
'Python was compiled with optimizations'
test_threads (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates threads that are waiting for the GIL ... ok
test_wrapper_call (test.test_gdb.PyBtTests) ... skipped 'Python was compiled 
with optimizations'
test_basic_command (test.test_gdb.PyListTests)
Verify that the "py-list" command works ... skipped 'Python was compiled with 
optimizations'
test_one_abs_arg (test.test_gdb.PyListTests)
Verify the "py-list" command with one absolute argument ... skipped 'Python was 
compiled 

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2017-02-17 Thread Gregory P. Smith

Gregory P. Smith added the comment:

there may be something in sysconfig.get_config_vars() we could use or, better, 
we could add something specific to indicate both pgo and lto builds.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2017-02-17 Thread STINNER Victor

STINNER Victor added the comment:

+@unittest.skipIf(python_is_optimized(),
+ "Python was compiled with optimizations")
 class PrettyPrintTests(DebuggerTests):

I disagree with this skip. I just compiled Python with "./configure" and GCC: 
these tests pass. Except of one buildbot, PGO is not used on buildbots nor 
Travis CI. I would prefer to keep running these tests by default, but only skip 
on PGO build.

By the way, would it maybe possible to find the missing information "" from other variables?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2017-02-17 Thread INADA Naoki

INADA Naoki added the comment:

LGTM, but would you send pull request on Github?

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-23 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I uploaded a patch that skips these tests if optimizations are available.

--
keywords: +patch
Added file: http://bugs.python.org/file42574/issue26788.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-17 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I will investigate this issue to understand what is happening there and submit 
a fix. Thank you for pointing out the exact OS and toolchain used.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-16 Thread Gregory P. Smith

New submission from Gregory P. Smith:

cpython/build35.lto$ ./python ../3.5/Lib/test/test_gdb.py
GDB version 7.10:
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
...
==
FAIL: test_tuples (__main__.PrettyPrintTests)
Verify the pretty-printing of tuples
--
Traceback (most recent call last):
  File "../3.5/Lib/test/test_gdb.py", line 359, in test_tuples
self.assertGdbRepr(tuple(), '()')
  File "../3.5/Lib/test/test_gdb.py", line 279, in assertGdbRepr
gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
  File "../3.5/Lib/test/test_gdb.py", line 255, in get_gdb_repr
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x4cc310\n[Thread 
debugging using libthread_db enabled]\nUsing host libthread_db library 
"/lib/x86_64-linux-gnu/libthread_db.so.1".\n\nBreakpoint 1, builtin_id ()\n#0  
builtin_id ()\n'
Breakpoint 1 at 0x4cc310
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, builtin_id ()
#0  builtin_id ()

I don't know the right thing to do here.  This might depend on compiler, 
linker, arch and gdb version?  Are it's LTO executables debuggable?  It's not 
clear to me that we can do anything about this.  We may just want to skip the 
test when configured --with-lto.  Or perhaps this is an indication that this 
specific toolchain's LTO build (x86_64, ubuntu wily gcc 5.2.1 and gdb 7.1.0) 
has issues and shouldn't be used?

--
components: Build
messages: 263599
nosy: alecsandru.patrascu, gregory.p.smith
priority: normal
severity: normal
status: open
title: test_gdb fails all tests on a profile-opt build configured --with-lto
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com