[Home]

Summary:ASTERISK-14017: [patch] erros messages astobj2.c INTERNAL_OBJ
Reporter:pj (pj)Labels:
Date Opened:2009-04-27 03:22:20Date Closed:2009-05-12 17:49:21
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090507__DEBUG_issue14974.diff.txt
( 1) ami-logoff-ao2-crash.txt
( 2) ami-logoff-ao2-crash-bt-full.txt
( 3) ami-logoff-ao2-crash-manager-debug-bt-full.txt
( 4) manager.diff2
Description:after updating from Asterisk SVN-trunk-r183057 to Asterisk SVN-trunk-r190545
a lot of errors like below appears on console during asterisk startup and when sip peer registers (subscribe to hins)
it seems, that this issue doesn't affect normal asterisk operation.

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

[Apr 27 10:05:24] ERROR[1266]: astobj2.c:110 INTERNAL_OBJ: user_data is NULL
[Apr 27 10:05:24] ERROR[1284]: astobj2.c:110 INTERNAL_OBJ: user_data is NULL
[Apr 27 10:08:33] ERROR[1284]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x8082e34 for 0xb776ec98
[Apr 27 10:08:33] ERROR[1284]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x8082e34 for 0xb776ec98
[Apr 27 10:08:33]     -- Added extension '324' priority -1 to linestates (0x9a45578)
[Apr 27 10:08:33] ERROR[1284]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb780196b for 0xb776ec98
[Apr 27 10:08:33] ERROR[1284]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb780196b for 0xb776ec98
Comments:By: John Hass (john8675309) 2009-04-27 09:31:36

I also upgraded to the latest SVN SVN-trunk-r190545 and it is showing this error.  Let me know what I can do to help this system has active subscribers on it so I can get any data that you need.

By: Digium Subversion (svnbot) 2009-04-27 10:18:48

Repository: asterisk
Revision: 190586

U   trunk/main/manager.c

------------------------------------------------------------------------
r190586 | file | 2009-04-27 10:18:47 -0500 (Mon, 27 Apr 2009) | 10 lines

Fix a bug where we tried to send events out when no sessions container was present.

This commit stops a warning message (user_data is NULL) from getting output when
manager events get sent before manager is initialized. This happens because manager
is initialized *after* modules are loaded and the act of loading modules triggers
manager events.

(issue ASTERISK-14017)
Reported by: pj

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

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

By: Digium Subversion (svnbot) 2009-04-27 10:19:19

Repository: asterisk
Revision: 190589

_U  branches/1.6.2/

------------------------------------------------------------------------
r190589 | file | 2009-04-27 10:19:19 -0500 (Mon, 27 Apr 2009) | 16 lines

Blocked revisions 190586 via svnmerge

........
 r190586 | file | 2009-04-27 12:18:47 -0300 (Mon, 27 Apr 2009) | 10 lines
 
 Fix a bug where we tried to send events out when no sessions container was present.
 
 This commit stops a warning message (user_data is NULL) from getting output when
 manager events get sent before manager is initialized. This happens because manager
 is initialized *after* modules are loaded and the act of loading modules triggers
 manager events.
 
 (issue ASTERISK-14017)
 Reported by: pj
........

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

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

By: Joshua C. Colp (jcolp) 2009-04-27 10:26:59

I've fixed one error message but the other I have not been able to reproduce. Can you please do a "make distclean" and then build/install to see if it still exists. If so the complete console output would be extremely useful.

By: pj (pj) 2009-04-27 11:55:17

it seems, that something is broken now with subscribtions to hints
when I try to subscribe to hints using xlite softphone, asterisk becomes almost unresponsible over network, I don't know why, cpu is not overloaded, packet storm also doesn't occur,
all my contact in xlite phone book are displayed as unreachable
Asterisk SVN-trunk-r190586,
some output from my asterisk console

[Apr 27 18:53:12]     -- Registered SIP '743' at 85.160.95.17 port 5060
[Apr 27 18:53:12]        > Saved useragent "Twinkle/1.4.2" for peer 743
[Apr 27 18:53:12]   == Extension Changed 743[linestates] new state Idle for Notify User 324
[Apr 27 18:53:12]   == Extension Changed 743[linestates] new state Idle for Notify User 324p
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15]     -- Added extension '455' priority -1 to linestates (0x8c3da28)
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15]     -- Added extension '734' priority -1 to linestates (0x8c3da28)
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15] ERROR[19576]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0xb781694b for 0xb7783c98
[Apr 27 18:53:15]     -- Added extension '628' priority -1 to linestates (0x8c3da28)


