[Home]

Summary:ASTERISK-17924: Message ID does not match trid field in message structure
Reporter:Jeff Waltz (jeffw)Labels:
Date Opened:2011-05-25 15:15:40Date Closed:2012-01-26 09:19:18.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_mgcp
Versions:1.8.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:chan_mgcp.c is using a global variable to allocate transaction IDs.  The global variable is used to populate the "trid" field in the message struct and build the message string.  A window exists where the process of building a message can be interrupted by a second message build process and cause the "trid" field to be different from the ID in the actual message data.  I added an additional log message on retrans_pkt to display the first 30 characters of the message data.  I consistently see the maximum retires exceeded for message ID N followed by the message data showing the message ID is actually N+1.

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

I am running Asterisk under a load of approximately 2200 calls per hour using NCS and packet cable options.  I was seeing about 5 max reties exceeded errors an hour.  I made a fix to allocate the message ID and store it in the message structure and then only reference the copy in the message structure else where.  I removed all references to "oseq" except in reqprep(), which now stores the value of "oseq" in "req->trid".  The references to "oseq" outside of reqprep() were replaced with "<msg-struct-ptr>->trid".
Comments:By: Jeff Waltz (jeffw) 2011-06-02 15:19:19

Here is the diff of the changes I made to correct this:

[EDIT]

Inline patch removed by mjordan

By: Matt Jordan (mjordan) 2011-12-14 09:29:07.441-0600

I've removed the patch provided in the comment above.  As noted previously on other issues that have been filed, you must provide the patch as a unified diff attached to the issue, such that the license agreement is signed.  Please attach your patch to this issue.

By: Matt Jordan (mjordan) 2012-01-26 09:19:13.283-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines