[Home]

Summary:ASTERISK-29192: Asterisk service is crashing in the pjsip transport functions due to callback are NULL.
Reporter:Badareenadh Rangisetti (Badareenadh)Labels:
Date Opened:2020-12-03 02:11:29.000-0600Date Closed:2020-12-17 12:00:03.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:16.3.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Cent os 8Attachments:
Description:Asterisk service is crashing for the pjsip transport functions due to callback pointers are NULL.

File: sip_transport.c
Function: pjsip_transport_send

Code snippet:

/* Send to transport. */
   status = (*tr->send_msg)(tr, tdata,  addr, addr_len, (void*)tdata,
                &transport_send_callback);


Here function pointer *tr->send_msg is NULL.

GDB details:

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007f81ff832e9d in pjsip_transport_send (tr=0x10aea08, tdata=tdata@entry=0x7f7fd822d278, addr=addr@entry=0x7f7fd822d468,
   addr_len=addr_len@entry=16, token=token@entry=0x7f7fd8249ef8, cb=cb@entry=0x7f81ff82d2e0 <stateless_send_transport_cb>)
   at ../src/pjsip/sip_transport.c:898
#2  0x00007f81ff82d01f in stateless_send_transport_cb (token=token@entry=0x7f7fd8249ef8, tdata=tdata@entry=0x7f7fd822d278,
   sent=<optimized out>, sent@entry=-70002) at ../src/pjsip/sip_util.c:1270
#3  0x00007f81ff82d389 in stateless_send_transport_cb (sent=-70002, tdata=0x7f7fd822d278, token=0x7f7fd8249ef8) at ../src/pjsip/sip_util.c:1371
#4  stateless_send_resolver_callback (status=<optimized out>, status@entry=0, token=token@entry=0x7f7fd8249ef8, addr=addr@entry=0x7f804acf09e0)
   at ../src/pjsip/sip_util.c:1371
#5  0x00007f81a1d3c111 in sip_resolve (resolver=<optimized out>, pool=<optimized out>, target=0x7f804acf3990, token=0x7f7fd8249ef8,
   cb=0x7f81ff82d2f0 <stateless_send_resolver_callback>) at res_pjsip/pjsip_resolver.c:527
#6  0x00007f81ff830acf in pjsip_resolve (resolver=0xd88eb0, pool=0x7f7fd822d1d0, target=target@entry=0x7f804acf3990,
   token=token@entry=0x7f7fd8249ef8, cb=cb@entry=0x7f81ff82d2f0 <stateless_send_resolver_callback>) at ../src/pjsip/sip_resolve.c:207
#7  0x00007f81ff82c6f9 in pjsip_endpt_resolve (endpt=endpt@entry=0xc32fb8, pool=<optimized out>, target=target@entry=0x7f804acf3990,
   token=token@entry=0x7f7fd8249ef8, cb=cb@entry=0x7f81ff82d2f0 <stateless_send_resolver_callback>) at ../src/pjsip/sip_endpoint.c:1200
#8  0x00007f81ff82ed8d in pjsip_endpt_send_request_stateless (endpt=0xc32fb8, tdata=tdata@entry=0x7f7fd822d278,
   token=token@entry=0x7f814812b8a8, cb=cb@entry=0x7f81ff8428e0 <send_msg_callback>) at ../src/pjsip/sip_util.c:1415
#9  0x00007f81ff8415f8 in tsx_send_msg (tdata=0x7f7fd822d278, tsx=0x7f814812b8a8) at ../src/pjsip/sip_transaction.c:2224
#10 tsx_send_msg (tsx=0x7f814812b8a8, tdata=0x7f7fd822d278) at ../src/pjsip/sip_transaction.c:2106
#11 0x00007f81ff8418e8 in tsx_on_state_null (event=<optimized out>, tsx=0x7f814812b8a8) at ../src/pjsip/sip_transaction.c:2456
#12 tsx_on_state_null (tsx=0x7f814812b8a8, event=<optimized out>) at ../src/pjsip/sip_transaction.c:2416
#13 0x00007f81ff844847 in pjsip_tsx_send_msg (tsx=0x7f814812b8a8, tdata=tdata@entry=0x7f7fd822d278) at ../src/pjsip/sip_transaction.c:1794
#14 0x00007f81ff84695d in pjsip_dlg_send_request (dlg=0x7f81e853cd28, tdata=tdata@entry=0x7f7fd822d278, mod_data_id=<optimized out>,
   mod_data=mod_data@entry=0x7f7fd819a8c8) at ../src/pjsip/sip_dialog.c:1288
#15 0x00007f81ff80e465 in pjsip_inv_send_msg (tdata=0x7f7fd822d278, inv=0x7f8154387db8) at ../src/pjsip-ua/sip_inv.c:3238
#16 pjsip_inv_send_msg (inv=0x7f8154387db8, tdata=tdata@entry=0x7f7fd822d278) at ../src/pjsip-ua/sip_inv.c:3184
#17 0x00007f819b9ce598 in ast_sip_session_send_request_with_cb (session=session@entry=0x7f7f7c16a340, tdata=0x7f7fd822d278,
   on_response=on_response@entry=0x0) at res_pjsip_session.c:2075
#18 0x00007f819b9cf237 in ast_sip_session_send_request (session=session@entry=0x7f7f7c16a340, tdata=<optimized out>) at res_pjsip_session.c:2082
#19 0x00007f81926b1fab in call (data=0x7f7f50004380) at chan_pjsip.c:2638
#20 0x0000000000576f6e in ast_taskprocessor_execute ()
#21 0x000000000057d2b0 in execute_tasks ()
#22 0x0000000000576f6e in ast_taskprocessor_execute ()
#23 0x000000000057db80 in worker_start ()
#24 0x0000000000584ca9 in dummy_start ()
#25 0x00007f81fd3572de in start_thread () from /lib64/libpthread.so.0
#26 0x00007f81fc8a4133 in __libc_ifunc_impl_list () from /lib64/libc.so.6
Comments:By: Asterisk Team (asteriskteam) 2020-12-03 02:11:31.092-0600

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: Asterisk Team (asteriskteam) 2020-12-03 02:11:32.215-0600

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: Joshua C. Colp (jcolp) 2020-12-03 04:08:36.874-0600

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: Badareenadh Rangisetti (Badareenadh) 2020-12-03 05:57:08.188-0600

Okay, thanks for the update. I will check and get back with my findings.

By: Asterisk Team (asteriskteam) 2020-12-17 12:00:02.867-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines