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
Embedded python thread crashes #41930
Comments
The following code crashes about 1/3 of the times. My platform is Python 2.4.1 on WXP (I tried the release The crash happens (in the python thread) while the main The open file seems to be the issue, since if I remove Cheers and ciao Ugo ////////////////////////// TestPyThreads.cpp
//////////////////////////
#include <windows.h> // Sleep
#include "Python.h"
int main()
{
PyEval_InitThreads();
Py_Initialize();
PyGILState_STATE main_restore_state =
PyGILState_UNLOCKED;
PyGILState_Release(main_restore_state);
PyGILState_Ensure();
PyGILState_Ensure();
Py_Finalize();
return 0;
} |
Logged In: YES I can't reproduce on gentoo linux (amd64) with a debug Can you try to debug this problem? |
Logged In: YES I would guess that the problem is going to be windows my comment on the debugging was:
I did not look at the python code long enough to follow it. |
Logged In: YES Something changed on the computer I'm testing on, and the The compiler is MSVC7.1 on WXP, using Python 241 This is the stack of the main thread 7ffe0304()
ntdll.dll!77f5b5d4()
kernel32.dll!77e7a683()
msvcr71d.dll!_close_lk(int fh=0x00000003) Line 115 +
0x4a C
msvcr71d.dll!_close(int fh=0x00000003) Line 60 + 0x9
C
msvcr71d.dll!_fclose_lk(_iobuf * str=0x1027c898) Line
127 + 0xc C
msvcr71d.dll!fclose(_iobuf * stream=0x1027c898) Line
58 + 0x9 C
> python24_d.dll!file_dealloc(PyFileObject *
f=0x00919ec8) Line 308 + 0xd C
python24_d.dll!_Py_Dealloc(_object * op=0x00919ec8)
Line 1870 + 0x7 C
python24_d.dll!frame_dealloc(_frame * f=0x00972960)
Line 394 + 0x67 C
python24_d.dll!_Py_Dealloc(_object * op=0x00972960)
Line 1870 + 0x7 C
python24_d.dll!PyThreadState_Clear(_ts *
tstate=0x00892c88) Line 200 + 0x6c C
python24_d.dll!PyInterpreterState_Clear(_is *
interp=0x00894f48) Line 93 + 0x9 C
python24_d.dll!Py_Finalize() Line 401 + 0x9 C
TestPyThreads.exe!main() Line 33 + 0x8 C++
TestPyThreads.exe!mainCRTStartup() Line 259 + 0x19
C
kernel32.dll!77e8141a() and this is the stack of the other thread (_threadstart)
as you can see, the crash is also happening at a different |
Logged In: YES Perhaps this is caused by different runtime DLLs. Here's See http://python.org/sf/1003535 Can you try to research more and see if you can come up with |
Logged In: YES I'm sorry I've been so late in answering. I did do a fair amount of testing when I originally posted the I've followed the google thread and I don't think it's the same |
This is a duplicate of bpo-1856: while a thread is sleeping, |
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:
The text was updated successfully, but these errors were encountered: