Closed billpriest closed 2 weeks ago
This is considered a data racing bug. Trying to unlock a pipe Somehow which is already being finit. Recently We pushed some fixes to 0.22.5 regarding the similar case. Could you try both 0.22.5 and previous 0.21.10 to verify the bug scope?
continue conversation in #1879
Describe the bug While running nanomq v0.22.2-4 on arm64 platform a log of an error indicating a bug.
Expected behavior No bug message.
Actual Behavior 2024-08-12 17:41:41 [956] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:964 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: recv_error rv: 139
2024-08-12 17:49:56 [955] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:680 tcptran_pipe_recv_cb: nni aio recv error!! Connection shutdown
2024-08-12 17:49:56 [955] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:964 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: recv_error rv: 139
2024-08-12 17:50:21 [956] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:587 nmq_tcptran_pipe_send_cb: send aio error Connection reset 2024-08-12 17:50:21 [950] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:680 tcptran_pipe_recv_cb: nni aio recv error!! Connection shutdown
2024-08-12 17:50:21 [950] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:964 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: recv_error rv: 139
2024-08-12 17:50:21 [949] WARN nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:394 nano_ctx_send: pipe id 2066283158 is gone, pub failed panic: pthread_mutex_unlock: Invalid argument This message is indicative of a BUG. Report this at https://github.com/emqx/nanomq /opt/nxpimx8/usr/local/bin/nanomq(nni_panic+0xe4) [0x44b4bc] /opt/nxpimx8/usr/local/bin/nanomq() [0x4550f8] /opt/nxpimx8/usr/local/bin/nanomq(nni_plat_mtx_unlock+0x14) [0x4552a8] /opt/nxpimx8/usr/local/bin/nanomq(nni_mtx_unlock+0x14) [0x451a88] /opt/nxpimx8/usr/local/bin/nanomq() [0x460c34] /opt/nxpimx8/usr/local/bin/nanomq(nni_ctx_send+0x3c) [0x44eef8] /opt/nxpimx8/usr/local/bin/nanomq(nng_ctx_send+0x8c) [0x43ed54] /opt/nxpimx8/usr/local/bin/nanomq(server_cb+0x10d8) [0x43b028] /opt/nxpimx8/usr/local/bin/nanomq() [0x451164] /opt/nxpimx8/usr/local/bin/nanomq() [0x451c24] /opt/nxpimx8/usr/local/bin/nanomq() [0x455618] /lib/libpthread.so.0(+0x88f8) [0xffffabf6c8f8] /lib/libc.so.6(+0xcf8ec) [0xffffabe6e8ec] 2024-08-12 17:50:21 [953] ERROR nanomq/nanomq/apps/broker.c:108 sig_handler: signal signumber: 6 received!
To Reproduce Not sure of the steps to reproduce; hopefully the stack trace above will help.
Environment Details
NanoMQ version v0.22.2-4
Operating system and version Linux 5.4.70 built for arm64
Compiler and language used gcc/g++ 10.3.0 with libc 2.17
testing scenario Both same processor and network interaction from publishing and subscribing.
Client SDK Using qtmqtt from c++ as well as mosquitto_sub from the mosquitto package.
Additional context None