Repository navigation
test_bad_getattr crashes on APPX test #84638
Description
Activity
The Windows CI machines on Azure Pipelines run additional tests to check an "installed" layout and with the UWP entry point that's used for the Windows Store package.
These tests have been failing intermittently (though regularly) with a stack overflow crash in the PyPickler tests.
Example: https://dev.azure.com/Python/cpython/_build/results?buildId=62055&view=results
test_attribute_name_interning (test.test_pickle.PyPicklerTests) ... ok
File "D:\a\1\b\layout-appx-amd64\lib\test\pickletester.py", line 3085 in __getattr__
File "D:\a\1\b\layout-appx-amd64\lib\test\pickletester.py", line 3085 in __getattr__
File "D:\a\1\b\layout-appx-amd64\lib\test\pickletester.py", line 3085 in __getattr__
File "D:\a\1\b\layout-appx-amd64\lib\test\pickletester.py", line 3085 in __getattr__
...I assume this is due to having more code on the start at the start, and so the recursion limit isn't low enough. But it might also be worth checking this particular case to see whether there is unnecessary data being kept on the stack (e.g. in local C variables).
The crash occurs in both 3.8 and master, but not 3.7.
Turns out the stack reservation was different, which is why it was crashing.
As part of diagnosing it, I added the recursion count to faulthandler's output on Windows, but couldn't see if/where to do it for other platforms - Victor, any suggestions?
- addedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on May 1, 2020 Also, it was really test_bad_getattr that was crashing.
- changed the title
[-]test_attribute_name_interning crashes on APPX test[/-][+]test_bad_getattr crashes on APPX test[/+]on May 1, 2020 - changed the title
[-]test_attribute_name_interning crashes on APPX test[/-][+]test_bad_getattr crashes on APPX test[/+]on May 1, 2020 Also, it was really test_bad_getattr that was crashing.
Ah, an old friend. It seems like an issue with the maximum stack size. Here are my notes:
https://pythondev.readthedocs.io/unstable_tests.html#unlimited-recursionEither reduce Python maximum stack depth, or increase the C stack size.
Yeah, I already got that part. If you check the PR, I added some better diagnostics to faulthandler for this case, but I don't see where I can add it for other platforms?
Merged without the improved diagnostics. I might add that later if I get time.
Łukasz - this is a fairly trivial crash fix that'd be nice (and safe) to pull into 3.8.3, but not critical. Your call.
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: