On Mon, Apr 14, 2025 at 5:09 PM 'Attila Szegedi' via v8-dev <[email protected]> wrote: >> That Environment::RunTimers shows up in the stack trace is not >> unexpected; it changes the active context and that's another point >> where you're racing the thread from the signal handler. > > Would that context not be scoped around the "cb->Call(env->context(), > process, 1, &arg);" invocations inside the loop, though? I'd expect that as > soon as Call() returns the context is unset, so I wouldn't expect a problem > there, and what definitely surprised me was Isolate being in a context (or at > least, claiming to be in one) during execution within the HandleScope > destructor. To make matters even more intriguing, this only seems to trigger > on worker threads, and never on the main event loop thread.
My point was that if your signal handler runs at exactly the right time (or wrong time, really) you're going to observe an isolate+context combo in an inconsistent state, and that's unavoidable, really. Worker threads enter/exit isolates way more often than the main thread so that makes perfect sense. (The main thread enters and exits an isolate only once; at program start and program exit.) >> Is this a new or existing problem? I remember someone from DD reaching >> out to me about this or a very similar problem 1-2 years ago, asking >> if I was interested in coming in as a consultant (I work on V8, node >> and libuv) but I didn't have time back then. > > > I've been with Datadog for about 2 years now myself, and I don't think it > came up since I've been here. The functionality I implemented recently for > capturing the async IDs during sampling is new. Then I probably misremember and it was something else. I didn't find anything from around that time in my email archive except for an exchange with one of your recruiters (who, it must be admitted, was very good and persuasive.) -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/CAHQurc801%3Da1fb8JCgfZ3bxf%3Dm9vNrvQneMQgBtH2JhNnQtjjQ%40mail.gmail.com.
