got WICED_TLS_ERROR_RECORD_OVERFLOW with sdk 3.7.0

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

We are upgrading sdk from 3.5.2 to 3.7.0 for Adafruit Wiced Feather https://www.adafruit.com/product/3056​  (BCM43362) . But when trying to get 100KB from one of our test page http://adafruit-download.s3.amazonaws.com/text_100KB.txt we got WICED_TLS_ERROR_RECORD_OVERFLOW error from tls_get_next_record() called from wiced_tls_receive_packet() . On sdk 3.5.2 we could completely received all the data from the same url with CRC verification.

So Is there anyway that we could increase the number of TLS records to overcome this issue ?crossstudio_2016-08-17_17-29-07.png

0 Likes
6 Replies
Anonymous
Not applicable

There is a memory leak in the release of BESL that is included in binary form with version 3.7.0 of the wiced sdk. Only way to fix it is to patch in an older version of BESL into your SDK.

WICED/security/BESL is were it is located. The leak appears to be in the pre-compiled binary so pin pointing the leak is difficult but it's somewhere with in the library it's self.

When attempting to use any SSL/TLS based communication that relies on BESL will quickly crash the board as it runs out of heap memory.

Patch in an older version of BESL to latest SDK is wrong direction to do, then you lost SNI and other new improvements.

The correct way to fix it is to get official fix ASAP.

Anonymous
Not applicable

I agree patching with old version of BESL could cause more issues later since we don't know what's inside the lib file and moreover they are not tested together thoroughly. If Cypress/Broadcom didn't patch it with a beta lib, we should just stick with 3.5.2 for now.

0 Likes

This memory leak issue was reported for more than a month.

I was expecting a fix will be available quickly.

Unfortunately the fix is still not available, it forces people to use old sdk now.

WICED seems to use dynamic memory allocation very heavily, to its detriment.

Even in their host_rtos_create_thread, I don't think there is even an option provided to use statically allocated stacks for tasks.
There is a reason that NASA totally disallows dynamic memory in all their embedded code ...

Has anyone tried MALLOC_DEBUG with real code? And/or attacked this problem with a trace probe?

In the BESL archive files, it looks like there are only about 25 calls to malloc in one form or another, only 3 associated with tls_host_malloc. And the code for those is provided, just a wrapper around malloc_named or malloc.

0 Likes

Hi,

I got same WICED_TLS_ERROR_RECORD_OVERFLOW in 3.7.0 .

Anybody know, this error fixed in 3.7.7 sdk version or in  5.x ?

Darius

0 Likes