[Home]

Summary:ASTERISK-16428: bad magic number : loops indefinitly
Reporter:Barry GATEFAIT (bwg)Labels:
Date Opened:2010-07-25 19:38:45Date Closed:2010-09-20 19:03:52
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bad_magic_number_gdb_trace.rtf
( 1) bwg-full.txt
( 2) bwg-valgrind.txt
( 3) locks_status_20100726.rtf
Description:Hi,

Every now and again (i.e. after a few days), we have the following message that displays indefinitly :

ERROR[9933]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x21c1508.

Eventhough, we had a similar error in the past, it seems that this one is different. Not withstanding the fact that the previous "bad majic number" error had its symptomes fixed but not the cause.

Have attached a core dump at the time it happened.

Cheers,
Comments:By: Paul Belanger (pabelanger) 2010-07-25 22:17:45

We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trunk/doc/HOWTO_collect_debug_information.txt

By: Barry GATEFAIT (bwg) 2010-07-26 01:46:42

Severity is high, as when "bad magic number :" message appears, it firstly loops indefinitly and secondly prevents Asterisk to function at a minimum i.e. to make a call. Asterisk has to be restarted.

By: Paul Belanger (pabelanger) 2010-07-26 07:55:31

Severity represents the number of people affected, not urgency of issue.  Regardless, if the development team determines this to be a 'blocker' we will triage it according.

In the future, please attach your files as .txt format (easier to read in VI).

By: Leif Madsen (lmadsen) 2010-07-29 14:59:34

This is a good candidate for being reproduced under valgrind. Do you have the ability to do that? It would allow us to move this issue forward. Please see doc/valgrind.txt in your Asterisk source for more information. Thanks!

By: Barry GATEFAIT (bwg) 2010-08-04 22:53:08

Have setup/ran valgrind but had to stop it right away as the audio quality was too bad and people/managers complained about it ...

By: Barry GATEFAIT (bwg) 2010-08-08 19:05:34

Have sent a valgrind trace but not sure if it's sufficient as debugging stopped after a few minutes ... Cheers,

By: Barry GATEFAIT (bwg) 2010-08-08 19:17:08

Sent a /var/log/asterisk/full file as well.

By: Carsten Kraemer (anbeca) 2010-08-30 10:31:38

I have the same error about once every day.

By: Leif Madsen (lmadsen) 2010-09-09 12:26:20

anbeca: are you able to reproduce on a lab system and provide a valgrind trace? I'm going to ask a developer to see if what was provided is useful.

By: Stefan Schmidt (schmidts) 2010-09-09 19:04:41

please add the output of sip show objects (could be large) too.
maybe we could see the wrong dialog in there which cause this bad magic number.

and it doesnt run infinitly, just be written every 2 or 3 ms (300 times a second) if there is a bad dialog in the container until this dialog is gone.

By: Carsten Kraemer (anbeca) 2010-09-10 07:12:09

Hi
we are crazy enough to test this in our production environment :)
How can I do such a trace? Is there a documentation?

We are about 5 people using this asterisk installation and we all think that this error often occurs when hanging up. Up to now we never had problems during a call but trying to make another call right after the first one often fails.

By: Leif Madsen (lmadsen) 2010-09-13 10:55:32

Look in the doc/ directory -- there is a HOWTO on producing debugging information

~~~~~~

We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trunk/doc/HOWTO_collect_debug_information.txt

By: Digium Subversion (svnbot) 2010-09-20 17:21:51

Repository: asterisk
Revision: 287661

U   branches/1.8/main/channel.c

------------------------------------------------------------------------
r287661 | alecdavis | 2010-09-20 17:21:51 -0500 (Mon, 20 Sep 2010) | 14 lines

ast_do_masquerade. Keep channels ao2_container locked while unlink and linking channels.

Previously, Masquerade would unlock 'original' and 'clonechan' and allow another masq thread to run.
End result would be corrupted memory, and the frequent report 'Bad Magic Number'.

(closes issue ASTERISK-16512,ASTERISK-16428)
Reported by: notthematrix
Patches:
     Based on bug17801.diff1.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/928


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

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

By: Digium Subversion (svnbot) 2010-09-20 17:24:52

Repository: asterisk
Revision: 287671

_U  trunk/
U   trunk/main/channel.c

------------------------------------------------------------------------
r287671 | alecdavis | 2010-09-20 17:24:52 -0500 (Mon, 20 Sep 2010) | 20 lines

Merged revisions 287661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r287661 | alecdavis | 2010-09-21 10:21:50 +1200 (Tue, 21 Sep 2010) | 14 lines
 
 ast_do_masquerade. Keep channels ao2_container locked while unlink and linking channels.
 
 Previously, Masquerade would unlock 'original' and 'clonechan' and allow another masq thread to run.
 End result would be corrupted memory, and the frequent report 'Bad Magic Number'.
 
 (closes issue ASTERISK-16512,ASTERISK-16428)
 Reported by: notthematrix
 Patches:
       Based on bug17801.diff1.txt uploaded by alecdavis (license 585)
 Tested by: alecdavis
 
 Review: https://reviewboard.asterisk.org/r/928
........

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

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

By: Alec Davis (alecdavis) 2010-09-20 19:03:51

Fixed in 1.8 and trunk - see commit notices.
Please reopen if after running a later version you still have the same issue.