[asterisk-bugs] [JIRA] (ASTERISK-21847) Segfault due to dahdi_restart and round robin

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri May 31 14:11:04 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-21847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton reassigned ASTERISK-21847:
---------------------------------------

    Assignee:     (was: Rusty Newton)
    
> Segfault due to dahdi_restart and round robin
> ---------------------------------------------
>
>                 Key: ASTERISK-21847
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21847
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_dahdi
>    Affects Versions: 1.8.22.0, 11.4.0
>         Environment: Not relevant
>            Reporter: Ivo Andonov
>            Severity: Minor
>
> Hello everyone,
> I did not specify a version as I think this one matches any version.
> I'm using Asterisk 1.6.2.20 in a production environment. Every morning I restart the PRI interface using the "dahdi restart" application. The first call that the system gets after that using the PRI generates a segfault. The dial string uses the round robin channel search. 
> After generating a core dump and a bt full I traced the problem down to dahdi_request function in which the struct dahdi_pvt *p gets set to an invalid pointer (0x38 in my case). Looking into the code I think I spoted the possible problem. Leaving it to the developers' opinion, but here are my findings:
> 1. (minor) round_robin array is defined as being of size 32, while the comments / description says "Dial(DAHDI/(g|G|r|R)<group#(0-63)>"... This might be confusing as the array is 32 and not 64. While there is an array length check against the group parameter in recent versions, it is not in 1.6.2.20.
> 2. dahdi_restart destroys all channels and thus invalidates any pointers in the round_robin array, however the latter is not reset to null, and I think this is the cause of the segfault I'm getting. round_robin is memset to 0 at load_module only.
> Best,
> Ivo

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list