【 以下文字转载自 ITjob 讨论区 】
发信人: aaaaaaaa (每天爱你多一些), 信区: ITjob
标 题: 急招C++/Python高手解决一个技术问题
发信站: 水木社区 (Fri Sep 16 11:17:16 2022), 站内
有个C++和Python写的程序,操作系统是Win10, 经常出现崩溃的情况, 分析coredump文件发现是卡在了如下代码
https://github.com/stackless-dev/stackless/blob/v3.6.9/Python/condvar.h 的第244行
wait = WaitForSingleObjectEx(cv->sem, ms, FALSE);
call stack 信息如下:
python36.dll!_PyCOND_WAIT_MS(_PyCOND_T * cv, _RTL_CRITICAL_SECTION * cs, unsigned long ms) Line 244C
python36.dll!PyCOND_WAIT(_PyCOND_T * cv, _RTL_CRITICAL_SECTION * cs) Line 268C
python36.dll!EnterNonRecursiveMutex(_NRMUTEX * mutex, unsigned long milliseconds) Line 71C
python36.dll!PyThread_acquire_lock_timed(void * aLock, __int64 microseconds, int intr_flag) Line 295C
python36.dll!PyThread_acquire_lock(void * aLock, int waitflag) Line 312C
python36.dll!schedule_thread_block(_ts * ts) Line 760C
python36.dll!schedule_task_block(_object * * result, _tasklet * prev, int stackless, int * did_switch) Line 819C
python36.dll!slp_schedule_task(_object * * result, _tasklet * prev, _tasklet * next, int stackless, int * did_switch) Line 997C
python36.dll!generic_channel_block(_ts * ts, _object * * result, _channel * self, int dir, int stackless) Line 594C
python36.dll!generic_channel_action(_channel * self, _object * arg, int dir, int stackless) Line 482C
python36.dll!impl_channel_receive(_channel * self) Line 796C
python36.dll!channel_receive(_object * self) Line 822C
python36.dll!_PyCFunction_FastCallDict(_object * func_obj, _object * * args, __int64 nargs, _object * kwargs) Line 202C
python36.dll!_PyCFunction_FastCallKeywords(_object * func, _object * * stack, __int64 nargs, _object * kwnames) Line 310C
python36.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5514C
python36.dll!slp_eval_frame_value(_frame * f, int throwflag, _object * retval) Line 3529C
python36.dll!PyEval_EvalFrameEx_slp(_frame * f, int throwflag, _object * retval) Line 4344C
python36.dll!slp_eval_frame_newstack(_frame * f, int exc, _object * retval) Line 923C
python36.dll!PyEval_EvalFrameEx_slp(_frame * f, int throwflag, _object * retval) Line 4291C
python36.dll!slp_eval_frame_value(_frame * f, int throwflag, _object * retval) Line 4006C
python36.dll!slp_frame_dispatch_top(_object * retval) Line 1063C
python36.dll!slp_run_tasklet() Line 328C
python36.dll!slp_eval_frame(_frame * f) Line 380C
python36.dll!climb_stack_and_eval_frame(_frame * f) Line 294C
python36.dll!slp_eval_frame(_frame * f) Line 364C
python36.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * * args, __int64 argcount, _object * * kwnames, _object * * kwargs, __int64 kwcount, int kwstep, _object * * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 4805C
python36.dll!_PyFunction_FastCallDict(_object * func, _object * * args, __int64 nargs, _object * kwargs) Line 5782C
python36.dll!_PyObject_FastCallDict(_object * func, _object * * args, __int64 nargs, _object * kwargs) Line 2335C
python36.dll!_PyObject_Call_Prepend(_object * func, _object * obj, _object * args, _object * kwargs) Line 2406C
python36.dll!method_call(_object * method, _object * args, _object * kwargs) Line 318C
python36.dll!PyObject_Call(_object * func, _object * args, _object * kwargs) Line 2272C
python36.dll!PyEval_CallObjectWithKeywords(_object * func, _object * args, _object * kwargs) Line 5429C
python36.dll!PyEval_CallFunction(_object * obj, const char * format, ...) Line 504C
--
FROM 124.64.233.*