Tool/software: Code Composer Studio
Hi Team,
I found SL_DEVICE_EVENT_FATAL_DRIVER_ABORT issue with my code. I would like to ask for analysing captured NWP log, whether there is any clue.
I have relatively complex code. One part of this code is a http 1.1 server running at application processor (for max. three simultaneously connected clients at TCP port 81). I found a issue with fatal driver abort in case I receive large POST request but I don't read all incoming data from sokcet (that mean some RX data will be still at receive buffers inside NWP). It does not look like a buffer overflow or stack issue inside my code. After driver abort is my code still running and ROV does not signalise any issue.
In NWP log attached below you find data which begins at device reset and ends 2-3 sec after driver abort is reported by asynchronous handler.
Important sl_ API call before driver abort is returned:
- TCP socket with www browser is already opened. I use http 1.1 server, from this reason can be TCP connection still opened between POST/GET requests.
- WWW browser sends http POST request with size approximately 14kB (Content-Length: 13632, as shown at Wireshark log below)
- By calling non-blocking sl_Recv() API I read beginning data from POST request. It is about 1-1.5kB. Enough to be found "Content-Length" and determined value of rest of content.
- From content "Content-Length" I determine that I haven't enough space inside my internal buffers (I have 10k buffers).
- From this reason I don't read rest of incoming data (rest of content).
- I send back http response 400 back by sl_Send() API (to notify browser what request was not proceeded).
- After that there is 50ms sleep (some other task will do some other stuff, maybe some sl_ API call could be there).
- Abort asynchronous handler is triggered.
- All consequent sl_ API calls (sl_Recv(), sl_Close()) does returns SL_API_ABORTED (-2005L). This is expected because abort handler was triggered before.
Device information:
- CC3220SF LaunchPad
- SDK version: 3.30.01.02
- ServicePack: 3.13.0.3
NWP log:
Wireshark (only problematic "log" POST which caused fault):
Thank you for advice.
Regards,
Jan