-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Assertion `(env_->execution_async_id()) == (0)' failed #38155
Comments
@addaleax is this supposed to be possible? |
@ronag no, hence the assertion |
@ronag Do you have a reproducer? I doubt this happens just by calling |
Sorry. Happened while debugging another issue and haven’t happened since. |
@Flarna @addaleax If you clone this https://github.com/nodejs/undici/tree/native-assert and run |
I did a fast try but failed to reproduce the crash. Should it happen always or only every now and then? |
Node v15.5.1, OSX 11.2.3. It should happen every time. |
Stack trace on my mac:
|
Lines 122 to 127 in e46c680
I think it's that assert? |
Till now I failed to reproduce on windows or WSL. Found no time yet to test on linux. I have no access to a mac. |
Tried on linux and can't reproduce there with 15.14.0. The test just fails with JS exceptions:
Either I'm doing something wrong here or it effects only MacOs. |
Note that I can only reproduce with node, not with tap |
using node master directly reproduces this also on windows:
|
Seems like a different error? |
Looking at the offsets I guess it's a problem regarding symbol name resolution. Will try a local build. Update: Local build shows a better stack, updated above comment |
I did some debugging but haven't nailed down the actual issue. The error seems to happen if a promise is rejected but not handled within an emitter which in turn re-throws the error. But meanwhile I doubt that this is a node problem. |
Maybe a ping to @isaacs |
Maybe worth to mention that this happens also with node 14 if |
maybe related: #33771 |
Constantly reproducible in https://github.com/szmarczak/undici/tree/crash v16.9.1
|
With debug build:
|
It's easy to reproduce but as said above I doubt it's a nodejs issue. Or was there any change regarding the testsetup to no longer use |
An assertion should never happen when running user code. IMHO it's a node issue. |
@ronag That's true only for user code that doesn't touch internal APIs. For example, it's not a node issue if someone triggers an assertion by directly calling |
@targos Yes. But I'm more referring to @szmarczak's repro. |
That repro doesn't crash if I comment out this line: |
Ah, I didn't realize that was relevant there as well. |
Does anyone have a solution to this issue? Or is there is anything we could do to fix this issue? I can't reproduce the issue locally on my Ubuntu 21.10, but somehow the issue appears when using |
has there been found a solution to this issue? I'm experiencing the same problem and have changed node version several times, nothing helps :( |
I have a situation where this issue does occur, but it does not if I use To be more precise, this script starts an express server, among other things, and for some reason it doesn't fail if I manage to attach the debugger before the end of some initialization steps. So I can either start the process and quickly attach the debugger, or just use Unfortunately I can't share this project because it doesn't belong to me and it is not public. |
Heya, I've hit the same problem; I've created a repro here. |
@delvedor Thanks for your repo. But again it uses tap which internally uses async-hook-domain which is likely doing something wrong by monkeypatching node internal. See above comments. |
Seems latest versions of Is this problem still occurring anywhere with latest version of |
@Flarna i haven't seen the issue lately, no. |
closing as it seem problem is solved by latest version of |
I managed to trigger an assertion.
The text was updated successfully, but these errors were encountered: