[asterisk-dev] [Code Review] I broke parking reload in 1.6.2.19. Here's my effort to fix it.

David Vossel reviewboard at asterisk.org
Mon Aug 1 16:36:00 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1337/#review3958
-----------------------------------------------------------

Ship it!


great work!  I suppose we'll have to make another 1.6.2 release for this one.


/branches/1.6.2/main/features.c
<https://reviewboard.asterisk.org/r/1337/#comment7798>

    So I guess in 1.6.2 the default parking lot is never supposed to be rebuilt on reload.
    
    There was nothing really wrong with the way this was done before this patch.  It shouldn't have been possible to unlink all the elements in a container and have a global dangling pointer out here.
    
    Regardless, that happened and this patch resolves it.


- David


On Aug. 1, 2011, 3:49 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1337/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2011, 3:49 p.m.)
> 
> 
> Review request for Asterisk Developers, Jason Parker, David Vossel, and rmudgett.
> 
> 
> Summary
> -------
> 
> I caused an intermittent crash when I backported a bug fix to clear parking lots before reloading (so that they wouldn't be left over).  In 1.8, immediately after the default parking lot would be rebuilt from scratch.  In 1.6.2 however, it would check for the presence of the default parking lot which would at this point have become a dangling pointer.  Back in 1.6.2 deleting the default parking lot was totally unnecessary (and to be blunt, I'm still not sure it's necessary in 1.8 and up, but it doesn't break anything there, so no problem).
> 
> Anyway, this patch just makes it so that while iterating through the parking lots that the default parking lot is never destroyed.  This patch only applies to 1.6.2 and will require an update to 1.6.2.19  Also should go in svn 1.6.2
> 
> Thanks to rmudgett and jparker for helping to spot the problem.
> 
> 
> This addresses bug ASTERISK-18103.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18103
> 
> 
> Diffs
> -----
> 
>   /branches/1.6.2/main/features.c 330488 
> 
> Diff: https://reviewboard.asterisk.org/r/1337/diff
> 
> 
> Testing
> -------
> 
> tested reload roughly 80 times in quick succession.  No explosion.
> 
> Tested changing parkinglot extensions for the default parking lot as well as parking some calls.  Works as advertised.
> 
> Tested adding and removing parking lots.  Works as advertised.
> 
> Made sure reload didn't cause memory leaks by using memory show allocations features.c before and after consecutive reloads.  No unexpected allocations in any of the above cases.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110801/a5300969/attachment-0001.htm>


More information about the asterisk-dev mailing list