[Home]

Summary:ASTERISK-00720: asterisk crash at start up if chan_zap.o failed to load
Reporter:mochouinard (mochouinard)Labels:
Date Opened:2003-12-28 13:05:55.000-0600Date Closed:2008-01-15 14:40:50.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20040111__chan_zap_bugfix_726.diff.txt
Description:I created a zaptel.conf with a channel that doesn't exist and asterisk crash on start

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

WARNING[1074415360]: File loader.c, Line 312 (ast_load_resource): chan_zap.so: load_module failed, returning -1
Segmentation fault
Comments:By: zoa (zoa) 2003-12-28 13:34:28.000-0600

i prefer it to crash than to load normally :)

By: mochouinard (mochouinard) 2003-12-28 14:02:41.000-0600

Hope your joking hehe ;)

Segment fault is never good, mean some error or something is not well handled.  Witch could cause problem in different situation.

I would like better a normal exit of asterisk and saying the channel you configure isn't a valid one or something

By: Brian West (bkw918) 2003-12-28 14:31:19.000-0600

It doesn't crash if you configure you zaptel and zapata correctly.

By: mochouinard (mochouinard) 2003-12-28 16:36:30.000-0600

It shouldn't still crash, it can stop, exit loading or what ever, but not crash.  Like I said earlyer, crash mean memory or error checking or something wasn't done correctly.

By: Tilghman Lesher (tilghman) 2003-12-28 17:20:46.000-0600

What exactly is wrong with your zapata.conf?  I've always had Asterisk die, but not crash on this error.

By: mochouinard (mochouinard) 2003-12-28 17:39:41.000-0600

put a channel =>99
and 99 isn't a valid channel, it will crash on load..

By: jrollyson (jrollyson) 2004-01-09 01:14:54.000-0600

While a crash isn't good, Asterisk uses the zaptel device for timing, and certian features break without it. Also, in a common VoIP internal/Zap external configuration, a zaptel failure means no outside lines, so refusing to load under these circumstances may be appropriate. In any case, the messages that preceed give someone a good idea of what the problem is.

By: Brian West (bkw918) 2004-01-09 11:20:44.000-0600

Bug 736 has been applied please let me know if that helps.

By: mochouinard (mochouinard) 2004-01-10 01:26:28.000-0600

I tested it again with CVS-01/10/04-02:10:44 and problem still occur

By: Tilghman Lesher (tilghman) 2004-01-11 20:50:28.000-0600

Can you post a 'bt full' from the corefile you get?  That would really help us squash this bug.

By: mochouinard (mochouinard) 2004-01-11 22:49:55.000-0600

Here you go
WARNING[1074398976]: File loader.c, Line 312 (ast_load_resource): chan_zap.so: load_module failed, returning -1

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074398976 (LWP 21158)]
0x4002611e in pthread_cancel () from /lib/tls/libpthread.so.0
(gdb) bt full
#0  0x4002611e in pthread_cancel () from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x41df8f5b in __unload_module () at chan_zap.c:6976
       p = (struct zt_pvt *) 0xfffffffe
       pl = (struct zt_pvt *) 0xfffffffe
#2  0x08054ece in ast_unload_resource (resource_name=0x80e5c27 "chan_zap.so", force=0) at loader.c:124
       m = (struct module *) 0x8103ff0
       ml = (struct module *) 0x0
       res = 0
#3  0x08055385 in ast_load_resource (resource_name=0x80e5c27 "chan_zap.so") at loader.c:313
       fn = "/usr/lib/asterisk/modules/chan_zap.so\000o\000\000so\000a.so", '\0' <repeats 207 times>
       errors = 0
       res = -2
       m = (struct module *) 0x0
       flags = 0
       val = 0xfffffffe <Address 0xfffffffe out of bounds>
       key = 0x0
       o = 0
       cfg = (struct ast_config *) 0x8103ff0
       tmp = "íA\000\000\002\000\000\b\000\020\000\000\000\000\000\000 \000\000\000(\000\000\000°\r\000\000tg\016\b\214d\016\bÄY\016\b\000\020\000\000\000\000\000\000ÄY\016\b\n\000\000\000ì\006\n@Øù\r\bt\217\v\b&uml;Y\016\bHáÿ¿\034i\005\b"
#4  0x08055b5e in load_modules () at loader.c:406
       cfg = (struct ast_config *) 0x80dd588
       v = (struct ast_variable *) 0x8103ff0
       tmp = '\0' <repeats 44 times>, "ô\003\000\000\024^\f\b\027\000\000\000èáÿ¿\217£\006\b\024^\f\b\020ª\006\bÕR\v\bà:\v\b"
ASTERISK-1  0x080836f3 in main (argc=-1073749184, argv=0x0) at asterisk.c:1421
       c = -2 'þ'
       filename = "/root/.asterisk_history", '\0' <repeats 56 times>
       hostname = "asterisk.m0c.com\000\000\000\000\224)\023B \000\000\000t\016\001B`&frac12;\000BÀ3\000Bðé\001@\b\000\000\000,í\001@ðT\001@\224X\001@\aÒ\004\b0åÿ¿v\206\000@\aÒ\004\b\216ÿw\001è&cedil;\004\bàäÿ¿HX\001@\006\000\000\000pí\001@\000\000\000\000\001", '\0' <repeats 12 times>, "(no äÿ¿\000\000\000\000 \000\000\000\000\000\200\000ÿÿÿÿÐ.\002@\000\000\000\000\001\000\000\000\000\000\000\000\237\205\000@ðT\001@S\037\000\000àäÿ¿\fåÿ¿\003Ä\000@\214ë\001@\000\000\000\000\216ÿw\001påÿ¿øV\001@\000\000"...
       tmp = "À3\000Bðé\001@\b\000\000\000,í\001@ðT\001@\214ë\001@³Ü\000B&frac14;äÿ¿v\206\000@³Ü\000B\202\211¹\npj\000Bläÿ¿A\231\000@GÎ\004\b¬é\001@û\230\000@ðT\001@xç\001@\000\000\000"
       xarg = 0x1 <Address 0x1 out of bounds>
       x = 3
       f = (FILE *) 0xbfffe340
       sigs = {__val = {134238211, 0 <repeats 31 times>}}
       num = 0
       buf = 0xbfffe340 "\003P"
ASTERISK-2  0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
No symbol table info available.

By: mochouinard (mochouinard) 2004-01-11 23:39:13.000-0600

Nice, it exit but doesn't segmentent fault.

Is a exiting message necesarry ?

By: Brian West (bkw918) 2004-01-12 00:10:12.000-0600

Fixed in CVS please confirm.

By: Digium Subversion (svnbot) 2008-01-15 14:40:50.000-0600

Repository: asterisk
Revision: 1976

U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r1976 | jeremy | 2008-01-15 14:40:50 -0600 (Tue, 15 Jan 2008) | 2 lines

fix monitor thread. Bug ASTERISK-720

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=1976