◐ Shell
reader mode source ↗
Skip to content

gh-118331: Handle errors in _PyObject_SetManagedDict#118334

Merged
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-118331-unraisable
Apr 29, 2024
Merged

gh-118331: Handle errors in _PyObject_SetManagedDict#118334
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-118331-unraisable

Conversation

@colesbury

@colesbury colesbury commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

When detaching a dict, the copy_values call may fail due to out-of-memory errors. This can be triggered by test_no_memory in test_repl.

When detaching a dict, the copy_values call may fail due to
out-of-memory errors. This can be triggered by test_no_memory in
test_repl.
@hugovk

hugovk commented Apr 26, 2024

Copy link
Copy Markdown
Member

Running this on this branch:

make clean
git clean -fdx .
./configure --with-pydebug && make -j10
./python.exe Lib/test/test_repl.py

I still get the error:

.....F.
======================================================================
FAIL: test_no_memory (__main__.TestInteractiveInterpreter.test_no_memory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/cpython/Lib/test/test_repl.py", line 86, in test_no_memory
    self.assertIn(p.returncode, (1, 120))
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: -6 not found in (1, 120)

----------------------------------------------------------------------
Ran 7 tests in 0.331s

FAILED (failures=1)

@colesbury

Copy link
Copy Markdown
Contributor Author

Hmmm... maybe there are multiple unhandled exceptions?

I haven't yet been able to reproduce additional failures with this PR.

@mpage

mpage commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

My experience is the same as @colesbury:

I tested on both fedora and MacOS.

@hugovk

hugovk commented Apr 26, 2024

Copy link
Copy Markdown
Member

It's really strange, I can repro on main with two different Macs: my work one (which is at work until Monday) and this one.

I can also repro with this branch and #118336.

@hugovk

hugovk commented Apr 27, 2024

Copy link
Copy Markdown
Member

gh-118331 fixes it for me, and also with that merged into this. Thanks!

@DinoV DinoV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM!

@colesbury colesbury merged commit 79688b5 into python:main Apr 29, 2024
@colesbury colesbury deleted the gh-118331-unraisable branch April 29, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants