-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED. #10
Comments
Getting the same error with Adafruit HUZZAH32 ESP32 Feather. Did you resolve this? The minimum code example is: /home/yourhomehere/.arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/AzureIoT/examples/SimpleMQTT/SimpleMQTT.ino from Microsoft. Add the Microsoft Azure liberies in the Arduino Library Manager to install. Depending on your connection and the setting for #define EVENT_TIMEOUT_MS 10000 in Esp32MQTTClient.cpp it will fail in 5 minutes. The TLS close does not seem to work. |
"tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED" is not a fatal error. it will close any existing connection |
@jpagliaccio sorry for the delay. In my case it ended up being caused my a memory leak. My best guess is that low memory was causing a socket allocation error (socket_async_is_create_complete failure). This message seems to point in the same direction as well. |
Robert thanks for the reply. This is whats happening while I look into the leak. I am using the ESP32, Arduino IDE, and the Microsoft demo code. Everything ruins fine but if I loose my signal or its slow to respond I get the crash below. I am able to recreate this. The code is the Azure IoT simple example in the Arduino IDE. Below is 3 good messages, then I move my WiFi router just out of range (you can pull the antennas or press the WiFi on/off button to simulate this) and then it tries to reconnect but there is the "Operating mode must not be set while SNTP client is running" Thanks for your help. Send Confirmation Callback finished. Send Confirmation Callback finished. Send Confirmation Callback finished. Info: >>>Re-connect. Info: >>>Confirmation[32] received for message tracking id = 32 with result = IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY Info: Initializing SNTP assertion "Operating mode must not be set while SNTP client is running" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/apps/sntp/sntp.c", line 591, function: sntp_setoperatingmode Backtrace: 0x4008fac0:0x3ffb1d10 0x4008fcc3:0x3ffb1d30 0x400e3bbb:0x3ffb1d50 0x4011997d:0x3ffb1d80 0x400d3bfe:0x3ffb1da0 0x400d3f5e:0x3ffb1dc0 0x400d3406:0x3ffb1de0 0x400d373a:0x3ffb1e20 0x400d38a1:0x3ffb1e40 0x400d2787:0x3ffb1e60 0x40148594:0x3ffb1fa0 Rebooting... rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
Info: SNTP initialization complete Info: IoT Hub SDK for C, version 1.1.23 Info: >>>Connection status: connected {"deviceId":"Esp32Device", "messageId":1, "Temperature":29.000000, "Humidity":46.599998} Send Confirmation Callback finished. Send Confirmation Callback finished. Send Confirmation Callback finished. Send Confirmation Callback finished. |
ESP IDF Version: v3.2-dev-362-g1c7a8b3
esp-azure: latest
Issue:
I am working on a project that involves sending sensor information to Azure over MQTT. Messages are being sent once a minute, and device runs up to days at a time. I am using a modified version of the code found in
iothub_client_sample_mqtt.c
to send the messages.Currently, after 3-4 hours of the device running I get the following error:
tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED.
Sometime the device locks up as well.
Otherwise the MQTT code runs well and seems to recover from loss of connectivity in my testing.
Log:
I get the following log error after sending a message using IoTHubClient_LL_SendEventAsync:
I haven't yet created a minimal code example that runs into this issue. If it is something that would be helpful let me know.
The text was updated successfully, but these errors were encountered: