-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pypy 3.9 segfaults while rewriting test assertions #11168
Comments
Thanks for the report! I think this is probably a PyPy bug, but let's see if we can narrow it down a bit before we report it upstream. Since it seems to happen while rewriting assertions, I expect it's possible to trigger this with a single test file, and there's good tooling to analyse what's happening from there.
|
Sigh, I've spent the whole evening trying to replicate locally and every time the test suite has just passed without triggering the segfault. I've also tried running the github action locally using https://github.com/nektos/act and also gotten nowhere. I'm not sure where to go from here. 😞 |
Thank you for trying! This is the worst kind of bug, to be clear, HypothesisWorks/hypothesis#3028 got us stuck for several months before we actually worked it out. Maybe it's dependent on something about the virtualization setup, or on the hardware architecture of your CI runners? Do you know what the physical CPU is on those machines? |
Perhaps trying to get something like |
I can now confirm I see this sometimes with pypy 3.10. @Zac-HD I think the physical cpu is AMD, but I don't know specifics beyond that. I have also added the gdb command @The-Compiler recommended and I got this: Run gdb -ex "set debuginfod enabled on" -ex r -ex bt -ex q --args $(which python) -m coverage run -m pytest --ignore=tests/simplepoll
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/python...
Reading symbols from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/pypy3.9.debug...
(No debugging symbols found in /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/pypy3.9.debug)
Starting program: /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/python -m coverage run -m pytest --ignore=tests/simplepoll
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 1955]
[Detaching after fork from child process 1956]
Program received signal SIGBUS, Bus error.
0x00007ffff5a7f9ea in pypy_g_from_object_6 () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#0 0x00007ffff5a7f9ea in pypy_g_from_object_6 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#1 0x00007ffff5a9e84d in pypy_g_from_object_59 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#2 0x00007ffff5a800d0 in pypy_g_from_object_6 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#3 0x00007ffff5a81aa0 in pypy_g_from_object_4.part ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#4 0x00007ffff5a8238e in pypy_g_from_object ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#5 0x00007ffff5bc0374 in pypy_g_compile ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#6 0x00007ffff591b050 in pypy_g_BuiltinActivation_UwS_ObjSpace_W_Root_fsencode_t () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#249 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#250 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#251 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#252 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#253 0x00007ffff632538b in pypy_g_CALL_METHOD_KW__AccessDirect_star_1 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#254 0x00007ffff5a2e7c5 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#255 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#256 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#257 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#258 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#259 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#260 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#261 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#262 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#263 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#264 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#265 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#266 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#267 0x00007ffff632547d in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#268 0x00007ffff5a30c9d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#269 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#270 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#271 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#272 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#273 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#274 0x00007ffff5bcf9c4 in pypy_g_exec_ ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#275 0x00007ffff575164a in pypy_g_BuiltinActivation_UwS_ObjSpace_W_Root_W_Root_W_R_2 () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#276 0x00007ffff59a16db in pypy_g_BuiltinCode_funcrun_obj ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#277 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#278 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#279 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#280 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#281 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#282 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#283 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#284 0x00007ffff632547d in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#285 0x00007ffff5a30c9d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#286 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#287 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#288 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#289 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#290 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#291 0x00007ffff632547d in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#292 0x00007ffff5a30c9d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#293 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#294 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#295 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#296 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#297 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#298 0x00007ffff632547d in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#299 0x00007ffff5a30c9d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#300 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#301 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#302 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#303 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#304 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#305 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#306 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#307 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#308 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#309 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#310 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#311 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#312 0x00007ffff5bcf9c4 in pypy_g_exec_ ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#313 0x00007ffff575164a in pypy_g_BuiltinActivation_UwS_ObjSpace_W_Root_W_Root_W_R_2 () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#314 0x00007ffff59a16db in pypy_g_BuiltinCode_funcrun_obj ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#315 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#316 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#317 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#318 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#319 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#320 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#321 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#322 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#323 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#324 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#325 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#326 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#327 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#328 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#329 0x00007ffff5a2a53d in pypy_g_CALL_FUNCTION_EX__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#330 0x00007ffff5a3126d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#331 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#332 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#333 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#334 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#335 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#336 0x00007ffff5a2b2bf in pypy_g_CALL_FUNCTION__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#337 0x00007ffff5a30e57 in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#338 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#339 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#340 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#341 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#342 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#343 0x00007ffff5a2a53d in pypy_g_CALL_FUNCTION_EX__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#344 0x00007ffff5a3126d in pypy_g_dispatch_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#345 0x00007ffff59fd242 in pypy_g_handle_bytecode__AccessDirect_None ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#346 0x00007ffff60f60b0 in pypy_g_portal_11 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#347 0x00007ffff64d5ecb in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter () from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#348 0x00007ffff59c484a in pypy_g_execute_frame ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#349 0x00007ffff68c5446 in __vmprof_eval_vmprof ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#350 0x00007ffff59a4a45 in pypy_g_call_function.star_3 ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#351 0x00007ffff5979959 in pypy_g_entry_point ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#352 0x00007ffff6a1c53f in pypy_main_startup ()
from /opt/hostedtoolcache/PyPy/3.9.16/x64/bin/libpypy3.9-c.so
#353 0x00007ffff448ed90 in __libc_start_call_main (
main=main@entry=0x401060 <main>, argc=argc@entry=7,
argv=argv@entry=0x7fffffffd7e8)
at ../sysdeps/nptl/libc_start_call_main.h:58
#354 0x00007ffff448ee40 in __libc_start_main_impl (main=0x401060 <main>,
argc=7, argv=0x7fffffffd7e8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffd7d8)
at ../csu/libc-start.c:392
#355 0x000000000040108e in _start ()
A debugging session is active.
Inferior 1 [process 1952] will be killed.
Quit anyway? (y or n) [answered Y; input not from terminal] |
Yeah, that looks like it crashes somewhere deep inside PyPy internals. I'm not really familiar with them, unfortunately. Perhaps it would make more sense to report this there? |
I have reported this to the pypy project, with some further investigation of my own: https://foss.heptapod.net/pypy/pypy/-/issues/3960 |
thanks for investigating this, @LilyFoote! that gdb traceback is actually helpful to me! I'm going to try to find out what exactly is crashing. it's likely something like: pytest assert rewriting produces an AST that is slightly different than what PyPy's ast-to-bytecode compiler expects. and instead of reporting that error sensibly, pypy just segfaults. |
is there any chance we could try to pretty-print the AST in the CI run that segfaults, before it is passed into |
I trying to get this using a fork of pytest and @LilyFoote's reproducer repo, waiting for results here: https://github.com/cfbolz/pypy-segfault/actions/runs/5485589082/jobs/9994579372 |
@cfbolz You'll need to enable buildjet: https://buildjet.com/for-github-actions/docs/getting-started/run-your-first-workflow Thankfully, they have a $5 credit so you don't need to pay until that runs out. |
ah, I see. they still want a credit card, which I don't have. if I open a PR on your repo with my changes, we could run it on your repo, if that's ok for you @LilyFoote? |
open one in any case: LilyFoote/pypy-segfault#1 |
(I work with @LilyFoote ) Just in case it's useful to anyone reading through this thread and considering investigating further, Adam from Buildjet did mention the following to us via email:
Best email seems to be: [email protected] |
Unsure if this is the same thing, but I'm seeing very similar errors on vanilla EC2 instances. Occasional (but consistent) segfaults - and once also this: from base_service.tests.calculator.test_helpers import AllProducts
pypy3-venv/lib/pypy3.9/site-packages/_pytest/assertion/rewrite.py:163: in exec_module
source_stat, co = _rewrite_test(fn, self.config)
pypy3-venv/lib/pypy3.9/site-packages/_pytest/assertion/rewrite.py:347: in _rewrite_test
co = compile(tree, strfn, "exec", dont_inherit=True)
E TypeError: expected some sort of stmt, got <ast.Name object at 0x00000000126c74c0> which seems to chime with the theory about slightly different ast representations. I'm using |
Trio's encountered this in python 3.10 on GitHub Actions with pypy 7.3.13: https://github.com/python-trio/trio/actions/runs/6952653687/job/18916563822. Not sure if this helps anything but this shows it can happen w/ GitHub Actions and with the 3.10 build. I'll see if I can reproduce this in EDIT: unfortunately I don't seem to be able to reproduce this. |
@A5rocks oh that's great! all my attempts to reproduce locally this or understand what's going on has failed so far. if you found a way to get the problem locally, that would be fantastic. |
I've reproduced this with a |
unfortunately I am still not making any progress on this :-(. My attempts to reproduce this locally have all not worked so far. if I take the dumped ASTs and call |
I realized I was being stupid and that the GH actions run I posted before printed the ast after So I made it print before in https://github.com/A5rocks/trio/actions/runs/7439290913/job/20239062451 but then I tried reproducing locally by running |
fwiw, PyPy has moved to github, so the upstream issue is now at pypy/pypy#3959 |
just to give a brief update, I am finally making progress on the bug. it's very likely not related to pytest at all, but a bug in pypy's GC(!) that just accidentally seems to manifest in pytest AST rewriting (in several projects). I hope to get a fix merged in the next week or two. |
Awesome!! I'd love to see a write up of the problem once you've fixed it. |
already working on a draft of that 😊 |
This is now fixed upstream: https://www.pypy.org/posts/2024/03/fixing-bug-incremental-gc.html |
When testing the project I work on in CI I frequently see a segfault in pytest's test assert rewriting when running with pypy 3.9. (I haven't yet seen it with 3.10, but I only just added that to CI.)
pip list
from the virtual environment you are usingpytest and operating system versions
pytest 7.4.0
ubuntu 22.04 (
buildjet-2vcpu-ubuntu-2204
https://buildjet.com/for-github-actions/docs/runners/hardware)minimal example if possible
I'm not sure how to narrow down to the problematic files.
The text was updated successfully, but these errors were encountered: