Closed yunhui0501 closed 7 months ago
if (rc == MQTT_CODE_CONTINUE && mms_stat->read > MQTT_MSG_WAIT) { wm_SemUnlock(&client->lockRecv); //在这里增加,但是仍然有问题 return rc; }
新的问题就是 :在
/* if nonblocking and some data has been read, do not release read lock */
if (rc == MQTT_CODE_CONTINUE && mms_stat->read > MQTT_MSG_WAIT)
会产生下面这个错误 Error: Error (Out of buffer)
Hello @yunhui0501
Thanks for contacting wolfSSL Support. Could you please share some more details about this issue? Please enable debug logging by defining WOLFMQTT_DEBUG_TRACE
and WOLFMQTT_DEBUG_CLIENT
and share the log as a file.
Is this reproducible using the non-blocking client example? If not, please share the application code.
If you would prefer to keep these details private, please open a support ticket by emailing support@wolfssl.com
Kind regards, Eric - wolfSSL Support
Hello @embhorn Thank you for your reply.
The usage scenario where this abnormal situation occurs: the packet size of both publishing and subscribing messages reaches 100K, with continuous production and consumption information, and the generation of deadlocks is random.
Please refer to the attachment for the location of the code deadlock.
Hi @yunhui0501
I do not see the attachment you are referring to. Please also share the debug logs I requested.
Also, are you using the latest version of the library?
Hello @embhorn #define LIBWOLFMQTT_VERSION_STRING "1.13.0"
@yunhui0501
You should definitely update to the latest release. There have been some significant improvements in the non-blocking feature.
@embhorn Thank you very much for your suggestion. I have switched to the latest version v1.17.1 and it is currently running very well.
Excellent! I will go ahead and close out this support inquiry. If any other questions come up please do not hesitate to open a new issue anytime by emailing support@wolfssl.com or through the zendesk portal at https://wolfssl.zendesk.com/. We are always happy to help out in any way we can.
Until next time all the best and thank you for using wolfSSL support.
Warmest Regards,
在MqttClient_WaitType的这个函数中 case MQTT_MSG_BEGIN: 这个分支中 执行: rc = wm_SemLock(&client->lockRecv); 后面没有执行 wm_SemUnlock(&client->lockRecv); 导致卡住。
MqttClient_WaitType有几个地方直接返回了, 但是并没有执行wm_SemUnlock(&client->lockRecv);
大家是碰到这样的问题没有,如何解决的 ?