You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current thread 0x00007f8158632140 (most recent call first):
File "/home/lubuntu2/cpython/Lib/test/pickletester.py", line 3400 in test_unpickling_buffering_readline
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 2032 in _run_suite
File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 2128 in run_unittest
File "/home/lubuntu2/cpython/Lib/test/test_pickle.py", line 525 in test_main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 417 in run_tests_sequential
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 515 in run_tests
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 687 in _main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 634 in main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 712 in main
File "/home/lubuntu2/cpython/Lib/test/main.py", line 2 in <module>
File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
Aborted (core dumped)
In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling.
If an exception occurs during the first or second call, _PyObject_LookupAttrId() will be called with a live exception.
Activity
ZackerySpytz commentedon Oct 6, 2019
When running test_pickle, I sometimes see an assertion failure.
./python -m test test_pickle
0:00:00 load avg: 1.04 Run tests sequentially
0:00:00 load avg: 1.04 [1/1] test_pickle
python: Objects/typeobject.c:3151: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.
Fatal Python error: Aborted
Current thread 0x00007f8158632140 (most recent call first):
File "/home/lubuntu2/cpython/Lib/test/pickletester.py", line 3400 in test_unpickling_buffering_readline
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run
File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 2032 in _run_suite
File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 2128 in run_unittest
File "/home/lubuntu2/cpython/Lib/test/test_pickle.py", line 525 in test_main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest
File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 417 in run_tests_sequential
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 515 in run_tests
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 687 in _main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 634 in main
File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 712 in main
File "/home/lubuntu2/cpython/Lib/test/main.py", line 2 in <module>
File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
Aborted (core dumped)
In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling.
If an exception occurs during the first or second call, _PyObject_LookupAttrId() will be called with a live exception.
serhiy-storchaka commentedon Oct 6, 2019
I do not understand how you got an assertion failure. Did you interrupt tests with Ctrl-C?
taleinat commentedon Nov 22, 2019
Good catch on this, Zackery!
For anyone readying this, Serhiy posted a minimal reproducer in a PR comment, and the PR now adds a test for this.
iritkatriel commentedon Oct 19, 2021
Reproduced on 3.11 with Serhiy's reproducer:
4 remaining items
SahillMulani commentedon Apr 3, 2023
Please check the below code test cases
File without read and readline
File with bad read and without readline
File with bad readline and without read
ZackerySpytz commentedon Apr 8, 2023
I plan on updating my PR within the next two weeks.
@SahillMulani Please find a different issue to work on.
gh-82565: Add tests for pickle and unpickle with bad files (GH-16606)
pythongh-82565: Add tests for pickle and unpickle with bad files (pyt…
pythongh-82565: Add tests for pickle and unpickle with bad files (pyt…
serhiy-storchaka commentedon Dec 1, 2023
The original issue was fixed in #105667, but good tests are useful.
[3.12] gh-82565: Add tests for pickle and unpickle with bad files (GH…
[3.11] gh-82565: Add tests for pickle and unpickle with bad files (GH…
pythongh-82565: Add tests for pickle and unpickle with bad files (pyt…
pythongh-82565: Add tests for pickle and unpickle with bad files (pyt…