libblepp icon indicating copy to clipboard operation
libblepp copied to clipboard

Low-level I/O connect system call failed by Memory allocation failure.

Open mingshi2807 opened this issue 4 years ago • 0 comments

Hello there,

We have tested several BLE IMU sensors of MbientLab in which libblepp is wrapped in driver level, during these tests, we have encountered systematically one low level I/O problem after about 10-15 min :

  • In BLE driver level, one system call of socket connect() is failed by a memory allocation issue.
  • Then, getaddrinfo() function is failed indeed, then the error exception handler of netdb.h and socket_ops.ipp is triggered by this what() : Cannot allocate memory.
  • Which corresponds # define EAI_MEMORY -10 /* Memory allocation failure. */ in netdb.h and
  • no_memory in socket_ops.ipp

Please find below the trace error when the exception is triggered :

error 1591608658.880516: Error on line: 296 (src/blestatemachine.cc): Cannot allocate memory
terminate called after throwing an instance of 'BLEPP::SocketConnectFailed'
what():  Cannot allocate memory
2020-06-08 11:30:58 sigHandler: Unhandled signal 6, terminating

This issue became more frequent and significant in these cases below :

  • with increasing number of sensors, in our case : 15 sensors.
  • put the sensors on the human body instead of test bench

In this context, we would be very grateful if you could perhaps give some help of debugging or responses about this question.

Best regards, Ming

mingshi2807 avatar Aug 11 '20 12:08 mingshi2807