Summary:ASTERISK-05403: Segfault from time to time in todays head
Reporter:Lorenz Barth (bartpbx)Labels:
Date Opened:2005-10-30 15:37:06.000-0600Date Closed:2005-10-30 20:19:37.000-0600
Versions:Frequency of
Environment:Attachments:( 0) bt.txt
Description:I've seen a few segfaults with todays HEAD version. I can not reproduce them currently. They appered 5 times today. See BT attached
Comments:By: Andrew Kohlsmith (akohlsmith) 2005-10-30 15:44:31.000-0600

I've been working with bartpbx a little on this (I'm going through his corefile with gdb)

It seems the problem is not in ast_channel_inherit_variables() but further up the chain.  This is why I believe this is the case:

1. parent->varshead points to an empty variable set
(gdb) print parent->varshead
$1 = {first = 0x0, last = 0x0, lock = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 0, __m_lock = {__status = 0, __spinlock = 0}}}

2. parent itself seems corrupt:
(gdb) print parent->name
$2 = "\000\000\000\000Q\223\032\b__CALLED\000494022611090", '\0' <repeats 15 times>, "9\000\000\000\220\223\032\b\226\223\032\b\002\000\000\000\001", '\0' <repeats 15 times>, " \222\032\b"

the SIGSEGV occurs after AST_LIST_INSERT_TAIL in case 2, but that's the odd part.  parent->varshead points to an empty variable set, so how the hell did it find a hardlinked variable?

(gdb) print current->name
$4 = 0x81a9880 "__CALLED"
(gdb) print current->value
$5 = 0x81a9889 "494022611090"

By: Clod Patry (junky) 2005-10-30 20:18:49.000-0600

Since they related to the same problem.