You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Seeing a crash when sending large chunks of data > 1MB
To Reproduce
Send large chunk of data using MQTTClient.c instead of async mode. Get this backtrace
#0 0x0000000000000000 in ?? () #1 0x0000000000475eac in Socket_continueWrites (sock=0x7fc48969d4,
mutex=0x5ae5b0 <socket_mutex_store>)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/Socket.c:1412 #2 0x000000000047443c in Socket_getReadySocket (more_work=0, timeout=100,
mutex=0x5ae5b0 <socket_mutex_store>, rc=0x7fc4896a64)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/Socket.c:535 #3 0x0000000000468fc4 in MQTTClient_cycle (sock=0x7fc4896a60, timeout=100,
rc=0x7fc4896a64)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2558 #4 0x0000000000469dcc in MQTTClient_yield ()
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2828 #5 0x00000000004689e0 in MQTTClient_publish5 (handle=0x2d2c9308,
topicName=0x7fc4896cd0 "bas-d-s/stb/6B8B4567327B23C6/transfer/response/download/CMH2BG9FTEK4NTFB", payloadlen=1051350, payload=0x7f7dcfd010, qos=1,
retained=0, properties=0x7fc4896cb8, deliveryToken=0x7fc4896c8c)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2429 #6 0x0000000000468d44 in MQTTClient_publishMessage5 (handle=0x2d2c9308,
topicName=0x7fc4896cd0 "bas-d-s/stb/6B8B4567327B23C6/transfer/response/download/CMH2BG9FTEK4NTFB", message=0x7fc4896c90, deliveryToken=0x7fc4896c8c)
--Type for more, q to quit, c to continue without paging--
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2500
It seems MQTTAsync.c has a implementation for Socket_setWriteContinueCallback, but MQTTClient.c does not. So when sending large data over MQTTClient, this line crashes
int Socket_continueWrites(SOCKET* sock, mutex_type mutex)
{
...
if (rc == 0)
(*writecontinue)(socket);
...
}
Did not observe this crash in 1.3.10
Expected behavior
Not crash
Screenshots
If applicable, add screenshots to help explain your problem.
Log files
Please try to attach log files rather than pasting the log contents. It makes the issues easier to read.
** Environment (please complete the following information):**
OS: Linux
Version 1.3.11
The text was updated successfully, but these errors were encountered:
icraggs
changed the title
MQTTClient missing implementation to writecomplete
MQTTClient missing implementation to writecontinue
Nov 27, 2022
Describe the bug
Seeing a crash when sending large chunks of data > 1MB
To Reproduce
Send large chunk of data using MQTTClient.c instead of async mode. Get this backtrace
#0 0x0000000000000000 in ?? ()
#1 0x0000000000475eac in Socket_continueWrites (sock=0x7fc48969d4,
mutex=0x5ae5b0 <socket_mutex_store>)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/Socket.c:1412
#2 0x000000000047443c in Socket_getReadySocket (more_work=0, timeout=100,
mutex=0x5ae5b0 <socket_mutex_store>, rc=0x7fc4896a64)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/Socket.c:535
#3 0x0000000000468fc4 in MQTTClient_cycle (sock=0x7fc4896a60, timeout=100,
rc=0x7fc4896a64)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2558
#4 0x0000000000469dcc in MQTTClient_yield ()
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2828
#5 0x00000000004689e0 in MQTTClient_publish5 (handle=0x2d2c9308,
topicName=0x7fc4896cd0 "bas-d-s/stb/6B8B4567327B23C6/transfer/response/download/CMH2BG9FTEK4NTFB", payloadlen=1051350, payload=0x7f7dcfd010, qos=1,
retained=0, properties=0x7fc4896cb8, deliveryToken=0x7fc4896c8c)
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2429
#6 0x0000000000468d44 in MQTTClient_publishMessage5 (handle=0x2d2c9308,
topicName=0x7fc4896cd0 "bas-d-s/stb/6B8B4567327B23C6/transfer/response/download/CMH2BG9FTEK4NTFB", message=0x7fc4896c90, deliveryToken=0x7fc4896c8c)
--Type for more, q to quit, c to continue without paging--
at /local/users/dliu/basd3/out.example/_deps/paho-src/src/MQTTClient.c:2500
It seems MQTTAsync.c has a implementation for Socket_setWriteContinueCallback, but MQTTClient.c does not. So when sending large data over MQTTClient, this line crashes
int Socket_continueWrites(SOCKET* sock, mutex_type mutex)
{
...
if (rc == 0)
(*writecontinue)(socket);
...
}
Did not observe this crash in 1.3.10
Expected behavior
Not crash
Screenshots
If applicable, add screenshots to help explain your problem.
Log files
Please try to attach log files rather than pasting the log contents. It makes the issues easier to read.
** Environment (please complete the following information):**
The text was updated successfully, but these errors were encountered: