Page 1 of 1

Stack overflow when using Aliyun SDK MQTT (SSL/TLS)

Posted: Tue Apr 03, 2018 2:45 pm
by xiangcheng
Hi, when i run aliyun's demo code on my ESP32 device, it runs well. But when I ingetrate it with my application code - including u8g2 lib, smartconfig, sensors etc, it will be overflow. How to fix it? Should I reduce/save RAM in my application? Any suggestion is welcome.
cert. version : 3
serial number : 04:00:00:00:00:01:15:4B:5A:C3:94
issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
issued on : 1998-09-01 12:00:00
expires on : 2028-01-28 12:00:00
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
[inf] _ssl_parse_crt(135): crt content:451
cert. version : 3
serial number : 04:00:00:00:00:01:15:4B:5A:C3:94
[inf] _ssl_client_init(175): ok (0 skipped)
issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
[inf] TLSConnectNetwork(345): Connecting to /nvlZfv4YEYQ.iot-as-mqtt.cn-shanghai.aliyuncs.com/1883...
subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
issued on : 1998-09-01 12:00:00
expires on : 2028-01-28 12:00:00
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
[inf] TLSConnectNetwork(350): ok
[inf] TLSConnectNetwork(355): . Setting up the SSL/TLS structure...
[inf] _ssl_parse_crt(135): crt content:451
[inf] TLSConnectNetwork(365): ok
[inf] TLSConnectNetwork(400): Performing the SSL/TLS handshake...
[inf] _ssl_client_init(175): ok (0 skipped)
[inf] TLSConnectNetwork(345): Connecting to /nvlZfv4YEYQ.iot-as-mqtt.cn-shanghai.aliyuncs.com/1883...
[inf] TLSConnectNetwork(350): ok
[inf] TLSConnectNetwork(355): . Setting up the SSL/TLS structure...
[inf] TLSConnectNetwork(365): ok
[inf] TLSConnectNetwork(400): Performing the SSL/TLS handshake...
***ERROR*** A stack overflow in task eventTask has been detected.
abort() was called at PC 0x40088ab8 on core 0

Re: Stack overflow when using Aliyun SDK MQTT (SSL/TLS)

Posted: Tue Apr 03, 2018 2:49 pm
by xiangcheng
For Aliyun MQTT task, i use default(as demo shows) 8K stack size. How to check stack available size in ESP32?

Re: Stack overflow when using Aliyun SDK MQTT (SSL/TLS)

Posted: Tue Apr 03, 2018 5:57 pm
by fly135
printf("Stack free: %d\r\n", uxTaskGetStackHighWaterMark( NULL ));

Re: Stack overflow when using Aliyun SDK MQTT (SSL/TLS)

Posted: Wed Apr 04, 2018 3:12 am
by xiangcheng
Thanks. I don't like Aliyun OS SDK and its MQTT...