espressif / esp-wolfssl

WolfSSL port for ESP-IDF & ESP8266_RTOS_SDK
38 stars 13 forks source link

using sh2lib example with wolfssl is calling panic handler (IDFGH-3195) #5

Closed umer-ilyas closed 3 years ago

umer-ilyas commented 4 years ago

Environment

Problem Description

I (3770) example_connect: IPv4 address: 192.168.0.112                                                                                                                                                                                                                          I (3770) example_connect: IPv6 address: fe80:0000:0000:0000:4e11:aeff:fe6b:6460                                                                                                                                                                                                Connecting to server                                                                                                                                                                                                                                                           I (4120) wolfssl: wolfSSL Entering wolfSSL_Init                                                                                                                                                                                                                                I (4120) wolfssl: wolfSSL Entering wolfCrypt_Init                                                                                                                                                                                                                              I (4120) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4120) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4130) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4130) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4140) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4150) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4150) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4160) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4160) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4170) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4180) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4180) wolfssl: wolfSSL Entering EVP_get_cipherbyname                                                                                                                                                                                                                        I (4190) wolfssl: wolfSSL_RAND_seed                                                                                                                                                                                                                                            I (4200) wolfssl: wolfSSL Entering TLSv1_2_client_method_ex                                                                                                                                                                                                                    I (4200) wolfssl: wolfSSL Entering wolfSSL_CTX_new_ex                                                                                                                                                                                                                          I (4200) wolfssl: wolfSSL Entering wolfSSL_CertManagerNew                                                                                                                                                                                                                      I (4210) wolfssl: wolfSSL Leaving WOLFSSL_CTX_new, return 0                                                                                                                                                                                                                     priv_ssl 0I (4220) wolfssl: wolfSSL Entering wolfSSL_UseALPN                                                                                                                                                                                                                  E (4220) esp-tls-wolfssl: Use wolfSSL ALPN failed -173                                                                                                                                                                                                                         I (4230) wolfssl: wolfSSL Entering SSL_shutdown()                                                                                                                                                                                                                              I (4230) wolfssl: wolfSSL Entering SSL_free                                                                                                                                                                                                                                    I (4240) wolfssl: wolfSSL Leaving SSL_free, return 0                                                                                                                                                                                                                           I (4240) wolfssl: wolfSSL Entering SSL_CTX_free                                                                                                                                                                                                                                I (4250) wolfssl: CTX ref count down to 0, doing full free                                                                                                                                                                                                                     I (4260) wolfssl: wolfSSL Entering wolfSSL_CertManagerFree                                                                                                                                                                                                                     I (4260) wolfssl: wolfSSL Leaving SSL_CTX_free, return 0                                                                                                                                                                                                                       I (4270) wolfssl: wolfSSL Entering wolfSSL_Cleanup                                                                                                                                                                                                                             I (4270) wolfssl: wolfSSL Entering wolfSSL_RAND_Cleanup()                                                                                                                                                                                                                      I (4280) wolfssl: wolfSSL Entering wolfCrypt_Cleanup                                                                                                                                                                                                                           E (4290) esp-tls: create_ssl_handle failed                                                                                                                                                                                                                                     E (4290) esp-tls: Failed to open new connection                                                                                                                                                                                                                                I (4300) wolfssl: wolfSSL Entering SSL_shutdown()                                                                                                                                                                                                                              I (4300) wolfssl: wolfSSL Entering SSL_free                                                                                                                                                                                                                                    I (4310) wolfssl: wolfSSL Leaving SSL_free, return 0                                                                                                                                                                                                                           I (4310) wolfssl: wolfSSL Entering SSL_CTX_free                                                                                                                                                                                                                                F:/ESP-IDF-v4.1/esp-idf/components/freertos/queue.c:1447 (xQueueGenericReceive)- assert failed!                                                                                                                                                                                abort() was called at PC 0x40092be1 on core 1                                                                                                                                                                                                                                  0x40092be1: xQueueGenericReceive at F:/ESP-IDF-v4.1/esp-idf/components/freertos/queue.c:1447 (discriminator 1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ELF file SHA256: 2f7467423dd24cc6d24aff07c0027c7e459db7742b76939e63a0fb1c5b521425                                                                                                                                                                                                                                                                                                                                                                                                                                                                             Backtrace: 0x40087755:0x3ffcf7a0 0x40087ae9:0x3ffcf7c0 0x40092be1:0x3ffcf7e0 0x4015a032:0x3ffcf820 0x40165319:0x3ffcf840 0x40165355:0x3ffcf860 0x4013fbff:0x3ffcf880 0x40101eb9:0x3ffcf8a0 0x401020d7:0x3ffcf8c0 0x40101c19:0x3ffcf8e0 0x40101d45:0x3ffcf900 0x400d6742:0x3ffcf940 0x400d6471:0x3ffcf9d0 0x40092171:0x3ffcfa00                                                                                                                                                                                                                                0x40087755: invoke_abort at F:/ESP-IDF-v4.1/esp-idf/components/esp32/panic.c:157                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0x40087ae9: abort at F:/ESP-IDF-v4.1/esp-idf/components/esp32/panic.c:174                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0x40092be1: xQueueGenericReceive at F:/ESP-IDF-v4.1/esp-idf/components/freertos/queue.c:1447 (discriminator 1)                                                                                                                                                                                                                                                                                                                                                                                                                                                0x4015a032: wc_LockMutex at /builds/esp-components/esp-wolfssl/wolfssl/wolfcrypt/src/wc_port.c:835                                                                                                                                                                                                                                                                                                                                                                                                                                                            0x40165319: SSL_CTX_RefCount at /builds/esp-components/esp-wolfssl/wolfssl/src/internal.c:4827                                                                                                                                                                                                                                                                                                                                                                                                                                                                0x40165355: FreeSSL_Ctx at /builds/esp-components/esp-wolfssl/wolfssl/src/internal.c:1911                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0x4013fbff: wolfSSL_CTX_free at /builds/esp-components/esp-wolfssl/wolfssl/src/ssl.c:404                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0x40101eb9: esp_wolfssl_cleanup at F:/ESP-IDF-v4.1/esp-idf/components/esp-tls/esp_tls_wolfssl.c:209                                                                                                                                                                                                                                                                                                                                                                                                                                                           0x401020d7: esp_wolfssl_conn_delete at F:/ESP-IDF-v4.1/esp-idf/components/esp-tls/esp_tls_wolfssl.c:198                                                                                                                                                                                                                                                                                                                                                                                                                                                       0x40101c19: esp_tls_conn_delete at F:/ESP-IDF-v4.1/esp-idf/components/esp-tls/esp_tls.c:97                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0x40101d45: esp_tls_conn_http_new at F:/ESP-IDF-v4.1/esp-idf/components/esp-tls/esp_tls.c:405                                                                                                                                                                                                                                                                                                                                                                                                                                                                 0x400d6742: sh2lib_connect at f:\esp-idf-v4.1\http2_request\build/../components/sh2lib/sh2lib.c:246                                                                                                                                                                                                                                                                                                                                                                                                                                                           0x400d6471: http2_task at f:\esp-idf-v4.1\http2_request\build/../main/http2_request_example_main.c:105                                                                                                                                                                                                                                                                                                                                                                                                                                                        0x40092171: vPortTaskWrapper at F:/ESP-IDF-v4.1/esp-idf/components/freertos/port.c:143                                                                                                                                                                                                                                                                                    
mahavirj commented 4 years ago

I have transferred issue to esp-wolfssl project, we will update on this soon. (CC @AdityaHPatwardhan)

AdityaHPatwardhan commented 4 years ago

@umer-ilyas , can you provide more details such as sdkconfig file and debug log, If you have worked on the issue yourself you may mention that also. Thank you

mahavirj commented 3 years ago

@umer-ilyas Closing due to lack of response. Please feel free to reopen with more details.