[Home]

Summary:ASTERISK-11878: AMI Agents command tries to access null pointer to cid.cid_num for agent user channel
Reporter:David Woolley (davidw)Labels:
Date Opened:2008-04-18 10:15:54Date Closed:2008-04-18 10:21:03
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_agent
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace.txt
Description:Our AMI client issued an AMI Agents query, which it does after getting a Dial event.  action_agents suffered a segmentation violation on:

1503              talkingtoChan = ast_strdupa(ast_bridged_channel(p->owner)->cid
.cid_num);

Analysis of the dump indicates that it is almost certainly cid.cid_num on the served channel that is the problem:

(gdb) print p->owner->_bridge.cid
$4 = {cid_dnid = 0x0, cid_num = 0x0, cid_name = 0x0, cid_ani = 0x0,
 cid_rdnis = 0x0, cid_pres = 0, cid_ani2 = 0, cid_ton = 0, cid_tns = 0}


****** ADDITIONAL INFORMATION ******

We've had this happen twice today on a test system that is basically being driven by one person.  However, we do not know exactly what the reproduce criteria are.

I'm attaching gdb backtraces and gdb prints of what I think are relevant structures.  I've have replaced one person's name with Xxxx Xxxxxx.  I've also replaced some commercially sensitive strings.

The attchments were screen-scraped and saved in UTF-8, as I don't believe that the detailed content of the gibberish areas is critical.
Comments:By: Digium Subversion (svnbot) 2008-04-18 10:19:08

Repository: asterisk
Revision: 114248

U   branches/1.4/channels/chan_agent.c

------------------------------------------------------------------------
r114248 | russell | 2008-04-18 10:19:05 -0500 (Fri, 18 Apr 2008) | 5 lines

Ensure that we don't ast_strdupa(NULL)
(closes issue ASTERISK-11878)
Reported by: davidw
Patch by me

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114248

By: Digium Subversion (svnbot) 2008-04-18 10:20:43

Repository: asterisk
Revision: 114249

_U  trunk/

------------------------------------------------------------------------
r114249 | russell | 2008-04-18 10:20:42 -0500 (Fri, 18 Apr 2008) | 12 lines

Blocked revisions 114248 via svnmerge

........
r114248 | russell | 2008-04-18 10:24:09 -0500 (Fri, 18 Apr 2008) | 5 lines

Ensure that we don't ast_strdupa(NULL)
(closes issue ASTERISK-11878)
Reported by: davidw
Patch by me

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114249

By: Digium Subversion (svnbot) 2008-04-18 10:21:03

Repository: asterisk
Revision: 114250

_U  branches/1.6.0/

------------------------------------------------------------------------
r114250 | russell | 2008-04-18 10:21:03 -0500 (Fri, 18 Apr 2008) | 19 lines

Blocked revisions 114249 via svnmerge

................
r114249 | russell | 2008-04-18 10:25:50 -0500 (Fri, 18 Apr 2008) | 12 lines

Blocked revisions 114248 via svnmerge

........
r114248 | russell | 2008-04-18 10:24:09 -0500 (Fri, 18 Apr 2008) | 5 lines

Ensure that we don't ast_strdupa(NULL)
(closes issue ASTERISK-11878)
Reported by: davidw
Patch by me

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114250