[Home]

Summary:ASTERISK-00719: [workaround] Asterisk crash after a few consecutive reload
Reporter:mochouinard (mochouinard)Labels:
Date Opened:2003-12-28 13:03:45.000-0600Date Closed:2004-09-25 02:57:07
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When I start asterisk using -vvvc and do reload consecutively, normally after 10 to 25 reload, asterisk segment fault.



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

Asterisk CVS-12/23/03-01:54:3
Comments:By: jerjer (jerjer) 2003-12-28 14:31:31.000-0600

You are going to have to be a whole lot more descriptive than this.   How about a backtrace?

By: Brian West (bkw918) 2003-12-28 14:33:58.000-0600

Check bug 657 this is related.  Please search and read other bugs before you open a new one.  What hardware are you using? ztdummy? what?

By: mochouinard (mochouinard) 2003-12-28 16:34:00.000-0600

Sorry bkw,
Hardware is TDM400 (2 port) Single CPU
---------------- TEST 1
WARNING[1125350192]: File chan_iax.c, Line 718 (ast_iax_frame_free): Attempt to double free frame detected

Program received signal SIGSEGV, Segmentation fault.
(gdb) tb
Breakpoint 1 at 0x8051ec3: file sched.c, line 273.

-------------- TEST 2
   -- Registered to '69.73.19.178', who sees us as 24.202.159.205:4569

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1125350192 (LWP 5856)]
ast_sched_runq (con=0x80e8018) at sched.c:176
176                     if (SOONER(s->when, current->when))
(gdb) bt
#0  ast_sched_runq (con=0x80e8018) at sched.c:176
#1  0x41b11300 in network_thread (ignore=0x0) at chan_iax.c:4523
#2  0x40027484 in start_thread () from /lib/tls/libpthread.so.0

----------- TEST 3
 == Parsing '/etc/asterisk/sip.conf': Found
   -- Reloading module 'chan_iax.so' (Inter Asterisk eXchange)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074415360 (LWP 5868)]
0x08051ec3 in ast_sched_del (con=0x80e8018, id=948) at sched.c:273
273                     if (s->id == id) {
(gdb) tb
Breakpoint 1 at 0x8051ec3: file sched.c, line 273.

----------------- TEST 4
   -- Registered to '69.73.19.178', who sees us as 24.202.159.205:4569

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074415360 (LWP 5891)]
0x420738c9 in free () from /lib/tls/libc.so.6
(gdb) tb
Breakpoint 1 at 0x420738c9


--------------- Let me know if I need to submit more information on this

By: jrollyson (jrollyson) 2004-01-09 01:37:47.000-0600

Duplicated after 30-40 reloads here:

#0  0x4010ec1b in free () from /lib/libc.so.6
(gdb)
(gdb) bt
#0  0x4010ec1b in free () from /lib/libc.so.6
#1  0x4010eaa3 in free () from /lib/libc.so.6
#2  0x08088ff5 in ast_unregister_indication_country (country=0x0)
   at indications.c:303
#3  0x4031cecc in reload () at res_indications.c:388
#4  0x080557e4 in ast_module_reload () at loader.c:169
ASTERISK-1  0x0806c75d in handle_reload (fd=1, argc=1, argv=0xbffff48c) at cli.c:106
ASTERISK-2  0x0806c538 in ast_cli_command (fd=1, s=0x80d4a38 "reload") at cli.c:1007
ASTERISK-3  0x0808390b in main (argc=2, argv=0xbffff964) at asterisk.c:581


#0  0x4010ec1b in free () from /lib/libc.so.6
No symbol table info available.
#1  0x4010eaa3 in free () from /lib/libc.so.6
No symbol table info available.
#2  0x08088ff5 in ast_unregister_indication_country (country=0x0)
   at indications.c:303
       zone = (struct tone_zone *) 0x8158df8
       tz = (struct tone_zone *) 0x8158df8
       pz = (struct tone_zone *) 0x0
       tmp = (struct tone_zone *) 0x8150970
       res = 135596400
#3  0x4031cecc in reload () at res_indications.c:388
No locals.
#4  0x080557e4 in ast_module_reload () at loader.c:169
       m = (struct module *) 0x80f0588
ASTERISK-1  0x0806c75d in handle_reload (fd=1, argc=1, argv=0xbffff48c) at cli.c:106
No locals.
ASTERISK-2  0x0806c538 in ast_cli_command (fd=1, s=0x80d4a38 "reload") at cli.c:1007
       s = 0x81862f0 "\230"
       argv = {0x80ecd40 "reload", 0x0, 0x80d6790 "°²\016\b\030Y\035\bU",
 0x18 <Address 0x18 out of bounds>,
 0xbffff4cc "üôÿ¿â\231\t\bo`\r\b\204oÿ¿\220g\r\bS2\002@E`\r\b\204oÿ¿\foÿ¿\2251\
002@àú\002@", 0x80998fe "\203ÄôSè\211yûÿÿN\030\215eè[^ÉA\215v", 0x80d67a8 "",
 0x4002d0a0 " D\002@",
 0xbffff4cc "üôÿ¿â\231\t\bo`\r\b\204oÿ¿\220g\r\bS2\002@E`\r\b\204oÿ¿\foÿ¿\2251\
002@àú\002@", 0x40026686 "[\201AZ\224", 0x80d60f8 "", 0xbffff584 "ê",
 0x80b4e41 "/bin/sh", 0x4010138e "[\201Aºj\v", 0x80d0c48 "\220\n\r\b",
 0x80d0c48 "\220\n\r\b",
 0xbffff4fc "\\oÿ¿D¡\t\bo`\r\b\204oÿ¿8J\r\by[\002@8J\r\bDoÿ¿AN\v\b&\r\002@H~\e@
",
 0x80999e2 "\203Ä\020\213C\030;C\024~\004\205A\177ä1A\215eè[^ÉA\211öU\211å\203ì
\024S\213]\020\203Äôj è0sûÿ\211A\205U\177\0021UÇB\034", 0x80d60f8 "",
 0xbffff584 "ê", 0x80d6790 "°²\016\b\030Y\035\bU", 0x40023253 "1Aé\202",
 0x80d60c8 "o`\r\bê", 0xbffff584 "ê",
 0xbffff50c "8J\r\by[\002@8J\r\bDoÿ¿AN\v\b&\r\002@H~\e@",
 0x40023195 "[\201AKÉ", 0x4002fae0 "ì9\001", 0x401b5200 "\204*-û",
 0xbffff55c "\214oÿ¿\002:\b\bE`\r\b\204oÿ¿\n",
 0x809a144 "\211A\203úÿ\017\204\004\002", 0x80d60f8 "", 0xbffff584 "ê",
 0x80d4a38 "reload", 0x40025b79 "\213]èÉA\211öU\211å\203ì\024Sè",
 0x80d4a38 "reload", 0xbffff5d0 "\a", 0x80b4e41 "/bin/sh",
 0x40020d26 "[\201Aºí", 0x401b7e48 "\\}\021", 0x401b5200 "\204*-û",
 0x1 <Address 0x1 out of bounds>, 0x401b5200 "\204*-û", 0x0, 0x0,
 0xbffff57c "üoÿ¿R8\b\bê",
 0x40101434 "\213Eì\215eO[^_ÉA\220U\211å\203ì,WVSè", 0xbffff56c "\n", 0x0,
 0x401b5200 "\204*-û", 0x4010138e "[\201Aºj\v", 0x80d4a38 "reload",
 0xbffff5d0 "\a", 0xbffff58c "üoÿ¿\v9\b\b\001",
 0x8083a02 "\211ì]A\211öU\211å\203ì\030\203=\024G\f\b", 0x80d60c8 "o`\r\bê",
 0xbffff584 "ê", 0xa <Address 0xa out of bounds>, 0x80d4a38 "reload", 0x0,
 0x0, 0xbffff8fc "8ùÿ¿O\221\v@\002",
 0x8083852 "\203Ä \211U\211O\203â\003t\026z\017\203ú\002t\00580t-@80t(@80t#@\21
3\020\204Ot\034\204öt\027÷A", 0xea <Address 0xea out of bounds>,
 0x81425e0 "reload"}
       e = (struct ast_cli_entry *) 0x80c2d58
       x = 1
       dup = 0x80ecd40 "reload"
