Closed blue-freedom-technologies closed 11 months ago
This could be anything. For example, it could be that the crate you are trying to use uses so much RAM, that the measly 300K that you have on the c6 are not enough.
What could help me a bit if you spend a little more time with the subxt_signer
crate. As in fork it, clone it and then put some tracing to figure out where it crashes, and whether this is a heap out of memory, or stack too smal (the main task runs with a 4K of stack only!) or something else.
Hi,
The line of code-> "let uri = SecretUri::from_str(DEVICE_ACCOUNT_SEEDS).expect("valid URI");"
The gdb-multiarch view
It blows up exactly in here
Cheers,
Of course it blows up on let uri = SecretUri::from_str(DEVICE_ACCOUNT_SEEDS).expect("valid URI");
. That's the only line referring to that 3rd party crate you have problems using.
Again, the question is a bit: does it blow because of heap mem or stack mem blowup?
Since it is using BTreeMap
internally - likely heap mem.
You need to kind of learn this crate a bit and then start modifying it to figure out from where the large heap memory usage is coming. Gdb is unlikely to help. Rather, reading the code, commenting bits and pieces of it and the re-compiling and re-flashing.
To mitigate (at least partially) the hypothesis of a stack blowup, you can spawn that line in a separate thread using Rust's ThreadBuilder
and then assign to that other thread something like 80K stack or so.
You can by the way do the exact same excercise on the host (x86/64) machine in a little example program and then limit there the stack size of the spawned thread to see what is the minimum stack size the line from above needs to execute.
Hi,
Thank you for your guidance the issue was fixed.
Cheers,
Hi,
Thank you for your guidance the issue was fixed.
Cheers,
It is always nice if you give something more of a background around an answer like "issue was fixed" for other people if they ever come to a similar problem.
Hi, Thank you for your guidance the issue was fixed. Cheers,
It is always nice if you give something more of a background around an answer like "issue was fixed" for other people if they ever come to a similar problem.
We wrap-up the code around a thread with 32K.
Cheers,
IDF version.
v5.1-beta1-378-gea5e0ff298
Espressif SoC revision.
ESP32 -C6 (Revision v1.1)
Operating System used.
Linux
How did you build your project?
Other (please specify in More Information)
If you are using Windows, please specify command line type.
None
Development Kit.
esp32-c6-devkitc-1
Power Supply used.
USB
What is the expected behavior?
I expect to be able to use this subxt_signer crate.
What is the actual behavior?
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
Steps to reproduce.
I am trying to use this subxt_signer crate.
Debug Logs.