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

Michael L. Young (JIRA) noreply at issues.asterisk.org
Thu May 30 12:37:07 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-21847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=206917#comment-206917 ] 

Michael L. Young commented on ASTERISK-21847:
---------------------------------------------

Ivo,

{quote}
I did not specify a version as I think this one matches any version.
{quote}

Please help prove that statement.

As Richard stated, please test on a supported branch.  It helps save time not chasing down a bug that is already fixed in our supported releases.

If you can reproduce on 1.8 or 11, please attach the backtrace and any pertinent debug information as txt files.

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Thanks
                
> 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