ASTERISK-3  0x0808390b in main (argc=2, argv=0xbffff964) at asterisk.c:581
       s = 0x80d4a38 "reload"
       title = "Asterisk Console on 'mhc-pbx' (pid 3378)\0é\001@AO\n@ìöÿ¿Od\0@ì
0\001@xf\n@E\005\003@ql\0@ì0\001@I\a\0\0è<\001@ql\0@\0\0\0\0,\004\0\0è<\001@\fó\
001@\234a\001@LI\001@è<\001@\0\0\0\0\0\0\0\0\b\0\0\0<\b\003@\002\0\0\0\224öÿ¿xf\
n@\f\a\003@{{\027\006{{\027\006èöÿ¿E\005\003@AO\n@,>\001@d¬E\006d¬E\0068÷ÿ¿,U\00
1@è<\001@ìöÿ¿2\226\0@"...
       argc = 135088696
       c = -104 '\230'
       filename = "/root/.asterisk_history", '\0' <repeats 56 times>
       hostname = "mhc-pbx\0<\b\003@\006\0\0\0\034\003\v@ oÿ¿<o\0@\0\0\0\0A\002
\v@xoÿ¿ql\0@iI\004\b\0.\0\0H_\n@Y\a\0\0o²\n@x1\n@E\005\003@\b\0\0\0<\b\003@\006\
0\0\0(oÿ¿O\235\004\b&ASTERISK-185;7\001@\017S\216\a\017S\216\a&ASTERISK-185;oÿ¿x6\001@\217O\004\bE\005\003
@\b\0\0\0H_\n@E\005\003@Xoÿ¿\230{\n@\f\a\003@taß\003taß\003ìoÿ¿E\005\003@oà\n@E\
005\003@\b\0\0\0\230{\n@>l\002@àú\002@ \216\e@\002\0\0\0\216ÿw\001Aoÿ¿"...
       tmp = "Asterisk Ready.\n", '\0' <repeats 63 times>, "@"
       xarg = 0x0
       x = 135815920
       f = (FILE *) 0x80d4a38
       sigs = {__val = {134238211, 0 <rep
       num = 7
       buf = 0x80d4a38 "reload"

By: jrollyson (jrollyson) 2004-01-09 01:46:08.000-0600

Crashed it again.

(gdb) bt
#0  0x0805238b in ast_sched_del (con=0x80f5d18, id=132) at sched.c:273
#1  0x404144ed in iax_destroy (callno=12) at chan_iax.c:1053
#2  0x4041485e in attempt_transmit (data=0x810f840) at chan_iax.c:1094
#3  0x0805204b in ast_sched_runq (con=0x80f5d18) at sched.c:376
#4  0x40421853 in network_thread (ignore=0x0) at chan_iax.c:4523
ASTERISK-1  0x400220ba in pthread_start_thread () from /lib/libpthread.so.0

By: jrollyson (jrollyson) 2004-01-09 01:51:17.000-0600

Seems its in chan_iax.so

[02:32] <citats> jrollyson: can you noload chan_iax and see if you can reproduce it?
[02:36] <jrollyson> 115 reloads later, * still standing.
[02:36] <jrollyson> I can't crash it that way anymore.
[02:37] <jrollyson> It won't die!

By: Brian West (bkw918) 2004-01-09 07:20:54.000-0600

Yes this is a problem with chan_iax which I think is about to go bye bye anyway.

By: ww (ww) 2004-01-12 12:23:47.000-0600

there have been some recent fixes imported for chan_iax and chan_iax2.
can you confirm that this is fixed now?

By: philipp2 (philipp2) 2004-01-19 15:18:13.000-0600

I took this from asterisk-users:

We were seeing hanging symptoms when the dns entries in resolv.conf were
not reachable. Don't know if this applies to you.

Tan
telappliant.com

By: jrollyson (jrollyson) 2004-01-28 00:40:26.000-0600

chan_iax will still eventually kill asterisk on consecutive reloads. As chan_iax is nearing retirement, I doubt this is going to be fixed. The solution is to noload chan_iax.so wherever possible, and use chan_iax2.so instead.