begoon
begoon4w ago

thread 'tokio-runtime-worker' has overflowed its stack

I have a complex CLI application to generate PDF's with pdfkit and a few extra libraries. After the latest Deno update
deno --version deno 1.44.4 (release, aarch64-apple-darwin) v8 12.6.228.9 typescript 5.4.5
everything crashes no matter what with:
cd src/pdf && \ deno run -A --watch \ pdf-cli.ts Watcher Process started. thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow
I'm puzzled how to raise a bug report because I don't know how supply a simple reproducible test case. Also, when I run this project AS IS but with bun, it works as expected. No crashes. Any advice?
5 Replies
begoon
begoon4w ago
I have just realised that in the dockerfile, there is a version of deno which I didn't upgrade. The application DOES work with that version: deno --version deno 1.43.1 (release, aarch64-apple-darwin) v8 12.4.254.12 typescript 5.4.3 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.
begoon
begoon4w ago
GitHub
thread 'tokio-runtime-worker' has overflowed its stack · Issue #243...
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: deno --version deno 1.44.4 (release, aarch64-apple-d...
begoon
begoon4w ago
I have bisected the releases and found that the last working release for me is 1.43.5. In 1.43.6, the application starts crashing because of the error above.
Deno AI Helper
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like you're encountering a stack overflow error within the Tokio runtime, which is an asynchronous runtime used by Deno. The error message "thread 'tokio-runtime-worker' has overflowed its stack" suggests that there might be a deep recursion or an infinite loop within your code or one of the libraries you are using that is causing the stack to overflow. This could potentially be related to the latest Deno update you mentioned, but without a reproducible test case, it's difficult to pinpoint the exact cause. Since you mentioned that the project works with Bun, it's possible that the issue is specific to how Deno's runtime is handling your code. Here are a few general suggestions that might help you troubleshoot the issue: 1. Review recent changes in your codebase that could have introduced deep recursion or an infinite loop. 2. Check if any of the libraries you are using have known issues with the latest version of Deno. 3. Try to isolate the part of your code that is causing the stack overflow by commenting out sections and gradually reintroducing them. Please note that this advice is not based on the Deno documentation, and I recommend double-checking the accuracy of the advice given. If you're unable to resolve the issue, consider raising a bug report with Deno. When doing so, try to provide as much information as possible, even if you can't supply a simple reproducible test case. Include details about your environment, the Deno version, and the error message. If you can narrow down the code that's causing the issue, even if it's not a minimal example, it could still be helpful for the Deno team to investigate the
More Posts
Plain javascript in .js files in vscodeHow can I have DOM suggestions in .js files, while having Deno suggestions in .ts files?BadCertificate error using deno 1.25.4Hello, I am facing an error in my deno + node js app. I cannot figure out how why it is happening. T'React' refers to a UMD global, but the current file is a module.I am using Deno with the GitHub Actions, and my `linting` is getting passed but I don't know what isCan I transpile TypeScript Code to JavaScript Code with Deno like BunHey I have 10/15 typescript files. SO can i transpile it into javascript code?Passing props to component from layoutI'm trying to pass some client side data from layout to route component, how do I pass this in? I trParsing Typescript with deno_core and deno_ast fails on type annotationsHey all, i'm trying to embed deno into my app so that users can write config file in typescript. Iintercept an op rust-side and call the original fnHi, i'm using `deno_core` and some exts embedded in a desktop application, and am trying to replace Why Deno runtime is differently when running locally or through Deno Cloud?FYI: I did already post into the [deploy feedback](https://github.com/denoland/deploy_feedback/issueDeno JSR API package + CLI entrypoint "best-practices"Hey 👋 I have a package that is both a CLI and provides a JS API. Previously with `deno.land/x`, thFormatting with VSCode adds a tab instead of 2 spacesHi, I'm experiencing a weird behavior in VSCode. I'm formatting a new Typescript file however it add