-
Notifications
You must be signed in to change notification settings - Fork 839
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
How to set task-arena-size for ESP #3611
Comments
the espressif xtenssa rust fork does have nightly features enabled, so you should be able to enable the
it's documented here https://docs.embassy.dev/embassy-executor/git/cortex-m/index.html#task-arena
it has to be larger than the sum of sizes for the executor. It's a bit hard to know that, so in practice the easiest is if you got panics then just bump it up. 393kb is a lot though. Maybe it's not taking effect for some reason? If you're using You can check with |
Hi Dario, Thanks for the quick reply. I appreciate the help!
The program runs perfectly after changing the feature flag from a
You are absolutely right. I wasn't clear. I meant to say: setting the value via feature flag or environment variable is well-documented, but determining the appropriate value is not. It sounds like it is more art than science so trial-and-error or using nightly features is the way to go.
I tried setting the value both by feature flag and by environment variable. I don't know the internals of the executor to check if the flag is set, however, I did try setting two different arena sizes via feature flags and I got the expected compile error. I checked cargo tree and the two instances of the executor are using the same version.
My problem is fixed with the nightly flag, but let me know if you want me to check anything else or share the code. I am happy to help trouble shoot this for anyone else who may run into it in the future. |
FWIW the way to specify the arena size should just work as usual, but I don't know if the S3 has a contiguous memory area big enough for the 393k - it has enough total memory, but with some holes in it, I believe. You didn't specify what panics you got after setting it, so it looks like it's still the "arena is full" error, but it sounds somewhat implausible. |
I am running into an issue in which I seemingly cannot set a large enough task arena for a very simple app. Because I am writing code for the ESP32s3, I have to use channel= "esp" and presumably cannot use "nightly" to benefit from compiler-set arena sizing.
My code is very simple, it establishes a wifi connection using the example code is esp-hal and then makes a web request using reqwless in the main function. When the function call to make the web request is included and called in my main function, I get the error:
embassy-executor: task arena is full. You must increase the arena size, see the documentation for details: https://docs.embassy.dev/embassy-executor/
. After setting the arena size as high as 393216 using the cargo.toml feature flag, I am still getting panics.The docs do not provide guidance on how to set the arena size. What does the arena size relate to? How does one determine what is an appropriate size? Any idea why I am getting these panics at what I assume is a large arena size for a simple application?
Thanks for the help!
The text was updated successfully, but these errors were encountered: