【Feedback】SSL Memory leak on NONOS 1.5.3 / 1.5.4

sergione76
Posts: 2
Joined: Thu Jul 14, 2016 6:19 pm

【Feedback】SSL Memory leak on NONOS 1.5.3 / 1.5.4

Postby sergione76 » Thu Jul 14, 2016 8:32 pm

test_lib.tar
(10 KiB) Downloaded 199 times
Hi,
I've verified with the attached code that when a SSL handshake error occurs, a memory leak is generated
Moreover espconn_reconnect_callback is not called signaling ESPCONN_HANDSHAKE - TCP SSL handshake fails.
The code try to connect to a server every 10 seconds and every time SSL fails heap decrease of about 1952 bytes

The heap size in the output is printed by a timer in the user_main.
Have you ave any ideas?
Thanks
Regards

Sergio

Code: Select all


***Free heap=32072 ***
***Free heap=32072 ***
***Free heap=32072 ***
pm open,type:2 0
***Free heap=32072 ***
***Free heap=32072 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=30088 ***
***Free heap=30088 ***
***Free heap=30088 ***
***Free heap=30088 ***
***Free heap=30088 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
***Free heap=20160 ***
***Free heap=20160 ***
***Free heap=20224 ***
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=28136 ***
***Free heap=28136 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=26184 ***
***Free heap=26184 ***
***Free heap=26184 ***
***Free heap=26184 ***
***Free heap=26184 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***Free heap=24232 ***
***timerConnect***
TCP: Connect to ip  XXX.XXX.XXX.XXX:4343
certificate.cer 30d
private_key.key 260
client handshake start.
client handshake failed
Error: SSL error 44
Disconnected
***Free heap=22280 ***

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: SSL Memory leak on NONOS 1.5.3 / 1.5.4

Postby ESP_Rubin » Fri Jul 15, 2016 12:12 pm

Hi,
Have you tried our sample code?
Indefault, our sample code will tracking the free head of the system

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】SSL Memory leak on NONOS 1.5.3 / 1.5.4

Postby ESP_Rubin » Fri Jul 15, 2016 1:30 pm

you can refer to:http://bbs.espressif.com/viewtopic.php?f=31&t=1564

sergione76
Posts: 2
Joined: Thu Jul 14, 2016 6:19 pm

Re: 【Feedback】SSL Memory leak on NONOS 1.5.3 / 1.5.4

Postby sergione76 » Fri Jul 15, 2016 9:06 pm

Hi,
I don't use RTOS SDK but NONOS SDK
Thanks

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】SSL Memory leak on NONOS 1.5.3 / 1.5.4

Postby ESP_Rubin » Mon Jul 25, 2016 10:11 am

NONOS reference code as link:http://bbs.espressif.com/viewtopic.php?f=31&t=389

Who is online

Users browsing this forum: No registered users and 2 guests