[Home]

Summary:ASTERISK-05072: Asterisk crashes with any Sipura ATA connected to AMD64 system
Reporter:Joseph_s (joseph_s)Labels:
Date Opened:2005-09-13 09:39:39Date Closed:2008-01-15 15:47:55.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt_full_2.txt
( 1) bt_full_3.txt
( 2) bt_full.txt
( 3) thread_apply_all_bt.txt
Description:Asterisk 1.0.8 or 1.0.9 compile just fine on AMD64, but when I try to connect
any Sipura ATA (SPA-3000 or SPA-2002) Asterisk just crashes with output:
Killed
It seems to me it is killing Asterisk PID.


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

Enclosed are two process core files:
bt_full.txt
thread_apply_all_bt.txt
Comments:By: Mark Spencer (markster) 2005-09-13 10:23:37

Does th eproblem occur in CVS head?

By: Michael Jerris (mikej) 2005-09-13 10:28:17

As I stated in e-mail.  Please re-create the the backtrace for cvs head.

By: Joseph_s (joseph_s) 2005-09-13 11:20:10

OK, bt_full_3.txt is from latest development version.
I used this command to download it:
cvs checkout zaptel libpri asterisk asterisk-sounds asterisk-addons

If this is not the one, I need more instruction which one to check it out.

Regards,
#Joseph

By: stkn (stkn) 2005-09-13 11:58:08

Seems the root of the problem is within utils.c:402

ast_strcasestr:

 changing:
    return ((char *)((unsigned int)haystack + (unsigned int)(offset - u1)));

 into:
    return ((char *)((unsigned long)haystack + (unsigned long)(offset - u1)));

appearently fixed it on my amd64 box (my zyxel ATA wasn't able to crash * after changing this line and recompiling, crashed on each register attempt before)

By: Joseph_s (joseph_s) 2005-09-13 12:30:41

Confirm.  This fixes the problem.

It was quick one, thanks.
#Joseph

By: Russell Bryant (russell) 2005-09-13 19:34:25

fixed in 1.0 CVS

This was already fixed in CVS HEAD.  I guess it was just one of those that I missed that didn't go through the bug tracker.

By: Digium Subversion (svnbot) 2008-01-15 15:47:55.000-0600

Repository: asterisk
Revision: 6570

U   branches/v1-0/utils.c

------------------------------------------------------------------------
r6570 | russell | 2008-01-15 15:47:55 -0600 (Tue, 15 Jan 2008) | 2 lines

fix crash on amd64 (issue ASTERISK-5072)

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

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