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 #331

Closed
2 tasks done
jonmmease opened this issue Sep 9, 2023 · 11 comments · Fixed by #336
Closed
2 tasks done

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

jonmmease opened this issue Sep 9, 2023 · 11 comments · Fixed by #336
Labels
🐞 bug Something isn't working

Comments

@jonmmease
Copy link
Contributor

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

It's been a few days since I last updated a package with pixi for the VegaFusion repository, but when I tried it today I started getting this error.

Check out VegaFusion repo, then attempt to update rust to 1.72.0:

pixi add rust=1.72.0
jonmmease@Hex-Jon-Mease vegafusion % pixi add rust=1.72.0
⠒ fetching latest repodata
  ✔ conda-forge/osx-arm6 [00:00:00] Using cache
    conda-forge/osx-64   [00:00:02] [────────────────────]      0 B @ 0 B/s   
    conda-forge/linux-64 [00:00:02] [────────────────────]      0 B @ 0 B/s   
    conda-forge/win-64   [00:00:02] [━━━━━───────────────] 4.23 MiB @ 1.50 MiB/s
  ✔ conda-forge/noarch   [00:00:00] Using cache                                                                                                                           
thread 'tokio-runtime-worker' has overflowed its stack
fatal runtime error: stack overflow
zsh: abort      pixi add rust=1.72.0

It always happens when the conda-forge/win-64 bar get's to about 25%. I wonder if there's something that's changed about the conda-forge windows repo metadata recently.

This is on an Apple M1 Pro with macOS 13.5.2 (22G91)

Issue description

above

Expected behavior

No crash

@jonmmease jonmmease added the 🐞 bug Something isn't working label Sep 9, 2023
@baszalmstra
Copy link
Contributor

Thanks for the report! I will take a look at this asap!

@baszalmstra
Copy link
Contributor

baszalmstra commented Sep 11, 2023

I traced the issue to the json_patch crate that rattler uses to apply JLAP patches when fetching repodata. The crate uses a lot of recursion which leads to this issue.

I created a PR in the crate to hopefully fix the issue:

idubrov/json-patch#28

@jonmmease
Copy link
Contributor Author

Thanks for digging into this and making the upstream fix. Depending on the timeline for json-patch to accept the PR and release an update, I also wanted to point out that it's possible to increase the tokio thread stack size in case we need that as a band-aid in the meantime. See:

https://github.com/hex-inc/vegafusion/blob/2ed4925ec536531d9bb344dab2f017405433265c/vegafusion-runtime/src/tokio_runtime.rs#L9

@tony-p
Copy link

tony-p commented Sep 11, 2023

@jonmmease A temporary fix for some of us also seems to be clearing the cache.

So pixi info and remove the given cache directory

@jonmmease
Copy link
Contributor Author

Clearing the cache got me unblocked. Thanks!

@baszalmstra
Copy link
Contributor

pixi 0.3.0 which will be released very soon includes the json-patch fix.

@vsoch
Copy link

vsoch commented Jan 26, 2024

I'm not sure if this is the same thing, but this error starting appearing in my container build just now:

image

Apologies for the screen shot, I can't copy the text with buildx running! I wound up needing to reinstall pixi, but then it didn't like this block:

[system-requirements]
unix = true

I tried changing to linux = true per the instruction, it wanted a string (wasn't sure what) so I deleted it entirely, and that seems to be building.

@wolfv
Copy link
Member

wolfv commented Jan 26, 2024

Hmm your error looks more like a network (or disc space?) issue, unfortunately. Could that be?

@vsoch
Copy link

vsoch commented Jan 26, 2024

I don't think so - I tried it 3-4 times and it reproduced, and it fixed when I re-installed pixi in the container. For context, this was a previous built (the environment was ready to go) and I was updating the environment.

@ruben-arts
Copy link
Contributor

We removed unix from the system requirements.

@vsoch
Copy link

vsoch commented Jan 26, 2024

We removed unix from the system requirements.

Ha, yes I grepped that 😉

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

Successfully merging a pull request may close this issue.

6 participants