nanomq v0.22.6-7 sig_handler 6
Describe the bug While running v0.22.6-7 nanomq panic'ed with the following stack trace (similar to what reported a few days ago with v0.22.4).
2024-08-28 11:51:51 [947] WARN nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:394 nano_ctx_send: pipe id 1506781703 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) [0x44c060] /opt/nxpimx8/usr/local/bin/nanomq() [0x455cc0] /opt/nxpimx8/usr/local/bin/nanomq(nni_plat_mtx_unlock+0x14) [0x455e70] /opt/nxpimx8/usr/local/bin/nanomq(nni_mtx_unlock+0x14) [0x45262c] /opt/nxpimx8/usr/local/bin/nanomq() [0x461690] /opt/nxpimx8/usr/local/bin/nanomq(nni_ctx_send+0x3c) [0x44fa9c] /opt/nxpimx8/usr/local/bin/nanomq(nng_ctx_send+0x8c) [0x43f8d4] /opt/nxpimx8/usr/local/bin/nanomq(server_cb+0x1100) [0x43b7e4] /opt/nxpimx8/usr/local/bin/nanomq() [0x451d08] /opt/nxpimx8/usr/local/bin/nanomq() [0x4527c8] /opt/nxpimx8/usr/local/bin/nanomq() [0x4561e0] /lib/libpthread.so.0(+0x88f8) [0xffff8312d8f8] /lib/libc.so.6(+0xcf8ec) [0xffff8302f8ec] 2024-08-28 11:51:51 [950] ERROR nanomq/nanomq/apps/broker.c:108 sig_handler: signal signumber: 6 received!
Expected behavior not crash ;)
Actual Behavior see above
To Reproduce I believe that the situation is that one of the clients stops receiving subscriptions without closing the connection.
Environment Details
-
v0.22.6-7
-
Operating system and version
-
linux 5.4.70 built for ARM64
-
Compiler and language used gcc/g++ 10.3
-
testing scenario A remote user connects and stops receiving of the subscribed messages without disconnecting.
Client SDK If possible include the mqtt sdk you used to connect to nanomq Minimal C test cases are perferred.
Additional context Add any other context about the problem here.
Same problem as #1871? any way to reproduce it ?
After some struggles, I failed to reproduce this issue locally. I have released a theoretical fix on 0.22.7 again, could you have a try on it? https://github.com/nanomq/nanomq/pull/1884 the 0.22.7 release wraps this fix pr.
Looking forward to your result!
I used a shell script as follows: #!/bin/bash
count=1 while [ $count -le 2000 ] do echo $count mqttx sub -h localhost -t test -u bill -i bill & sleep 1 count=$((count+1)) killall mqttx sleep 1 done
From: Jaylin @.> Sent: Friday, August 30, 2024 2:55 AM To: nanomq/nanomq @.> Cc: Bill Priest @.>; Author @.> Subject: [EXTERNAL]Re: [nanomq/nanomq] nanomq v0.22.6-7 sig_handler 6 (Issue #1879)
any way to reproduce it ?
— Reply to this email directly, view it on GitHubhttps://github.com/nanomq/nanomq/issues/1879#issuecomment-2320397820, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AU7WZ7P3XW2FHDEC7JSISJ3ZUAQOLAVCNFSM6AAAAABNIVNOJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRQGM4TOOBSGA. You are receiving this because you authored the thread.Message ID: @.***>
Cool, I use your script, but switch to mosquitto_sub and emqtt_bench sub, and no issue is found. wait for your confirmation as well
close due to inactive.