假设我在一个相当复杂的 Flask 应用程序中有两个函数。一个函数调用另一个函数。
def dispatch_unlock(...):
# ... stuff ...
log('dis start')
# this routine just sends some data over a ZMQ IPC socket
# in this scenario, the socket send will time out
ret = acl.enqueue(unlock.id, endpoint_id, filter_entry['service_id'])
log('dis end')
return ret
def something_else(...);
# ... stuff ...
log('routecall start')
ret = dispatch_unlock(unlock, endpoint_id, endpoint, f)
log('routecall end')
return ret
When something_else
运行,产生以下输出:
routecall start
dis start
dis end
之后,它就挂了。我尝试转储 Python 堆栈跟踪,但它们没有显示任何有用的信息。一个堆栈跟踪位于 Werkzurg 重新加载器中,另一个堆栈跟踪导致调用的转储器SIGUSR1
.
谁能建议到底发生了什么? Python 调用堆栈是否以某种方式损坏了?
Edit:这是什么pdb
显示我在返回之前单步执行的时间。看起来像调用框架上面的框架dispatch_unlock
以某种方式迷路了。
> /SourceCache/Florence/lib/plugin/route.py(27)dispatch_unlock()
-> return ret
(Pdb) s
--Return--
> /SourceCache/Florence/lib/plugin/route.py(27)dispatch_unlock()->None
-> return ret
(Pdb) s