Conversation
|
Hi phillco! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but we do not have a signature on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Summary:
This can cause a deadlock if `func()` calls `create_callsite`.
Usually it's rare. But (Python) signal handler makes it realistic.
Example backtrace:
Traceback (most recent call first):
File "/opt/fb/mercurial/edenscm/tracing.py", line 337, in event
File "/opt/fb/mercurial/edenscm/mercurial/ui.py", line 1275, in debug
tracing.debug(msg.rstrip("\n"), depth=1)
File "/opt/fb/mercurial/edenscm/mercurial/commandserver.py", line 608, in _reapworkers
self.ui.debug("worker process exited (pid=%d)\n" % pid)
File "/opt/fb/mercurial/edenscm/mercurial/commandserver.py", line 591, in _sigchldhandler
self._reapworkers(os.WNOHANG)
File "/opt/fb/mercurial/edenscm/tracing.py", line 337, in event
File "/opt/fb/mercurial/edenscm/mercurial/ui.py", line 1275, in debug
tracing.debug(msg.rstrip("\n"), depth=1)
File "/opt/fb/mercurial/edenscm/mercurial/commandserver.py", line 608, in _reapworkers
self.ui.debug("worker process exited (pid=%d)\n" % pid)
File "/opt/fb/mercurial/edenscm/mercurial/commandserver.py", line 591, in _sigchldhandler
self._reapworkers(os.WNOHANG)
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x000055d0d65ba339 in <parking_lot::raw_rwlock::RawRwLock>::lock_upgradable_slow ()
#2 0x000055d0d55b5814 in tracing_runtime_callsite::create_callsite::<tracing_runtime_callsite::callsite_info::EventKindType, pytracing::new_callsite<tracing_runtime_callsite::callsite_info::EventKindType>::{closure#2}> ()
#3 0x000055d0d5584cb9 in <pytracing::EventCallsite>::__new__ ()
#4 0x000055d0d55a3eaa in std::panicking::try::<*mut python3_sys::object::PyObject, cpython::function::handle_callback<<pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc::{closure#0}, pytracing::EventCallsite, cpython::function::PyObjectCallbackConverter>::{closure#0}> ()
#5 0x000055d0d5589365 in cpython::function::handle_callback::<<pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc::{closure#0}, pytracing::EventCallsite, cpython::function::PyObjectCallbackConverter> ()
#6 0x000055d0d55856e1 in <pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc ()
#7 0x00007ff88d576230 in type_call (
kwds={'obj': Frame 0x7ff87c1f8c40, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87d...(truncated), args=(),
type=0x55d0d8ea5b40 <_RNvNvMs1R_CsgCrAUYYhx1D_9pytracingNtB8_13EventCallsite15create_instance11TYPE_OBJECT.llvm.4665269759137401160>) at Objects/typeobject.c:974
#8 _PyObject_MakeTpCall (callable=<type at remote 0x55d0d8ea5b40>, args=<optimized out>,
nargs=<optimized out>, keywords=<optimized out>) at Objects/call.c:159
#9 0x00007ff88d56dc81 in _PyObject_Vectorcall (
kwnames=('obj', 'name', 'target', 'level', 'fieldnames'), nargsf=<optimized out>,
args=<optimized out>, callable=<type at remote 0x55d0d8ea5b40>) at ./Include/cpython/abstract.h:125
#10 _PyObject_Vectorcall (kwnames=('obj', 'name', 'target', 'level', 'fieldnames'),
nargsf=<optimized out>, args=<optimized out>, callable=<type at remote 0x55d0d8ea5b40>)
at ./Include/cpython/abstract.h:115
#11 call_function (kwnames=('obj', 'name', 'target', 'level', 'fieldnames'), oparg=<optimized out>,
pp_stack=<synthetic pointer>, tstate=<optimized out>) at Python/ceval.c:4963
#12 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3515
#13 0x00007ff88d566268 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87cced010, for file /opt/fb/mercurial/edenscm/tracing.py, line 337, in event (message='worker process exited (pid=3953080)', name=None, target=None, level=1, depth=1, meta={}, frame=Frame 0x7ff87c1f8c40, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': ...(truncated))
at Python/ceval.c:741
#14 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>,
args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>, kwargs=0x7ff87c0fdc78,
kwcount=<optimized out>, kwstep=1, defs=0x7ff87d572558, defcount=4, kwdefs=0x0, closure=0x0,
name='event', qualname='event') at Python/ceval.c:4298
#15 0x00007ff88d57fdce in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7ff87c0fdc70,
nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:435
#16 0x00007ff88d57574f in _PyObject_FastCallDict (callable=<function at remote 0x7ff87d5741f0>,
args=0x7ff87eb63838, nargsf=<optimized out>, kwargs=<optimized out>) at Objects/call.c:104
#17 0x00007ff88d66d1ab in partial_fastcall (kwargs={'level': 1, 'depth': 1}, nargs=<optimized out>,
args=<optimized out>, pto=0x7ff87d572630) at ./Modules/_functoolsmodule.c:169
#18 partial_call (pto=0x7ff87d572630, args=<optimized out>, kwargs=<optimized out>)
at ./Modules/_functoolsmodule.c:224
#19 0x00007ff88d576331 in _PyObject_MakeTpCall (callable=<functools.partial at remote 0x7ff87d572630>,
args=<optimized out>, nargs=<optimized out>, keywords=<optimized out>) at Objects/object.c:2207
#20 0x00007ff88d56dc81 in _PyObject_Vectorcall (kwnames=('depth',), nargsf=<optimized out>,
args=<optimized out>, callable=<functools.partial at remote 0x7ff87d572630>)
at ./Include/cpython/abstract.h:125
#21 _PyObject_Vectorcall (kwnames=('depth',), nargsf=<optimized out>, args=<optimized out>,
callable=<functools.partial at remote 0x7ff87d572630>) at ./Include/cpython/abstract.h:115
#22 call_function (kwnames=('depth',), oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=<optimized out>) at Python/ceval.c:4963
#23 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3515
#24 0x00007ff88d566268 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c0e43c0, for file /opt/fb/mercurial/edenscm/mercurial/ui.py, line 1275, in debug (self=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a0>, 'bookmarks': <itemregister(_generics=se...(truncated))
at Python/ceval.c:741
#25 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>,
args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>, kwargs=0x7ff87c1f8de8,
kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='debug',
qualname='ui.debug') at Python/ceval.c:4298
#26 0x00007ff88d57fdce in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7ff87c1f8dd8,
nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:435
#27 0x00007ff88d56821a in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>,
args=0x7ff87c1f8dd8, callable=<function at remote 0x7ff87d57e9d0>)
at ./Include/cpython/abstract.h:127
#28 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=0x7ff88ca08780) at Python/ceval.c:4963
#29 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3486
#30 0x00007ff88d57fd38 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c1f8c40, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a0>,...(truncated))
at Python/ceval.c:738
#31 function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>)
at Objects/call.c:283
#32 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:410
#33 0x00007ff88d56821a in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>,
args=0x7ff87c0f26d8, callable=<function at remote 0x7ff87d73b310>)
at ./Include/cpython/abstract.h:127
#34 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=0x7ff88ca08780) at Python/ceval.c:4963
#35 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3486
#36 0x00007ff88d57fd38 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c0f2550, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 591, in _sigchldhandler (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemreg
ister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a...(truncated))
at Python/ceval.c:738
#37 function_code_fastcall (globals=<optimized out>, nargs=3, args=<optimized out>, co=<optimized out>)
at Objects/call.c:283
#38 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:410
#39 0x00007ff88d592153 in _PyObject_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>,
args=<optimized out>, callable=<optimized out>) at ./Include/cpython/abstract.h:115
#40 method_vectorcall (method=<optimized out>, args=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/classobject.c:67
#41 0x00007ff88d5963fb in PyVectorcall_Call (kwargs=0x0, tuple=<optimized out>,
callable=<method at remote 0x7ff87c70d5c0>) at Objects/dictobject.c:1802
#42 PyObject_Call (callable=<method at remote 0x7ff87c70d5c0>, args=<optimized out>, kwargs=0x0)
at Objects/call.c:227
#43 0x00007ff88d6405ea in _PyErr_CheckSignals () at ./Modules/signalmodule.c:1689
#44 0x00007ff88d5a41a1 in _PyErr_CheckSignals () at Objects/object.c:577
#45 PyErr_CheckSignals () at ./Modules/signalmodule.c:1649
#46 PyObject_Str (v='_reapworkers') at Objects/object.c:561
#47 0x000055d0d557c821 in pytracing::tostr_opt ()
#48 0x000055d0d55b5a7d in tracing_runtime_callsite::create_callsite::<tracing_runtime_callsite::callsite_info::EventKindType, pytracing::new_callsite<tracing_runtime_callsite::callsite_info::EventKindType>::{closure#2}> ()
#49 0x000055d0d5584cb9 in <pytracing::EventCallsite>::__new__ ()
#50 0x000055d0d55a3eaa in std::panicking::try::<*mut python3_sys::object::PyObject, cpython::function::handle_callback<<pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc::{closure#0}, pytracing::EventCallsite, cpython::function::PyObjectCallbackConverter>::{closure#0}> ()
#51 0x000055d0d5589365 in cpython::function::handle_callback::<<pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc::{closure#0}, pytracing::EventCallsite, cpython::function::PyObjectCallbackConverter> ()
#52 0x000055d0d55856e1 in <pytracing::EventCallsite>::create_instance::TYPE_OBJECT::wrap_newfunc ()
#53 0x00007ff88d576230 in type_call (
kwds={'obj': Frame 0x7ff87c1f8440, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87d...(truncated), args=(),
type=0x55d0d8ea5b40 <_RNvNvMs1R_CsgCrAUYYhx1D_9pytracingNtB8_13EventCallsite15create_instance11TYPE_OBJECT.llvm.4665269759137401160>) at Objects/typeobject.c:974
#54 _PyObject_MakeTpCall (callable=<type at remote 0x55d0d8ea5b40>, args=<optimized out>,
nargs=<optimized out>, keywords=<optimized out>) at Objects/call.c:159
#55 0x00007ff88d56dc81 in _PyObject_Vectorcall (
kwnames=('obj', 'name', 'target', 'level', 'fieldnames'), nargsf=<optimized out>,
args=<optimized out>, callable=<type at remote 0x55d0d8ea5b40>) at ./Include/cpython/abstract.h:125
#56 _PyObject_Vectorcall (kwnames=('obj', 'name', 'target', 'level', 'fieldnames'),
nargsf=<optimized out>, args=<optimized out>, callable=<type at remote 0x55d0d8ea5b40>)
at ./Include/cpython/abstract.h:115
#57 call_function (kwnames=('obj', 'name', 'target', 'level', 'fieldnames'), oparg=<optimized out>,
pp_stack=<synthetic pointer>, tstate=<optimized out>) at Python/ceval.c:4963
#58 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3515
#59 0x00007ff88d566268 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87ccec890, for file /opt/fb/mercurial/edenscm/tracing.py, line 337, in event (message='worker process exited (pid=3953122)', name=None, target=None, level=1, depth=1, meta={}, frame=Frame 0x7ff87c1f8440, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _u
nserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': ...(truncated))
at Python/ceval.c:741
#60 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>,
args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>, kwargs=0x7ff87c0fdd78,
kwcount=<optimized out>, kwstep=1, defs=0x7ff87d572558, defcount=4, kwdefs=0x0, closure=0x0,
name='event', qualname='event') at Python/ceval.c:4298
#61 0x00007ff88d57fdce in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7ff87c0fdd70,
nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:435
#62 0x00007ff88d57574f in _PyObject_FastCallDict (callable=<function at remote 0x7ff87d5741f0>,
args=0x7ff87eb59d18, nargsf=<optimized out>, kwargs=<optimized out>) at Objects/call.c:104
#63 0x00007ff88d66d1ab in partial_fastcall (kwargs={'level': 1, 'depth': 1}, nargs=<optimized out>,
args=<optimized out>, pto=0x7ff87d572630) at ./Modules/_functoolsmodule.c:169
#64 partial_call (pto=0x7ff87d572630, args=<optimized out>, kwargs=<optimized out>)
at ./Modules/_functoolsmodule.c:224
#65 0x00007ff88d576331 in _PyObject_MakeTpCall (callable=<functools.partial at remote 0x7ff87d572630>,
args=<optimized out>, nargs=<optimized out>, keywords=<optimized out>) at Objects/object.c:2207
#66 0x00007ff88d56dc81 in _PyObject_Vectorcall (kwnames=('depth',), nargsf=<optimized out>,
args=<optimized out>, callable=<functools.partial at remote 0x7ff87d572630>)
at ./Include/cpython/abstract.h:125
#67 _PyObject_Vectorcall (kwnames=('depth',), nargsf=<optimized out>, args=<optimized out>,
callable=<functools.partial at remote 0x7ff87d572630>) at ./Include/cpython/abstract.h:115
#68 call_function (kwnames=('depth',), oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=<optimized out>) at Python/ceval.c:4963
#69 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3515
#70 0x00007ff88d566268 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c0e4200, for file /opt/fb/mercurial/edenscm/mercurial/ui.py, line 1275, in debug (self=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a0>, 'bookmarks': <itemregister(_generics=se...(truncated))
at Python/ceval.c:741
#71 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>,
args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>, kwargs=0x7ff87c1f85e8,
kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='debug',
qualname='ui.debug') at Python/ceval.c:4298
#72 0x00007ff88d57fdce in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7ff87c1f85d8,
nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:435
#73 0x00007ff88d56821a in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>,
args=0x7ff87c1f85d8, callable=<function at remote 0x7ff87d57e9d0>)
at ./Include/cpython/abstract.h:127
#74 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=0x7ff88ca08780) at Python/ceval.c:4963
#75 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3486
#76 0x00007ff88d57fd38 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c1f8440, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 608, in _reapworkers (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a0>,...(truncated))
at Python/ceval.c:738
#77 function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>)
{<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a0>,...(truncated))
at Python/ceval.c:738
#77 function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
at Objects/call.c:283
#78 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:410
#79 0x00007ff88d56821a in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>,
args=0x7ff87c0f2528, callable=<function at remote 0x7ff87d73b310>)
at ./Include/cpython/abstract.h:127
#80 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>,
tstate=0x7ff88ca08780) at Python/ceval.c:4963
#81 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3486
#82 0x00007ff88d57fd38 in PyEval_EvalFrameEx (throwflag=0,
f=Frame 0x7ff87c0f23a0, for file /opt/fb/mercurial/edenscm/mercurial/commandserver.py, line 591, in _sigchldhandler (self=<unixforkingservice(ui=<ui(_buffers=[], _bufferstates=[], _bufferapplylabels=None, _outputui=None, callhooks=True, insecureconnections=False, _colormode=None, _styles={}, _terminaloutput=None, cmdname=None, _uiconfig=<uiconfig(quiet=False, verbose=False, debugflag=False, tracebackflag=False, logmeasuredtimes=False, _rcfg=<localrcfg(_rcfg=<bindings.configparser.config at remote 0x7ff87d7325d0>) at remote 0x7ff87eb73e80>, _unserializable={}, _pinnedconfigs=set(), _knownconfig={'alias': <itemregister(_generics={<configitem(section='alias', name='.*', default=None, alias=[], generic=True, priority=0, _re=<re.Pattern at remote 0x7ff87d69bed0>) at remote 0x7ff87d690a60>}) at remote 0x7ff87dbfde50>, 'annotate': <itemregister(_generics=set()) at remote 0x7ff87d6ad9f0>, 'auth': <itemregister(_generics=set()) at remote 0x7ff87dc037c0>, 'blackbox': <itemregister(_generics=set()) at remote 0x7ff87dc039a...(truncated))
at Python/ceval.c:738
#83 function_code_fastcall (globals=<optimized out>, nargs=3, args=<optimized out>, co=<optimized out>)
at Objects/call.c:283
#84 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:410
#85 0x00007ff88d592153 in _PyObject_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>,
args=<optimized out>, callable=<optimized out>) at ./Include/cpython/abstract.h:115
#86 method_vectorcall (method=<optimized out>, args=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/classobject.c:67
#87 0x00007ff88d5963fb in PyVectorcall_Call (kwargs=0x0, tuple=<optimized out>,
callable=<method at remote 0x7ff87c70d5c0>) at Objects/dictobject.c:1802
#88 PyObject_Call (callable=<method at remote 0x7ff87c70d5c0>, args=<optimized out>, kwargs=0x0)
at Objects/call.c:227
#89 0x00007ff88d6405ea in _PyErr_CheckSignals () at ./Modules/signalmodule.c:1689
#90 0x00007ff88d59b7fd in _PyErr_CheckSignals () at ./Modules/signalmodule.c:1660
#91 PyErr_CheckSignals () at ./Modules/signalmodule.c:1649
....
Reviewed By: DurhamG
Differential Revision: D27111187
fbshipit-source-id: 1aa29ab24088b57b98de3741eb81c0a7be01237d
Summary: During shutdown, the overlay background thread is terminated, and the overlay closed, but EdenServer timers are still running. One of which being the manageOverlay one which performs a maintenance on the Overlay. In some cases, shutdown and this timer are racing each other, causing the timer to run after the overlay has been closed, causing a use after free and crashing EdenFS. To solve this, we can either add locks around closing the overlay and the maintenance to guarantee that they do not race, or we can move the maintenance operation to a thread that is known to be running only when the overlay is opened. This diff takes the second approach. The bug manifest itself like so: I0712 01:16:48.253296 21620 EdenServiceHandler.cpp:3394] [000002517432E1E0] initiateShutdown() took 368 µs I0712 01:16:48.253838 24700 PrjfsChannel.cpp:1185] Stopping PrjfsChannel for: C:\\cygwin\\tmp\\eden_test.stop_at_ea.m3931hyz\\mounts\\main I0712 01:16:48.258533 19188 EdenServer.cpp:1624] mount point "C:\\cygwin\\tmp\\eden_test.stop_at_ea.m3931hyz\\mounts\\main" stopped V0712 01:16:48.258814 19188 EdenMount.cpp:851] beginning shutdown for EdenMount C:\\cygwin\\tmp\\eden_test.stop_at_ea.m3931hyz\\mounts\\main V0712 01:16:48.259895 19188 EdenMount.cpp:855] shutdown complete for EdenMount C:\\cygwin\\tmp\\eden_test.stop_at_ea.m3931hyz\\mounts\\main V0712 01:16:48.287378 19188 EdenMount.cpp:861] successfully closed overlay at C:\\cygwin\\tmp\\eden_test.stop_at_ea.m3931hyz\\mounts\\main Unhandled win32 exception code=0xC0000005. Fatal error detected at: #0 00007FF707BA3D81 (7a686d9) facebook::eden::SqliteDatabase::checkpoint Z:\shipit\eden\eden\fs\sqlite\SqliteDatabase.cpp:99 #1 00007FF7072D4090 facebook::eden::EdenServer::manageOverlay Z:\shipit\eden\eden\fs\service\EdenServer.cpp:2142 #2 00007FF7074765D0 facebook::eden::PeriodicTask::timeoutExpired Z:\shipit\eden\eden\fs\service\PeriodicTask.cpp:32 #3 00007FF707500F93 folly::HHWheelTimerBase<std::chrono::duration<__int64,std::ratio<1,1000> > >::timeoutExpired Z:\shipit\folly\folly\io\async\HHWheelTimer.cpp:286 #4 00007FF70757BB44 folly::AsyncTimeout::libeventCallback Z:\shipit\folly\folly\io\async\AsyncTimeout.cpp:174 #5 00007FF708E7AD45 (645b6fc) event_priority_set #6 00007FF708E7AA3A event_priority_set #7 00007FF708E77343 event_base_loop #8 00007FF707515FC5 folly::EventBase::loopMain Z:\shipit\folly\folly\io\async\EventBase.cpp:405 #9 00007FF707515C62 folly::EventBase::loopBody Z:\shipit\folly\folly\io\async\EventBase.cpp:326 #10 00007FF7072DC5EE facebook::eden::EdenServer::performCleanup Z:\shipit\eden\eden\fs\service\EdenServer.cpp:1212 #11 00007FF707219BED facebook::eden::runEdenMain Z:\shipit\eden\eden\fs\service\EdenMain.cpp:395 #12 00007FF7071C624A main Z:\shipit\eden\eden\fs\service\oss\main.cpp:23 #13 00007FF708E87A94 __scrt_common_main_seh d:\A01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 #14 00007FFC96DC7034 BaseThreadInitThunk #15 00007FFC98C5CEC1 RtlUserThreadStart Reviewed By: fanzeyi Differential Revision: D37793444 fbshipit-source-id: cd33302789c2c7a29d566d5bac6e119eccf0a5f2
Summary: It turns out that initializing objc types before (disabling appnap) and after (via libcurl [2]) fork() would abort the program like: objc[<pid>]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. It seems objc really dislikes fork. Disabling the objc logic before fork seems to be the only way to unblock the issue. Other approaches considered: - Avoid `fork()`: not really fesiable for performance (startup, Python GIL) reasons. - Ensure chgserver does not create threads (see https://bugs.python.org/issue33725). Not possible since appnope implicitly creates a (short-lived?) thread. - Disable AppNap without using objc: does not seem trivial. - Set `OBJC_DISABLE_INITIALIZE_FORK_SAFETY` to `YES`. Abort with a different message [1]. [1]: ``` The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug. ``` [2]: ``` (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x00007ff81395f067 libobjc.A.dylib`objc_initializeAfterForkError frame #1: 0x00007ff81395f187 libobjc.A.dylib`performForkChildInitialize(objc_class*, objc_class*) + 274 frame #2: 0x00007ff81394a479 libobjc.A.dylib`initializeNonMetaClass + 617 frame #3: 0x00007ff813949f12 libobjc.A.dylib`initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt<false>&, bool) + 232 frame #4: 0x00007ff813949c93 libobjc.A.dylib`lookUpImpOrForward + 1087 frame #5: 0x00007ff81394e02f libobjc.A.dylib`object_getMethodImplementation + 153 frame #6: 0x00007ff813b12934 CoreFoundation`_NSIsNSString + 55 frame #7: 0x00007ff813b128dc CoreFoundation`-[NSTaggedPointerString isEqual:] + 36 frame #8: 0x00007ff813b05609 CoreFoundation`CFEqual + 533 frame #9: 0x00007ff813b0b2a3 CoreFoundation`_CFBundleCopyBundleURLForExecutableURL + 220 frame #10: 0x00007ff813b069cb CoreFoundation`CFBundleGetMainBundle + 116 frame #11: 0x00007ff813b28ade CoreFoundation`_CFPrefsGetCacheStringForBundleID + 71 frame #12: 0x00007ff813b2f52f CoreFoundation`-[CFPrefsPlistSource setDomainIdentifier:] + 92 frame #13: 0x00007ff813b2f46c CoreFoundation`-[CFPrefsPlistSource initWithDomain:user:byHost:containerPath:containingPreferences:] + 99 frame #14: 0x00007ff813b2f351 CoreFoundation`__85-[_CFXPreferences(PlistSourceAdditions) withManagedSourceForIdentifier:user:perform:]_block_invoke + 156 frame #15: 0x00007ff813c622a7 CoreFoundation`-[_CFXPreferences withSources:] + 60 frame #16: 0x00007ff813cac80f CoreFoundation`-[_CFXPreferences withManagedSourceForIdentifier:user:perform:] + 240 frame #17: 0x00007ff813b2a1ab CoreFoundation`-[CFPrefsSearchListSource addManagedSourceForIdentifier:user:] + 98 frame #18: 0x00007ff813c83a18 CoreFoundation`__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 287 frame #19: 0x00007ff813c836e8 CoreFoundation`-[_CFXPreferences withSearchLists:] + 60 frame #20: 0x00007ff813b29f50 CoreFoundation`__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 279 frame #21: 0x00007ff813c83879 CoreFoundation`-[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 374 frame #22: 0x00007ff813b29a42 CoreFoundation`-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 137 frame #23: 0x00007ff813b29978 CoreFoundation`_CFPreferencesCopyAppValueWithContainerAndConfiguration + 101 frame #24: 0x00007ff8145c672b SystemConfiguration`SCDynamicStoreCopyProxiesWithOptions + 155 frame #25: 0x000000010272a315 hg`Curl_resolv(data=0x00007f8dea888a00, hostname="api.github.com", port=443, allowDOH=true, entry=0x000000030a12be10) at hostip.c:675:30 [opt] frame #26: 0x000000010272a68c hg`Curl_resolv_timeout(data=<unavailable>, hostname=<unavailable>, port=<unavailable>, entry=<unavailable>, timeoutms=<unavailable>) at hostip.c:908:8 [opt] [artificial] frame #27: 0x0000000102753e1e hg`create_conn at url.c:3440:12 [opt] frame #28: 0x0000000102753cfe hg`create_conn(data=0x00007f8dea888a00, in_connect=0x000000030a12bed8, async=0x000000030a12bf8f) at url.c:4077:12 [opt] frame #29: 0x000000010275026b hg`Curl_connect(data=0x00007f8dea888a00, asyncp=0x000000030a12bf8f, protocol_done=0x000000030a12bfb2) at url.c:4156:12 [opt] frame #30: 0x000000010273dbd1 hg`multi_runsingle(multi=<unavailable>, nowp=0x000000030a12c020, data=0x00007f8dea888a00) at multi.c:1858:16 [opt] frame #31: 0x000000010273d6ae hg`curl_multi_perform(multi=0x00007f8deb0699c0, running_handles=0x000000030a12c074) at multi.c:2636:14 [opt] frame #32: 0x0000000102726ada hg`curl_easy_perform at easy.c:599:15 [opt] frame #33: 0x0000000102726aa8 hg`curl_easy_perform [inlined] easy_perform(data=0x00007f8dea888a00, events=false) at easy.c:689:42 [opt] frame #34: 0x00000001027269a4 hg`curl_easy_perform(data=0x00007f8dea888a00) at easy.c:708:10 [opt] frame #35: 0x00000001025e1cf6 hg`http_client::request::Request::send::h13a4e600f6bc5508 [inlined] curl::easy::handler::Easy2$LT$H$GT$::perform::h2ba0ae1da25a8852(self=<unavailable>) at handler.rs:3163:37 [opt] ``` Reviewed By: bolinfest Differential Revision: D40538471 fbshipit-source-id: cd8611c8082fbe2d610efb78cb84defdb16d7980
Summary:
Fixes this (which was polluting my `arc rust-check` output):
```
warning: unused variable: `time`
--> fbcode/eden/scm/saplingnative/bindings/modules/pymetalog/src/lib.rs:119:38
|
119 | def commit(&self, message: &str, time: Option<u64> = None, pending: bool = false) -> PyResult<Bytes> {
| ^^^^
|
help: `time` is captured in macro and introduced a unused variable
--> third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:478:1
|
= note: in this expansion of `py_class!` (#1)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:537:9
|
= note: in this macro invocation (#2)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:543:1
|
= note: in this expansion of `$crate::py_class_impl_item!` (#18)
--> third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:30:1
|
= note: in this expansion of `$crate::py_class_impl!` (#2)
|
= note: in this expansion of `$crate::py_class_impl!` (#3)
|
= note: in this expansion of `$crate::py_class_impl!` (#4)
|
= note: in this expansion of `$crate::py_class_impl!` (#5)
|
= note: in this expansion of `$crate::py_class_impl!` (#6)
|
= note: in this expansion of `$crate::py_class_impl!` (#7)
|
= note: in this expansion of `$crate::py_class_impl!` (#8)
|
= note: in this expansion of `$crate::py_class_impl!` (#9)
|
= note: in this expansion of `$crate::py_class_impl!` (#10)
|
= note: in this expansion of `$crate::py_class_impl!` (#11)
|
= note: in this expansion of `$crate::py_class_impl!` (#12)
|
= note: in this expansion of `$crate::py_class_impl!` (#13)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:249:5
|
= note: in this macro invocation (#3)
|
= note: in this macro invocation (#4)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2392:5
|
= note: in this macro invocation (#5)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2970:5
|
= note: in this macro invocation (#7)
|
= note: in this macro invocation (#13)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2999:13
|
= note: in this macro invocation (#14)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:3005:5
|
= note: in this macro invocation (#8)
|
= note: in this macro invocation (#11)
|
= note: in this macro invocation (#12)
::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:3120:5
|
= note: in this macro invocation (#6)
|
= note: in this macro invocation (#9)
|
= note: in this macro invocation (#10)
--> third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:196:1
|
= note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#14)
|
= note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#15)
|
= note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#16)
|
= note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#17)
::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:201:9
|
= note: in this macro invocation (#18)
::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:271:9
|
= note: in this macro invocation (#15)
::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:331:9
|
= note: in this macro invocation (#16)
|
= note: in this macro invocation (#17)
|
::: fbcode/eden/scm/saplingnative/bindings/modules/pymetalog/src/lib.rs:36:1
|
36 | / py_class!(pub class metalog |py| {
37 | | data log: Arc<RwLock<MetaLog>>;
38 | | data fspath: String;
... |
226 | | }
227 | | });
| |____- in this macro invocation (#1)
= note: `#[warn(unused_variables)]` on by default
```
Reviewed By: quark-zju
Differential Revision: D65218833
fbshipit-source-id: fa69c1a24a32b7eff857070528f6337ec0b3711c
Summary:
The linux timer is while convenient, tricky to "fully stop" in a controlled
way. After `timer_delete` and `sigwait` draining, there could still be pending
signals created by the timer.
This is causing issues with an upcoming change that replaces the pipe with a
ring buffer. It triggers use-after-free:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4058789==ERROR: AddressSanitizer: SEGV on unknown address 0x7fe77d601820 (pc 0x7fe7877b11f7 bp 0x7fe7809fe0e0 sp 0x7fe7809fe0c0 T3)
==4058789==The signal is caused by a READ memory access.
SCARINESS: 20 (wild-addr-read)
#0 0x7fe7877b11f7 in core::sync::atomic::atomic_load::<u8> xplat/rust/toolchain/sysroot/1.93.1/library/core/src/sync/atomic.rs:4010:24
#1 0x55b124a75c8f in <core::sync::atomic::AtomicBool>::load xplat/rust/toolchain/sysroot/1.93.1/library/core/src/sync/atomic.rs:729:18
#2 0x55b124a710e9 in <sampling_profiler::ring_buffer::Shared<sampling_profiler::frame_handler::FramePayload, 32768>>::push fbcode/eden/scm/lib/sampling-profiler/src/ring_buffer.rs:116:24
#3 0x55b124a70513 in <sampling_profiler::ring_buffer::RingBufWriter<sampling_profiler::frame_handler::FramePayload, 32768>>::push fbcode/eden/scm/lib/sampling-profiler/src/ring_buffer.rs:57:21
#4 0x55b124a7009d in sampling_profiler::signal_handler::signal_handler::{closure#0}::{closure#0} fbcode/eden/scm/lib/sampling-profiler/src/signal_handler.rs:99:42
#5 0x55b124a7041f in sampling_profiler::signal_handler::signal_handler::{closure#0} fbcode/eden/scm/lib/backtrace-ext/src/lib.rs:166:21
#6 0x7fe78618c95f in <&mut dyn for<'a> core::ops::function::FnMut<(&'a backtrace::backtrace::Frame,), Output = bool> as core::ops::function::FnMut<(&backtrace::backtrace::Frame,)>>::call_mut xplat/rust/toolchain/sysroot/1.93.1/library/core/src/ops/function.rs:298:21
#7 0x7fe7861c9be0 in backtrace::backtrace::libunwind::trace::trace_fn third-party/rust/vendor/backtrace-0.3.76/src/backtrace/libunwind.rs:130:26
#8 0x7fe78861b158 in _Unwind_Backtrace ./libgcc/unwind.inc:307:12
#9 0x55b124a60157 in trace third-party/rust/vendor/backtrace-0.3.76/src/backtrace/libunwind.rs:117:9
#10 0x55b124a60157 in backtrace::backtrace::trace_unsynchronized::<sampling_profiler::signal_handler::signal_handler::{closure#0}> third-party/rust/vendor/backtrace-0.3.76/src/backtrace/mod.rs:66:14
#11 0x55b124a72960 in sampling_profiler::signal_handler::signal_handler fbcode/eden/scm/lib/sampling-profiler/src/signal_handler.rs:92:5
#12 0x7fe78824455f sysdeps/unix/sysv/linux/libc_sigaction.c:8
#13 0x7fe7882ec3a2 in clock_nanosleep@GLIBC_2.17 sysdeps/unix/sysv/linux/clock_nanosleep.c:48:7
#14 0x7fe7882f1062 in nanosleep sysdeps/unix/sysv/linux/nanosleep.c:25:13
#15 0x7fe78813615d in std::sys::thread::unix::sleep xplat/rust/toolchain/sysroot/1.93.1/library/std/src/sys/thread/unix.rs:536:16
#16 0x55b124a7a1fe in sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0} fbcode/eden/scm/lib/sampling-profiler/src/tests.rs:46:21
#17 0x55b124a6fa38 in std::sys::backtrace::__rust_begin_short_backtrace::<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()> xplat/rust/toolchain/sysroot/1.93.1/library/std/src/sys/backtrace.rs:160:18
#18 0x55b124a8261a in std::thread::lifecycle::spawn_unchecked::<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0} xplat/rust/toolchain/sysroot/1.93.1/library/std/src/thread/lifecycle.rs:92:13
#19 0x55b124a6ae21 in <core::panic::unwind_safe::AssertUnwindSafe<std::thread::lifecycle::spawn_unchecked<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once xplat/rust/toolchain/sysroot/1.93.1/library/core/src/panic/unwind_safe.rs:274:9
#20 0x55b124a74c55 in std::panicking::catch_unwind::do_call::<core::panic::unwind_safe::AssertUnwindSafe<std::thread::lifecycle::spawn_unchecked<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>, ()> xplat/rust/toolchain/sysroot/1.93.1/library/std/src/panicking.rs:581:40
#21 0x55b124a8314c in __rust_try sampling_profiler.6ee92ca0d8805206-cgu.08
#22 0x55b124a811e1 in catch_unwind<(), core::panic::unwind_safe::AssertUnwindSafe<std::thread::lifecycle::spawn_unchecked::{closure#1}::{closure_env#0}<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure_env#0}, ()>>> xplat/rust/toolchain/sysroot/1.93.1/library/std/src/panicking.rs:544:19
#23 0x55b124a811e1 in catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::lifecycle::spawn_unchecked::{closure#1}::{closure_env#0}<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure_env#0}, ()>>, ()> xplat/rust/toolchain/sysroot/1.93.1/library/std/src/panic.rs:359:14
#24 0x55b124a811e1 in std::thread::lifecycle::spawn_unchecked::<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()>::{closure#1} xplat/rust/toolchain/sysroot/1.93.1/library/std/src/thread/lifecycle.rs:90:26
#25 0x55b124a6124c in <std::thread::lifecycle::spawn_unchecked<sampling_profiler::tests::test_stress_concurrent_profilers::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} xplat/rust/toolchain/sysroot/1.93.1/library/core/src/ops/function.rs:250:5
#26 0x7fe78813728b in call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> xplat/rust/toolchain/sysroot/1.93.1/library/alloc/src/boxed.rs:2206:9
#27 0x7fe78813728b in <std::sys::thread::unix::Thread>::new::thread_start xplat/rust/toolchain/sysroot/1.93.1/library/std/src/sys/thread/unix.rs:118:17
#28 0x55b124b235a6 in asan_thread_start(void*) ubsan.c
#29 0x7fe78829abc8 in start_thread nptl/pthread_create.c:434:8
#30 0x7fe78832ce4b in __GI___clone3 sysdeps/unix/sysv/linux/x86_64/clone3.S:81
This change increases the background thread count to 2 on Linux, which I plan
to address in a follow-up.
Reviewed By: muirdm
Differential Revision: D93889226
fbshipit-source-id: 95c8315abb1b1f33c499b11557d0100325b4a4e1
No description provided.