Skip to content
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

SEGV on unknown address 0x000000000060 #203

Open
wanghaEMQ opened this issue Sep 21, 2023 · 0 comments
Open

SEGV on unknown address 0x000000000060 #203

wanghaEMQ opened this issue Sep 21, 2023 · 0 comments

Comments

@wanghaEMQ
Copy link
Member

Describe the bug

Connecting to server ...
connect_cb: connected!
AddressSanitizer:DEADLYSIGNAL
=================================================================
==222475==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000060 (pc 0x7faaa4cb1d54 bp 0x7ffc95ec4fa0 sp 0x7ffc95ec4f98 T0)
==222475==The signal is caused by a READ memory access.
==222475==Hint: address points to the zero page.
    #0 0x7faaa4cb1d54 in pthread_mutex_lock@@GLIBC_2.2.5 (/lib64/libc.so.6+0x8fd54) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
    #1 0x4295d8 in nni_plat_mtx_lock (/home/wangha/Documents/nftp-nanosdk/build/nftp_serv+0x4295d8) (BuildId: 9ac92bbf5fbfc4b88a650e98d43cfe9f97ff7c29)
    #2 0x427765 in nni_task_busy (/home/wangha/Documents/nftp-nanosdk/build/nftp_serv+0x427765) (BuildId: 9ac92bbf5fbfc4b88a650e98d43cfe9f97ff7c29)
    #3 0x42d31c in nng_mqtt_subscribe_async (/home/wangha/Documents/nftp-nanosdk/build/nftp_serv+0x42d31c) (BuildId: 9ac92bbf5fbfc4b88a650e98d43cfe9f97ff7c29)
    #4 0x417faa in main /home/wangha/Documents/nftp-nanosdk/nftp_serv.c:338
    #5 0x7faaa4c49b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
    #6 0x7faaa4c49c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
    #7 0x416994 in _start (/home/wangha/Documents/nftp-nanosdk/build/nftp_serv+0x416994) (BuildId: 9ac92bbf5fbfc4b88a650e98d43cfe9f97ff7c29)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libc.so.6+0x8fd54) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) in pthread_mutex_lock@@GLIBC_2.2.5
==222475==ABORTING

To Reproduce
Build with this. https://github.com/wanghaEMQ/nftp-nanosdk/tree/bug

** Environment Details **

  • NanoSDK/NNG version. latest
  • Operating system and version. fedora38
  • Compiler and language used. gcc
  • Shared or static library. shared
  • Remote MQTT Broker info. nanomq-latest
  • Messaging scenario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant