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

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

Open
begoon opened this issue Jun 24, 2024 · 4 comments
Open

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

begoon opened this issue Jun 24, 2024 · 4 comments
Labels
bug Something isn't working correctly cli related to cli/ dir

Comments

@begoon
Copy link

begoon commented Jun 24, 2024

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-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 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:

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
Copy link
Author

begoon commented Jun 24, 2024

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.

@satyarohith satyarohith added bug Something isn't working correctly cli related to cli/ dir labels Jun 25, 2024
@yazan-abdalrahman
Copy link

Hello, can you explain how I can re-produce this bug?

What's the script in pdf-cli.ts?
image

@begoon
Copy link
Author

begoon commented Jun 25, 2024

I have isolated the code causing the crash.

I have attached a single file, called crash.ts.

1.43.5 works okay with this file:

// deno upgrade --version 1.43.5
Downloading https://github.com/denoland/deno/releases/download/v1.43.5/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.43.5
Archive:  /var/folders/yt/48q9hkh95x7fg1ps8sr95wd40000gn/T/.tmpV6kgiH/deno.zip
  inflating: deno                    
Upgraded successfully

// deno run -A src/pdf/crash.ts 

Warning Sloppy imports are not recommended and have a negative impact on performance.

1.43.6 crashes.

// deno upgrade --version 1.43.6
Downloading https://github.com/denoland/deno/releases/download/v1.43.6/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.43.6
Archive:  /var/folders/yt/48q9hkh95x7fg1ps8sr95wd40000gn/T/.tmpi9CFkS/deno.zip
  inflating: deno                    
Upgraded successfully

// deno run -A src/pdf/crash.ts 
Warning Sloppy imports are not recommended and have a negative impact on performance.

thread 'tokio-runtime-worker' has overflowed its stack
fatal runtime error: stack overflow
zsh: abort      deno run -A src/pdf/crash.ts

crash.ts is attached.
crash.zip

@begoon
Copy link
Author

begoon commented Jun 25, 2024

I have checked on linux/amd64 too. The behaviour is the same. It crashes on 1.43.6, but 1.43.5 works.

deno --version
deno 1.43.6 (release, x86_64-unknown-linux-gnu)
v8 12.4.254.13
typescript 5.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir
Projects
None yet
Development

No branches or pull requests

3 participants