-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Exception ignored in tp_clear of: <class 'memoryview'> #110408
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
Comments
Are you able to reproduce this without the debugger (using pure python script in cmdline like |
I am using PyCharm and cannot reproduce without the debugger. |
I believe this is a dup of #77894. I think this is still a CPython issue, the debugger should not be able to do anything to crash Python. However, without a simple repro that involves "only CPython", it's not easy to track down the issue. It requires plenty of work here to understand the problem. |
Agreed, yes that's the original conversation I referenced - sorry I didn't have the correct migrated link. It's kind of fun to reproduce a bug that was only theoretical - at least now that I have a fix anyways :) |
Have you solved this problem? I had the same problem |
I thought my problem was solved, but it seems to be a timing issue and the
problem still occurs randomly.
When it does, the debugger throws the exception and all of the ProcessPool
processes have to be stopped manually with Task Manager.
I have stopped using the debugger which does completely resolve the issue.
For debugging, you can try to set the number of CPUs to 1, that seemed to
work for me.
…On Tue, Oct 24, 2023 at 8:39 AM cyc1111111111 ***@***.***> wrote:
同意,是的,这就是我引用的原始对话 - 抱歉,我没有正确的迁移链接。 很高兴将其作为重复项关闭并留给任何想要将来调查此问题的人吗?
重现一个理论上的错误是很有趣的 - 至少现在我已经修复了:)
Have you solved this problem? I had the same problem
—
Reply to this email directly, view it on GitHub
<#110408 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5L4UIAQMXTK5KMEBFUIRATYA6ZIFAVCNFSM6AAAAAA5USFJE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXGEZDMNRRGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
谢谢您! 您的回答对我同样有帮助! |
+1 this is annoying, debugger should handle multiprocessing more elegantly |
+1 |
I recently replaced my computer and switched the CPU from Core to AMD The same code encountered this issue. Setting CPU to 1 can solve the problem. I want to know if this error is caused by AMD CPUs I am considering whether to replace the computer again. |
No it happens on my "11th Gen Intel(R) Core(TM) i5-1135G7 " so not AMD only. |
I face with Exception ignored in tp_clear of: <class 'memoryview'> error many times when I run threads in python code and try to debug it: Exception ignored in tp_clear of: <class 'memoryview'> Process finished with exit code -1073741819 (0xC0000005) This actually means debug is not possible. |
This issue is resolved in Python 3.12 |
Sorry @dnparadice, but I experienced this with Python 3.12. |
That is too bad, I used to see this exception regularly and have not seen it since updating to Python 3.12. |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Searching this error the only reference I find was a previous conversation where this issue was considered theoretical and not reproducible.
I made a small script which can reproduce the error.
It's really frustrating to do, because the error isn't caught by the debugger, so it's really hard to figure out what was triggering the error, since the Traceback is seemingly random. I slowly pruned my code away to leave this minimal case.
The main code iterates through a PDF file, implemented as an iterator that returns the next page of the PDF (via poppler) as an image at a given DPI. For each page, a Future is created with ProcessPoolExecutor which delays and returns.
Both the iterator through poppler AND the futures are required.
I have solved the problem in my code by removing the iterator, but spent the time to create this reproduction in case it helps someone track down this bug.
Prerequisite: https://pdf2image.readthedocs.io/en/latest/installation.html
Example console logs:
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
CPython versions tested on:
3.10
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: