New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_gdb failed on AMD64 Debian PGO 3.x #81204
Comments
It's likely a regression caused by bpo-36842. https://buildbot.python.org/all/#/builders/47/builds/2854 Example of failure: ====================================================================== Traceback (most recent call last):
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 533, in test_NULL_ob_type
self.assertSane('id(42)',
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 504, in assertSane
self.get_gdb_repr(source,
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 278, in get_gdb_repr
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x201df0: file Python/bltinmodule.c, line 1217.\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 () at Python/bltinmodule.c:1217\n1217\t{\n#0 builtin_id () at Python/bltinmodule.c:1217\n#1 _PyMethodDef_RawFastCallKeywords () at Objects/call.c:650\n#2 _PyCFunction_FastCallKeywords (func=<built-in method id of module object at remote 0x7ffff6ea7180>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:736\n#3 call_function (kwnames=0x0, oparg=1, pp_stack=<synthetic pointer>, tstate=<optimized out>) at Python/ceval.c:4831\n#4 _PyEval_EvalFrameDefault () at Python/ceval.c:3347\n#5 PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffff6e94800, for file <string>, line 1, in <module> ()) at Python/ceval.c:685\n#6 _PyEval_EvalCodeWithName () at Python/ceval.c:4173\n#7 PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=, kwcount=0, kws=, argcount=0, args=, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': <type at remote 0x555555b0eed0>, \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': <module at remote 0x7ffff6ea7180>}, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': <type at remote 0x555555b0eed0>, \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': <module at remote 0x7ffff6ea7180>}, _co=<code at remote 0x7ffff6e3e5d0>) at Python/ceval.c:4202\n#8 PyEval_EvalCode (co=<code at remote 0x7ffff6e3e5d0>, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': <type at remote 0x555555b0eed0>, \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': <module at remote 0x7ffff6ea7180>}, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': <type at remote 0x555555b0eed0>, \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': <module at remote 0x7ffff6ea7180>}) at Python/ceval.c:662\n#9 run_eval_code_obj () at Python/pythonrun.c:1078\n#10 run_mod () at Python/pythonrun.c:1100\n#11 PyRun_StringFlags () at Python/pythonrun.c:987\n#12 PyRun_SimpleStringFlags () at Python/pythonrun.c:461\n#13 pymain_run_command (cf=, command=<optimized out>) at Modules/main.c:241\n#14 pymain_run_python (exitcode=) at Modules/main.c:522\n#15 _Py_RunMain () at Modules/main.c:610\n#16 pymain_main () at Modules/main.c:640\n#17 _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:664\n#18 __libc_start_main (main=<main>, argc=7, argv=, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=) at ../csu/libc-start.c:291\n#19 _start ()\n'
Breakpoint 1 at 0x201df0: file Python/bltinmodule.c, line 1217.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, builtin_id () at Python/bltinmodule.c:1217 |
Is it just expecting builtin_id() to have been inlined? That seems risky. |
Ah no, it's expecting |
Well, the good news is I can repro it on a PGO build in WSL. So now I just need to go learn all about gcc's PGO build, debug info, and how gdb renders it! |
I confirmed earlier that removing the new code from builtins_id fixes this issue, which I suspect means that PGO is deciding to make different optimizations and produce different output. Other functions in the same stack also do not show their arguments, so I think the best thing to do here is fix the test to not care about arguments being in the display. The result of gcc's PGO on debug symbols should not affect how we make Python work. I'll update the regex in the test tomorrow. |
Okay, fixing the regex isn't an option, as most of the tests (just not the one copy-pasted above) rely on verifying the parameter value. I'll figure out how to skip the test on PGO build instead. |
Test is now skipped if PGO was used. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: