Comments (3)
I wouldn't personally write it is due to the sdkconfig but rather that a workaround is to edit the sdkconfig.
I believe it is a deeper bug.
from atomvm.
I wouldn't personally write it is due to the sdkconfig but rather that a workaround is to edit the sdkconfig.
I believe it is a deeper bug.
agreed, updated issue.
from atomvm.
The crash happens inside esp-idf when calling esp_wifi_init()
, and it can be reproduced enabling CONFIG_COMPILER_OPTIMIZATION_PERF=y
.
It can be fixed setting as default pthread stack size (that is 3072) to the same used for main task, such as CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3584
, but even a smaller value works (such as 3200
).
I think that esp_wifi_init()
in most firmwares around is called from main, so likely it has been tested mostly with 3584 bytes stack.
I have 2 hypothesis about this bug:
- enabling optimizations slightly increases stack usage (such as gcc using different memory layout for stack frames, etc...)
- increased execution speed causes a different scheduling order, that makes the network initialization running on the pthread rather than the main task
I suggest changing stack size for any created scheduler thread in order to match the same stack size used to main, so behavior is consistent independently from which scheduler has been used.
Changing sdkconfig works too, but I don't think that increasing the default size for all threads is the right thing to do.
from atomvm.
Related Issues (20)
- ESP: AES_192 ciphers only supported on esp32 and S2
- ESP32-C3 printout of #Ref seems wrong HOT 7
- valgrind warning in `sslcontext_dtor` when running `./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm` on CI
- Comparison between funs differs from BEAM behavior
- ESP32-H2 Support HOT 2
- rp2040 build steps HOT 2
- Align Peripheral call semantics between platforms. HOT 4
- OTP ssl default is `{active, true}` but our has a different default
- Warnings and errors related to ssl and crypto HOT 1
- Add testing for Elixir modules
- Elixir modules should be included in the on-line documentation
- Different behavior than OTP `ssl:recv`
- Trapped processes are not removed from running list
- ESP32 Console driver lacks input support HOT 1
- Implement `lists:keytake/3`
- Provide a minimal NIF example for the generic_unix target
- Possibility of running GenServers in the browser HOT 2
- ESP: building with v4.4 and v5.0 seem to be failed HOT 2
- suggestion: delete platform dependent `README.*.Md` HOT 1
- Network driver in AP mode should support DNS name resolution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomvm.