Skip to content
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

awaiting top level no-op promise that never resolves is missing an error/warn, causing 100% cpu usage #14951

Open
pfgithub opened this issue Nov 2, 2024 · 0 comments
Labels
bug Something isn't working runtime

Comments

@pfgithub
Copy link
Contributor

pfgithub commented Nov 2, 2024

// a.mjs
await new Promise(r => {});
$> bun a.mjs
# (waits forever at 100% cpu usage)
$> node a.mjs
Warning: Detected unsettled top-level await at a.mjs:1
await new Promise(r => {});
^

If it hangs instead of erroring, it should do it at 0% cpu usage not 100%

@cirospaciari cirospaciari changed the title 100% cpu usage waiting for a promise that will never resolve awaiting top level promise missing error/warn, causes 100% cpu usage waiting for a promise that will never resolve Nov 2, 2024
@cirospaciari cirospaciari changed the title awaiting top level promise missing error/warn, causes 100% cpu usage waiting for a promise that will never resolve awaiting top level promise that never resolves is missing an error/warn, causing 100% cpu usage Nov 2, 2024
@cirospaciari cirospaciari changed the title awaiting top level promise that never resolves is missing an error/warn, causing 100% cpu usage awaiting top level no-op promise that never resolves is missing an error/warn, causing 100% cpu usage Nov 2, 2024
@nektro nektro added bug Something isn't working runtime labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime
Projects
None yet
Development

No branches or pull requests

2 participants