[Home]

Summary:ASTERISK-11732: * segfault when not using DONT_OPTIMIZE flag
Reporter:Clod Patry (junky)Labels:
Date Opened:2008-03-26 12:43:45Date Closed:2011-06-07 14:00:54
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:If i dont use DONT_OPTIMIZE flag, im getting sefault like:
(gdb) bt
#0  0x0000003895d6829b in arena_get2 () from /lib64/tls/libc.so.6
#1  0x0000003895d6b4b3 in calloc () from /lib64/tls/libc.so.6
#2  0x00000000004a4519 in ast_sched_add_variable (con=0x6d4420, when=2000, callback=0x2a9a5b31e0 <attempt_transmit>, data=0x7c8330, variable=0) at /usr/src/ah_ast_1.4/include/asterisk/utils.h:359
#3  0x0000002a9a5b5fad in network_thread (ignore=Variable "ignore" is not available.
) at chan_iax2.c:971
#4  0x00000000004eb595 in __PRETTY_FUNCTION__.1 ()
ASTERISK-1  0x00000000004eb6a4 in __PRETTY_FUNCTION__.1 ()
ASTERISK-2  0x0000003895d3ff83 in vfprintf () from /lib64/tls/libc.so.6
ASTERISK-3  0x00000000004eb595 in __PRETTY_FUNCTION__.1 ()
ASTERISK-4  0x00000000004eb6a4 in __PRETTY_FUNCTION__.1 ()
ASTERISK-5  0x0000003895d3ff83 in vfprintf () from /lib64/tls/libc.so.6
ASTERISK-6 0x0000000000000000 in ?? ()
(gdb)

#0  0x0000003895d6829b in arena_get2 () from /lib64/tls/libc.so.6
No symbol table info available.
#1  0x0000003895d6b4b3 in calloc () from /lib64/tls/libc.so.6
No symbol table info available.
#2  0x00000000004a4519 in ast_sched_add_variable (con=0x6d4420, when=2000, callback=0x2a9a5b31e0 <attempt_transmit>, data=0x7c8330, variable=0) at /usr/src/ah_ast_1.4/include/asterisk/utils.h:359
       res = -1
       __PRETTY_FUNCTION__ = "ast_sched_add_variable"
#3  0x0000002a9a5b5fad in network_thread (ignore=Variable "ignore" is not available.
) at chan_iax2.c:971
       __list_next = (struct iax_frame *) 0x7d38e0
       __list_prev = (struct iax_frame *) 0x752480
       __new_prev = (struct iax_frame *) 0x7c8330
       res = Variable "res" is not available.


(gdb) p *con
$5 = {lock = {__m_reserved = 2, __m_count = 1, __m_owner = 0x1ffffc7c0, __m_kind = 1, __m_lock = {__status = 0, __spinlock = 0}}, eventcnt = 434, schedcnt = 129, schedq = {first = 0x2aabe02a00,
   last = 0x2a9a95e560}, schedc = {first = 0x0, last = 0x0}, schedccnt = 0}



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

Im not sure to see how that flag influence the crash, since there's nothing about it in util.h.
Comments:By: Tilghman Lesher (tilghman) 2008-03-27 08:42:43

Generally, that's a compiler bug, and you need to report that upstream to your distribution.

By: Mark Michelson (mmichelson) 2008-04-11 09:56:59

I'm closing this since this is almost certainly a compiler bug, considering that the problem only occurs when optimizations are turned on, and the backtrace points to the problem originating in libc.

If this can be later determined to be an Asterisk bug, then please re-open.