[Asterisk-code-review] channel: Hang-up crashed Asterisk while freeing private data. (asterisk[11])

Corey Farrell asteriskteam at digium.com
Sun Aug 28 14:47:40 CDT 2016


Corey Farrell has posted comments on this change.

Change subject: channel: Hang-up crashed Asterisk while freeing private data.
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/3731/1/main/channel.c
File main/channel.c:

PS1, Line 2352: 		ast_log_callid(LOG_ERROR, callid, "Channel '%s' may not have been hung up" \
              : 			" properly; leaking memory. Please report via http://issues.asterisk.org." \
              : 			" If feasible, please include" \
              : 			" http://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace" \
              : 			" via an interactive session in the GNU Debugger (gdb).\n",
              : 			ast_channel_name(chan));
> Done (partially)
I agree with Richard, the message is way too long.  Also issues.asterisk.org would only be for standard channel drivers.  Any bug caught here is actually caused by the channel driver, so any 3rd party channel driver should not be reported to issues.asterisk.org.

Personally I don't even see how a backtrace would be useful in this situation unless it's caused by ast_assert here w/ DEVMODE + DO_CRASH + dumpcore=yes.  Otherwise the backtrace won't have this code location the stack.  Really ast_channel_name(chan) gives the most important info - which channel driver did wrong.  At this point I'd guess 99% of the time this will point to a bug outside of the Asterisk source tree.

Also the channel was improperly hung up (100% certain).  It likely leaked memory and other resources like file descriptors.  My suggestion for wording:
"BUG! Channel '%s' was not hung up properly and likely leaked resources.\n".


-- 
To view, visit https://gerrit.asterisk.org/3731
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id085417d7e0a5c61382582e7d250b56ab3c00a1b
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list