[Apr 27 18:41:22]     -- Registered SIP '324p' at 193.85.164.154 port 10438
[Apr 27 18:41:23]        > Saved useragent "X-Lite release 1100l stamp 47546" for peer 324p
[Apr 27 18:41:31]     -- Incoming call: Got SIP response 400 "Bad Request(Multiple values in single-value header Event)" back from 193.85.164.154
[Apr 27 18:41:32]     -- Incoming call: Got SIP response 400 "Bad Request(Multiple values in single-value header Event)" back from 193.85.164.154
[Apr 27 18:41:33]     -- Incoming call: Got SIP response 400 "Bad Request(Multiple values in single-value header Event)" back from 193.85.164.154
[Apr 27 18:41:33]     -- Incoming call: Got SIP response 400 "Bad Request(Multiple values in single-value header Event)" back from 193.85.164.154

By: pj (pj) 2009-04-27 11:57:24

I'm using pattern match for hints feature to define hints in dialplan.

context linestates {
       hint(SIP/${EXTEN}) _ZXX! => ;
}

By: John Hass (john8675309) 2009-04-27 12:47:53

I did a svn up and a make distclean I can confirm that the null userdata is definetly gone, however:

[Apr 27 14:18:12] ERROR[31421]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xb49201a8
[Apr 27 14:18:12] ERROR[31421]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xb49201a8
[Apr 27 14:18:12] ERROR[31421]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xb49201a8
[Apr 27 14:18:12] ERROR[31421]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xb49201a8


is still going crazy! As many as 170 a second. I am not using hinging at all.

By: pj (pj) 2009-04-30 04:23:00

feedback was given, so please change status of this bugreport from 'feedback', so that someone can work on this to resolve this issue. thanks

By: snuffy (snuffy) 2009-04-30 20:57:27

I've assigned to you file since you provided the initial fix.
Please unassign if you cannot continue to help with this bug

By: Tilghman Lesher (tilghman) 2009-05-07 16:03:07

Please patch this, along with running "./configure --enable-dev-mode" to provide additional debugging information as to where the fault lies.

By: Dwayne Hubbard (dhubbard) 2009-05-07 17:05:05

I'm seeing an issue that is probably related to this issue.  The ao2 messages that I'm seeing were introduced in revision 190349.  I can crash Asterisk by logging into and out of a manager session without doing anything in that manager session.  I'm uploading console output and a backtrace (ami-logoff-ao2-crash.txt)

By: pj (pj) 2009-05-08 14:11:55

sad, it doesn't compile with applied patch 20090507__DEBUG_issue14974.diff.txt

  [LD] hashtest2.o md5.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o -> hashtest2
astobj2.o: In function `INTERNAL_OBJ':
/root/src/asterisk193348/utils/astobj2.c:117: undefined reference to `ast_backtrace'
collect2: ld returned 1 exit status
make[1]: *** [hashtest2] Error 1
make: *** [utils] Error 2

By: Dwayne Hubbard (dhubbard) 2009-05-12 07:28:09

In my opinion, this issue should be upgraded from a 'minor' severity to 'crash' or at least 'major'.

You can crash Asterisk by simply connecting and disconnecting a manager session.

Matt Nicholson confirmed to me over IRC that he also reproduced the crash by connecting and disconnecting a manager session.  You don't have to do anything in the manager session to reproduce this crash.

By: Eliel Sardanons (eliel) 2009-05-12 09:55:46

dhubbard: Could you try the uploaded patch 'manager.diff'?

Thanks!



By: Dwayne Hubbard (dhubbard) 2009-05-12 10:04:22

eliel, manager.diff does not resolve the issue.

By: Matthew Nicholson (mnicholson) 2009-05-12 11:19:52

I don't believe these error messages are related to the manager crash (although similar messages are produced when connecting to and using the manager). See bug ASTERISK-14111.

By: Eliel Sardanons (eliel) 2009-05-12 15:02:23

I new patch was uploaded. And with it a review request: http://reviewboard.asterisk.org/r/248

By: Digium Subversion (svnbot) 2009-05-12 17:49:18

Repository: asterisk
Revision: 194060

U   trunk/main/manager.c

------------------------------------------------------------------------
r194060 | eliel | 2009-05-12 17:49:18 -0500 (Tue, 12 May 2009) | 22 lines

Fix a crash when logging out from the AMI and avoid astobj2 warning messages.

When the user logout the session was being destroyed twice and the file
descriptor was being closed twice. The sessions reference counter wasn't
used in a proper way.
The 'mansession' structure was being treated as an astobj2 and we were
calling ao2_lock/ao2_unlock causing astobj2 report a warning message and
not locking the structure.
Also we were using an ugly naming convention 'destroy_session',
'session_destroy', 'free_session', ... all this "duplicated" code was merged.

(closes issue ASTERISK-14017)
Reported by: pj
Patches:
     manager.diff2 uploaded by eliel (license 64)
     Tested by: dhubbard, eliel, mnicholson

(closes issue ASTERISK-14111)
Reported by: eliel

Review: http://reviewboard.asterisk.org/r/248/

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

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