"SEGV on unknown address" For SIP
I built and installed master of everything a moment ago.
I ran jami-qt and enabled my SIP account I had previously set up (not sure I ever actually connected before from previous tests).
This caused the crash.
After everything settled, I manually ran:
$ /usr/local/libexec/jamid -cd
Jami Daemon 10.1.0-68f1732948, by Savoir-faire Linux 2004-2019
https://jami.net/
[Video support enabled]
[Plugins support enabled]
[1634724962.374|16769|ringbuffer.cpp :55 ] Create new RingBuffer audiolayer_id
[1634724962.375|16769|manager.cpp :727 ] Not initialized
[1634724962.375|16769|manager.cpp :727 ] Not initialized
05:16:02.392 os_core_unix.c !pjlib 2.11 for POSIX initialized
[1634724962.392|16769|manager.cpp :798 ] Using PJSIP version 2.11 for x86_64-pc-linux-gnu
[1634724962.392|16769|manager.cpp :799 ] Using GnuTLS version 3.7.2
[1634724962.392|16769|manager.cpp :800 ] Using OpenDHT version 2.3.0
[1634724962.392|16769|manager.cpp :801 ] Using FFmpeg version n4.4
[1634724962.392|16769|manager.cpp :804 ] Using Libgit2 version 1.2.0
[1634724962.393|16769|sipvoiplink.cpp :659 ] Using SIP nameserver: 1.1.1.1
[1634724962.393|16769|sipvoiplink.cpp :659 ] Using SIP nameserver: 9.9.9.9
[1634724962.393|16769|sipvoiplink.cpp :659 ] Using SIP nameserver: 8.8.8.8
[1634724962.394|16769|sipvoiplink.cpp :753 ] SIPVoIPLink@<sanitized>
[1634724962.394|16769|manager.cpp :820 ] Configuration file path: /home/username/.config/jami/dring.yml
[1634724962.397|16769|accel.cpp :206 ] -- Starting encoding init for cuda with default device.
[AVHWDeviceContext @ 0x609000000700] Cannot load libcuda.so.1
[AVHWDeviceContext @ 0x609000000700] Could not dynamically load CUDA
[1634724962.397|16769|accel.cpp :171 ] Failed to create cuda device: -1313558101.
[1634724962.397|16769|accel.cpp :221 ] -- Init failed for cuda with default device.
[1634724962.398|16769|accel.cpp :228 ] -- Init encoding for cuda with device 1.
[AVHWDeviceContext @ 0x609000000a40] Cannot load libcuda.so.1
[AVHWDeviceContext @ 0x609000000a40] Could not dynamically load CUDA
[1634724962.398|16769|accel.cpp :171 ] Failed to create cuda device: -1313558101.
[1634724962.398|16769|accel.cpp :240 ] -- Init failed for cuda with device 1.
[1634724962.398|16769|accel.cpp :228 ] -- Init encoding for cuda with device 2.
[AVHWDeviceContext @ 0x609000000dc0] Cannot load libcuda.so.1
[AVHWDeviceContext @ 0x609000000dc0] Could not dynamically load CUDA
[1634724962.398|16769|accel.cpp :171 ] Failed to create cuda device: -1313558101.
[1634724962.398|16769|accel.cpp :240 ] -- Init failed for cuda with device 2.
[1634724962.403|16769|accel.cpp :206 ] -- Starting encoding init for vaapi with default device.
[1634724962.406|16769|accel.cpp :182 ] Device type vaapi successfully created.
[1634724962.406|16769|accel.cpp :215 ] -- Init passed for vaapi with default device.
[hevc_vaapi @ 0x61900002cb80] No usable encoding profile found.
[1634724962.407|16769|media_encoder.cpp :1178 ] Fail to open hardware encoder H265 with vaapi
[1634724962.407|16769|system_codec_container.cpp:197 ] Can't find a usable accelerated H265/HEVC codec, disabling.
[1634724962.407|16769|system_codec_container.cpp:232 ] Encoders found: H264 VP8 MP4V-ES H263-1998 opus G722 speex speex speex PCMA PCMU
[1634724962.408|16769|system_codec_container.cpp:233 ] Decoders found: H264 VP8 MP4V-ES H263-1998 opus G722 speex speex speex PCMA PCMU
[1634724962.408|16769|sipaccount.cpp :2407 ] All audio codecs disabled, enabling all
[1634724962.408|16769|sipaccount.cpp :2411 ] All video codecs disabled, enabling all
[1634724962.408|16769|upnp_context.cpp :39 ] Creating UPnPContext instance [<sanitized>]
[1634724962.408|16769|upnp_control.cpp :39 ] Controller@<sanitized>: Created UPnP Controller session
[1634724962.408|16770|upnp_context.cpp :409 ] Successfully registered controller <sanitized>
[1634724962.408|16770|upnp_context.cpp :131 ] Starting UPNP context
[1634724962.408|16769|sipaccount.cpp :1818 ] Set SIP registration EXPIRE to 60 - current 3600
[1634724962.408|16769|sipaccount.cpp :1870 ] Presence enabled for <sanitized> : false.
[1634724962.410|16774|jamiaccount.cpp :327 ] [Account <sanitized>] Can't load proxy URL from cache: Can't check write time for: /home/username/.cache/jami/<sanitized>/dhtproxy
[1634724962.414|16774|jamiaccount.cpp :1101 ] [Account <sanitized>] loading account
[1634724962.414|16774|namedirectory.cpp :475 ] Could not load /home/username/.cache/jami/namecache/ns.jami.net
[1634724962.414|16774|account_manager.cpp:57 ] Loading certificate from 'ring_device.crt' and key from 'ring_device.key' at /home/username/.local/share/jami/<sanitized>
[1634724962.434|16774|certstore.cpp :89 ] CertificateStore: loaded 36 local certificates.
[1634724962.436|16774|account_manager.cpp:143 ] [Auth] checking device receipt for <sanitized>
[1634724962.440|16774|contact_list.cpp :503 ] [Contacts] Found account device: computername <sanitized>
[1634724962.442|16774|contact_list.cpp :503 ] [Contacts] Found account device: <sanitized>
[1634724962.443|16774|account_manager.cpp:193 ] [Auth] Device <sanitized> receipt checked successfully for account <sanitized>
[1634724962.443|16774|jamiaccount.cpp :1207 ] [Account <sanitized>] loaded account identity
[1634724962.443|16774|conversation_module.cpp:678 ] [Account <sanitized>] Start loading conversations…
[1634724962.443|16774|conversation_module.cpp:1579 ] [convInfo] error loading convInfo: Can't read file: convInfo
[1634724962.443|16774|conversation_module.cpp:715 ] [Account <sanitized>] Conversations loaded!
[1634724962.443|16774|conversation_module.cpp:678 ] [Account <sanitized>] Start loading conversations…
[1634724962.443|16774|conversation_module.cpp:1579 ] [convInfo] error loading convInfo: Can't read file: convInfo
[1634724962.443|16774|conversation_module.cpp:715 ] [Account <sanitized>] Conversations loaded!
[1634724962.444|16769|ringbuffer.cpp :55 ] Create new RingBuffer urgentRingBuffer_id
[1634724962.447|16769|pulselayer.cpp :141 ] Waiting....
[1634724962.447|16779|pulselayer.cpp :141 ] Waiting....
[1634724962.447|16779|pulselayer.cpp :141 ] Waiting....
[1634724962.449|16779|pulselayer.cpp :145 ] Connection to PulseAudio server established
[1634724962.449|16779|pulselayer.cpp :175 ] Updating PulseAudio sink list
[1634724962.449|16779|pulselayer.cpp :192 ] Updating PulseAudio source list
[1634724962.449|16779|pulselayer.cpp :209 ] Updating PulseAudio server infos
[1634724962.451|16779|pulselayer.cpp :664 ] PulseAudio server info:
Server name: PulseAudio (on PipeWire 0.3.38)
Server version: 15.0.0
Default Sink bluez_output.00_02_76_64_A2_CF.a2dp-sink
Default Source alsa_input.pci-0000_00_1b.0.analog-stereo
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
[1634724962.451|16779|audiolayer.cpp :64 ] Hardware audio format available : {s16, 2 channels, 48000Hz} 0
[1634724962.451|16779|manager.cpp :2870 ] Audio format changed: {s16, 1 channels, 16000Hz} -> {s16, 2 channels, 48000Hz}
[1634724962.496|16769|sipaccount.cpp :903 ] doRegister <sipserver>
[1634724962.496|16769|sipaccount.cpp :907 ] UPnP: waiting for IGD to register SIP account
[1634724962.496|16769|upnp_context.cpp :309 ] Try to find mapping for port 5060 [UDP]
[1634724962.496|16769|upnp_context.cpp :341 ] Did not find any available mapping. Will request one now
[1634724962.496|16769|upnp_context.cpp :1137 ] No IGD available. Mapping will be requested when an IGD becomes available
[1634724962.496|16769|mapping.cpp :86 ] Changing mapping JAMI-UDP:5060 state from AVAILABLE to UNAVAILABLE
[1634724962.496|16769|sipaccount.cpp :835 ] [Account <sanitized>] Failed to open port 5060: registering SIP account anyway
[1634724962.496|16769|sipvoiplink.cpp :1491 ] try to resolve '<sipserver>' (port: 0)
[1634724962.496|16769|sipaccount.cpp :910 ] UPnP: UPNP request failed, try to register SIP account anyway
[1634724962.496|16769|sipvoiplink.cpp :1491 ] try to resolve '<sipserver>' (port: 0)
[1634724962.497|16769|jamiaccount.cpp :1763 ] [Account <sanitized>] Starting account..
[1634724962.497|16769|jamiaccount.cpp :2599 ] [Account <sanitized>] connecting…
[1634724962.497|16770|upnp_context.cpp :622 ] UPNP/NAT-PMP enabled, but no valid IGDs available
[1634724962.497|16775|jamiaccount.cpp :2779 ] Loading DhParams from file '/home/username/.cache/jami/<sanitized>/dhParams'
[1634724962.497|16770|jamiaccount.cpp :1953 ] [Account <sanitized>] Starting account...
[1634724962.500|16770|jamiaccount.cpp :1794 ] [Account <sanitized>] Bootstrap node: bootstrap.jami.net
[1634724962.502|16782|jamiaccount.cpp :2075 ] [Account <sanitized>] Dht status: IPv4 connecting; IPv6 disconnected
[1634724962.616|16782|jamiaccount.cpp :2075 ] [Account <sanitized>] Dht status: IPv4 connected; IPv6 disconnected
[1634724962.616|16782|jamiaccount.cpp :2595 ] [Account <sanitized>] connected
[1634724962.617|16782|jamiaccount.cpp :3554 ] [Account <sanitized>] Store DHT public IPv4 address : <sanitized>
[1634724962.669|16773|sipaccount.cpp :1005 ] Creating transport
[1634724962.670|16773|siptransport.cpp :329 ] Created UDP transport on address 0.0.0.0:5060
[1634724962.670|16773|siptransport.cpp :80 ] SipTransport@<sanitized> {tr=<sanitized> {rc=2}}
[1634724962.670|16773|sipaccount.cpp :1099 ] Using contact header "SIP Provider" <sip:<sanitized>@<deviceip>:5060> in registration
[1634724962.697|16782|jamiaccount.cpp :2075 ] [Account <sanitized>] Dht status: IPv4 connected; IPv6 connecting
[1634724962.733|16773|sipaccount.cpp :1599 ] Using published address <sanitized> and port 5060
AddressSanitizer:DEADLYSIGNAL
=================================================================
==278913==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000048 (pc 0x7f7fb357255b bp 0x7f7f9a9f7ae0 sp 0x7f7f9a9f7590 T4)
==278913==The signal is caused by a READ memory access.
==278913==Hint: address points to the zero page.
#0 0x7f7fb357255b in jami::SIPAccount::checkNATAddress(pjsip_regc_cbparam*, pj_pool_t*) (/usr/local/lib/libring.so.0+0x9f355b)
#1 0x7f7fb357b670 in jami::SIPAccount::onRegister(pjsip_regc_cbparam*) (/usr/local/lib/libring.so.0+0x9fc670)
#2 0x7f7fb3d6bd38 in regc_tsx_callback (/usr/local/lib/libring.so.0+0x11ecd38)
#3 0x7f7fb3d97256 in tsx_set_state (/usr/local/lib/libring.so.0+0x1218256)
#4 0x7f7fb3d985f7 in tsx_on_state_proceeding_uac (/usr/local/lib/libring.so.0+0x12195f7)
#5 0x7f7fb3d98825 in tsx_on_state_calling (/usr/local/lib/libring.so.0+0x1219825)
#6 0x7f7fb3d9ac9d in pjsip_tsx_recv_msg (/usr/local/lib/libring.so.0+0x121bc9d)
#7 0x7f7fb3d9ada4 in mod_tsx_layer_on_rx_response (/usr/local/lib/libring.so.0+0x121bda4)
#8 0x7f7fb3d845c6 in pjsip_endpt_process_rx_data (/usr/local/lib/libring.so.0+0x12055c6)
#9 0x7f7fb3d84785 in endpt_on_rx_msg (/usr/local/lib/libring.so.0+0x1205785)
#10 0x7f7fb3d8b7e8 in pjsip_tpmgr_receive_packet (/usr/local/lib/libring.so.0+0x120c7e8)
#11 0x7f7fb3d8e1ed in udp_on_read_complete (/usr/local/lib/libring.so.0+0x120f1ed)
#12 0x7f7fb3dd19d6 in ioqueue_dispatch_read_event (/usr/local/lib/libring.so.0+0x12529d6)
#13 0x7f7fb3dd343a in pj_ioqueue_poll (/usr/local/lib/libring.so.0+0x125443a)
#14 0x7f7fb3d842af in pjsip_endpt_handle_events2 (/usr/local/lib/libring.so.0+0x12052af)
#15 0x7f7fb35f5cf7 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<jami::SIPVoIPLink::SIPVoIPLink()::{lambda()#1}> > >::_M_run() (/usr/local/lib/libring.so.0+0xa76cf7)
#16 0x7f7faf5f13c3 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:82
#17 0x7f7fb260e258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
#18 0x7f7faf2f15e2 in __GI___clone (/usr/lib/libc.so.6+0xfe5e2)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/lib/libring.so.0+0x9f355b) in jami::SIPAccount::checkNATAddress(pjsip_regc_cbparam*, pj_pool_t*)
Thread T4 created by T0 here:
#0 0x7f7fb4218fa7 in __interceptor_pthread_create /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:216
#1 0x7f7faf5f16aa in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663
#2 0x7f7fb2f244a2 in jami::Manager::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/usr/local/lib/libring.so.0+0x3a54a2)
==278913==ABORTING