-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
thread 'tokio-runtime-worker' has overflowed its stack #24325
Comments
I have bisected the releases and found that the last working release for me is In |
I have isolated the code causing the crash. I have attached a single file, called 1.43.5 works okay with this file:
1.43.6 crashes.
|
I have checked on linux/amd64 too. The behaviour is the same. It crashes on 1.43.6, but 1.43.5 works.
|
Hi @begoon, @dsherret, @bartlomieju I've spent some time debugging the recent stack overflow issue we encountered while running our Deno script. After thorough investigation, I couldn't pinpoint any recursive asynchronous operations causing the problem. Instead, it appears that the issue stemmed from insufficient stack memory, exacerbated by recent updates in Deno's behavior complexity. To address this, I explored increasing the stack memory allocation, which successfully resolved the issue on my WindowsPowerShell . Here's the command I used: $env:RUST_MIN_STACK=9999999999 ; for linux the equivalent command for environments would be |
and it worked when I tried it on Ubuntu without rust. |
Hello, my conclusion is that the issue is a memory issue, so what should we do? |
Hello! I looked into this and the cause is an overflow in Backtrace
The immediate cause (in your code) is the very large string concatenation
That effectively creates one big expression with thousands of subexpressions (each I'd recommend using escaped newlines or a template string instead of the string concatenation. Escaped newlines (note the backslash at the end of each line, and the fact that the following line is not indented): "AAEAAAASAQAABAAgR0RFRrRCsIIAAhNYAAACYkdQT1Or8IZpAAIVvAAAZS5H\
U1VCeoGFdwACeuwAABWQT1MvMpl2sdgAAgEYAAAAYGNtYXDG7lFtAAIGkAAA\
BoJjdnQgBg0uPQACEAgAAABaZnBnbYP7I6sAAg0UAAABvGdhc3AACAATAAIT\
TAAAAAxnbHlmVocNBQAAASwAAeEYaGRteI6hoLIAAgF4AAAFGGhlYWT9DdJS\
// etc
ADAAmACbADEA0ADQADUAAQABAEoAAQADAEoAVwCV" Or a template string, with a helper to strip out the newlines and leading whitespace const stripIndent = (s: string) => s.split("\n").map((l) => l.trimStart()).join("");
// later
stripIndent( `AAEAAAASAQAABAAgR0RFRrRCsIIAAhNYAAACYkdQT1Or8IZpAAIVvAAAZS5H
U1VCeoGFdwACeuwAABWQT1MvMpl2sdgAAgEYAAAAYGNtYXDG7lFtAAIGkAAA
BoJjdnQgBg0uPQACEAgAAABaZnBnbYP7I6sAAg0UAAABvGdhc3AACAATAAIT
TAAAAAxnbHlmVocNBQAAASwAAeEYaGRteI6hoLIAAgF4AAAFGGhlYWT9DdJS
ADAAmACbADEA0ADQADUAAQABAEoAAQADAEoAVwCV`)
|
Version: Deno 1.44.4
I have a complex CLI application to generate PDF's with pdfkit and a few extra libraries.
After the latest Deno update:
everything crashes no matter what with:
I'm puzzled about how to raise a bug report because I don't know how to supply a simple, reproducible test case.
Also, when I run this project AS IS but with Bun, it works as expected, with no crashes.
Any advice?
I have also realised that in the dockerfile, there is a version of Deno which I didn't upgrade. The application DOES work with that version:
I have downgraded my main CLI deno to 1.43.1, and... the crash is gone.
Something had been broken between 1.43.1 and 1.44.4.
The text was updated successfully, but these errors were encountered: