Summary: | ASTERISK-29456: pjsip: Crash when getting transport based on type after resolution | ||
Reporter: | LA (learbia) | Labels: | |
Date Opened: | 2021-05-28 12:49:40 | Date Closed: | 2021-06-13 10:01:24 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | pjproject/pjsip |
Versions: | 18.4.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) config.log.txt ( 1) core-brief.txt ( 2) core-full.txt ( 3) core-info.txt ( 4) core-locks.txt ( 5) core-thread1.txt | |
Description: | Asterisk crash many times,
| ||
Comments: | By: Asterisk Team (asteriskteam) 2021-05-28 12:49:41.864-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur. Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/]. By: Joshua C. Colp (jcolp) 2021-05-28 13:03:26.006-0500 Did this just start happening? Did it not crash in a previous version? What kind of transports are you using? Are you doing reloads? By: LA (learbia) 2021-05-28 13:06:10.647-0500 In version 18.3 happens too. This my transports: Transport: transport-tcp tcp 0 0 0.0.0.0:7048 Transport: transport-tls tls 0 0 0.0.0.0:5061 Transport: transport-udp udp 0 0 0.0.0.0:7048 Transport: transport-udp2 udp 0 0 10.21.0.107:5060 Transport: transport-udp3 udp 0 0 10.31.0.107:5060 Transport: transport-udp4 udp 0 0 10.41.0.107:5060 Transport: transport-udp5 udp 0 0 10.10.10.107:5060 Transport: transport-udp6 udp 0 0 10.51.0.107:5060 Transport: transport-udp7 udp 0 0 10.61.0.107:5060 Transport: transport-ws ws 0 0 0.0.0.0:5060 Transport: transport-wss wss 0 0 0.0.0.0:5060 Some times we need change configuration and we make a reload pjsip and dialplan By: LA (learbia) 2021-05-31 14:59:31.989-0500 The Asterisk Crash all day, many times Other backtrace captured today In thread1 we have indication about /src/pjsip/sip_transport.c:398 $1 = {si_signo = 11, si_errno = 0, si_code = 1, _sifields = {_pad = {32, 0 <repeats 27 times>}, _kill = {si_pid = 32, si_uid = 0}, _timer = {si_tid = 32, si_overrun = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 32, si_uid = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _sigchld = {si_pid = 32, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {si_addr = 0x20}, _sigpoll = {si_band = 32, si_fd = 0}}} Signal Stop Print Pass to program Description SIGSEGV Yes Yes Yes Segmentation fault Thread 1 (Thread 0x7f9b803f0700 (LWP 29935)): #0 pjsip_transport_get_flag_from_type (type=1286101096) at ../src/pjsip/sip_transport.c:398 No locals. #1 0x00007fa03d6bee55 in pjsip_tpmgr_acquire_transport2 (mgr=0x11b93d8, type=1286101096, remote=0x7f9fed83bc38, addr_len=16, sel=0x7f9fed83c210, tdata=0x310148a0, tp=0x7f9feca41a90) at ../src/pjsip/sip_transport.c:2333 flag = 15 key = {type = 1286101096, rem_addr = {addr = {sa_family = 2}, ipv4 = {sin_family = 2, sin_port = 60302, sin_addr = {s_addr = 2772497087}, sin_zero = "000000000000000000000"}, ipv6 = {sin6_family = 2, sin6_port = 60302, sin6_flowinfo = 2772497087, sin6_addr = {s6_addr = '000' <repeats 15 times>, u6_addr32 = {0, 0, 0, 0}}, sin6_scope_id = 0}}} tp_ref = 0x0 factory = 0x7f9b803ec560 status = 16 #2 0x00007fa03d6b8813 in stateless_send_transport_cb (token=0x7f9feca41a78, tdata=0x7f9fed83ba48, sent=16) at ../src/pjsip/sip_util.c:1181 cont = 1 cur_addr = 0x7f9fed83bc38 cur_addr_len = 16 via = 0x7f9feca41a90 need_update_via = -310132208 #3 0x00007fa03d6b8c82 in stateless_send_resolver_callback (status=<optimized out>, token=0x7f9feca41a78, addr=<optimized out>) at ../src/pjsip/sip_util.c:1378 stateless_data = 0x7f9feca41a78 tdata = 0x7f9fed83ba48 #4 0x00007f9fb56e93ef in sip_resolve (resolver=0x4ca85868, pool=0x0, target=0x7f9b803efa40, token=0x0, cb=0x7fa03d6b8bb0 <stateless_send_resolver_callback>) at res_pjsip/pjsip_resolver.c:529 addresses = {count = 1, entry = {{type = 1286101096, priority = 0, weight = 0, addr = {addr = {sa_family = 2}, ipv4 = {sin_family = 2, sin_port = 60302, sin_addr = {s_addr = 2772497087}, sin_zero = "000000000000000000000"}, ipv6 = {sin6_family = 2, sin6_port = 60302, sin6_flowinfo = 2772497087, sin6_addr = {s6_addr = '000' <repeats 15 times>, u6_addr32 = {0, 0, 0, 0}}, sin6_scope_id = 0}}, addr_len = 16}, {type = PJSIP_TRANSPORT_UNSPECIFIED, priority = 0, weight = 0, addr = {addr = {sa_family = 0}, ipv4 = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "000000000000000000000"}, ipv6 = {sin6_family = 0, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {s6_addr = '000' <repeats 15 times>, u6_addr32 = {0, 0, 0, 0}}, sin6_scope_id = 0}}, addr_len = 0} <repeats 31 times>}} resolve = 0x7f9b803efa48 By: Kevin Harwell (kharwell) 2021-06-01 12:19:55.179-0500 Please attach your _config.log_ file (should be in the top level Asterisk source/build directory). Also please attach the actual configuration section(s) from your _pjsip.conf_ for your transports, as well as a sample of a typical endpoint and aor. And are you using only configuration file(s), realtime or a mix of both? By: LA (learbia) 2021-06-01 18:56:32.976-0500 This my config.log -> https://issues.asterisk.org/jira/secure/attachment/60470/config.log.txt I use files in configuration: By: LA (learbia) 2021-06-01 19:00:05.921-0500 [transport-tcp] type=transport protocol=tcp symmetric_transport=yes external_media_address=xxx.xxx.xxx.xxx external_signaling_address=xxx.xxx.xxx.xxx ; local_net = 192.168.11.0/255.255.255.0 local_net = 172.10.0.0/255.255.255.0 local_net = 172.16.0.0/255.0.0.0 local_net = 192.168.25.0/255.255.255.0 local_net = 192.168.1.0/255.255.255.0 local_net = 192.168.0.0/255.255.255.0 local_net = 10.0.0.0/255.0.0.0 bind=0.0.0.0:7048 [transport-wss] type=transport symmetric_transport=yes external_media_address=xxx.xxx.xxx.xxx external_signaling_address=xxx.xxx.xxx.xxx protocol=wss bind=0.0.0.0 websocket_write_timeout=400 [transport-ws] type=transport symmetric_transport=yes external_media_address=xxx.xxx.xxx.xxx external_signaling_address=xxx.xxx.xxx.xxx protocol=ws bind=0.0.0.0 [transport-udp] type=transport symmetric_transport=yes protocol=udp external_media_address=xxx.xxx.xxx.xxx external_signaling_address=xxx.xxx.xxx.xxx ; local_net = 192.168.11.0/255.255.255.0 local_net = 172.10.0.0/255.255.255.0 local_net = 172.16.0.0/255.0.0.0 local_net = 192.168.25.0/255.255.255.0 local_net = 192.168.1.0/255.255.255.0 local_net = 192.168.0.0/255.255.255.0 local_net = 10.0.0.0/255.0.0.0 bind=0.0.0.0:7048 [transport-tls] ;;;;;;;allow_reload=yes type=transport protocol=tls bind=0.0.0.0:5061 cert_file=/etc/letsencrypt/live/xxxx.xxxxx.com.br/fullchain.pem priv_key_file=/etc/letsencrypt/live/xxxxx.xxxxxx.com.br/privkey.pem method=tlsv1 [transport-udp2] ;;;;allow_reload=yes type=transport protocol=udp external_media_address= external_signaling_address= bind=10.21.0.107:5060 symmetric_transport=yes [transport-udp3] ;;;;allow_reload=yes type=transport protocol=udp external_media_address= external_signaling_address= bind=10.31.0.107:5060 symmetric_transport=yes [transport-udp4] ;;;allow_reload=yes type=transport protocol=udp external_media_address= external_signaling_address= bind=10.41.0.107:5060 symmetric_transport=yes [transport-udp5] ;;;;allow_reload=yes type=transport protocol=udp external_media_address=10.10.10.107 external_signaling_address=10.10.10.107 bind=10.10.10.107:5060 symmetric_transport=yes [transport-udp7] ;;;;allow_reload=yes type=transport protocol=udp external_media_address= external_signaling_address= bind=10.61.0.107:5060 symmetric_transport=yes [transport-udp6] ;;;allow_reload=yes type=transport protocol=udp external_media_address= external_signaling_address= bind=10.51.0.107:5060 symmetric_transport=yes By: LA (learbia) 2021-06-01 19:01:51.648-0500 AOR [6191] type=aor max_contacts=1 remove_existing=yes minimum_expiration=300 [6191] type = auth realm=xhand username = 6191 password = XXXXXXXXXX [6191] type = endpoint context=geral moh_suggest=default contact_user=6191 callerid=6191 ;;;;;redirect_method=uri_pjsip disallow=all allow=alaw allow=ulaw language=pt_BR subscribe_context=hint-asterisk allow_subscribe=yes auth=6191 outbound_auth=6191 aors=6191 direct_media=no inband_progress=yes voicemail_extension=6240 rtp_timeout=300 dtmf_mode=rfc4733 100rel=no rtp_symmetric=yes force_rport=yes rewrite_contact=yes named_call_group=ESXX named_pickup_group=ESXX set_var=CHANNEL(parkinglot)=parkinglot_ES By: Joshua C. Colp (jcolp) 2021-06-02 08:15:35.560-0500 We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information |