-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
alloc(16749 bytes) failed occasionally occurs when you upgrade using http (IDFGH-11730) #12838
Comments
Can you add a log printing the max free block size, please? |
Free heap space: 46400 byte |
Ask how much heap memory is needed to avoid this problem |
Hello @LHYYSY Thanks! |
Take a look. thank you very much |
Hello @LHYYSY |
I'm using routines to reproduce the problem, and I can't reproduce the problem,but I have both mqtt and http running at the same time, does it matter? |
Hello @LHYYSY Can you please log the largest free block in heap, you can use this API: https://github.com/espressif/esp-idf/blob/master/components/heap/heap_caps.c#L570 |
I used a task during the ota upgrade process to print "printf(" Free heap space: %ld byte free block %d\n", esp_get_free_heap_size(),heap_caps_get_largest_free_block(MALLOC_CAP_32BIT));” |
Hello @LHYYSY Can you update the code code to print the largest free block size such a way that we can get it just before the crash occurs. Also it will be helpful if you can share some application which can be used to reproduce this issue. |
Did you ever get a resolution for this issue? I see it was closed without being answered here. We are seeing the same thing. In our case, the mbedtls rx buffer allocation fails because the largest free block in the heap is not large enough. Here's a log snippet
So it's not a mystery for us why that allocation fails. What is a mystery is why we keep hitting this same error even if we free up other memory and increase our starting heap size. Any insight you can share? |
@rockys-spindance the logs are clear |
Answers checklist.
IDF version.
v5.1.1
Espressif SoC revision.
ESP32 C3
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C3-13
Power Supply used.
USB
What is the expected behavior?
Read the firmware normally using http.
What is the actual behavior?
E (1185926) Dynamic Impl: alloc(16749 bytes) failed
E (1185926) esp-tls-mbedtls: read error :-0x7F00:
E (1185926) transport_base: esp_tls_conn_read error, errno=Success
E (1185933) HTTP_CLIENT: transport_read: error - -1 | ESP_FAIL
I (1185941) native_esp_ota: current_dl_len:1657394,progress_tmp:90
E (1185966) Dynamic Impl: alloc(41913 bytes) failed
E (1185967) esp-tls-mbedtls: read error :-0x7F00:
E (1185967) transport_base: esp_tls_conn_read error, errno=Success
E (1185973) HTTP_CLIENT: transport_read: error - -1 | ESP_FAIL
E (1185980) native_esp_ota: Error: SSL data read error -1
Steps to reproduce.
...
Debug Logs.
More Information.
Occasionally triggering this error,
The text was updated successfully, but these errors were encountered: