[Home]

Summary:ASTERISK-07869: Crash in mutex lock on 64-bit platform
Reporter:Roy Sigurd Karlsbakk (rkarlsba)Labels:
Date Opened:2006-10-04 07:21:27Date Closed:2007-02-15 12:19:52.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace.txt
( 1) chan_sip.c
Description:I've seen this a few times after upgrading to 1.2.12.1. Asterisk crashes every now and then.
Comments:By: Roy Sigurd Karlsbakk (rkarlsba) 2006-10-04 12:32:45

Are you sure this is 64bit related?

#2  0x00002aaaabbbcd3b in expire_register (data=0x2aaab7c4493c) at chan_sip.c:5791
       newcount = 0
       peer = (struct sip_peer *) 0x0
       __PRETTY_FUNCTION__ = "expire_register"

and line 5791 is

ASTOBJ_UNREF(peer, sip_destroy_peer);

having peer = (struct sip_peer *) 0x0.. ?

By: Joshua C. Colp (jcolp) 2006-10-04 12:43:25

Was this unoptimized? I downloaded a fresh copy of the 1.2.12.1 tag and the line numbers do no match up at all.

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-10-04 13:07:55

Unoptimized, yes, but with a few custom patches. No, I cannot try without them, since our customers need the jitterbuffer, and that's been running stably for half a year

roy

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-10-12 11:19:46

since this bug clearly came when upgrading from 1.2.10 to 1.2.12.1, can someone please take a look at it?

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-10-18 06:53:17

I'm having this one almost daily now, and each backtrace is identical to the one attached.

By: Olle Johansson (oej) 2006-10-27 12:25:08

Running realtime?

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-10-29 13:29:17.000-0600

indeed

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-07 10:44:59.000-0600

a new crash again on 1.2.13, backtrace equals the former one

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-13 04:13:31.000-0600

crashing once or twice a week now.
can someone please take a look at this?

By: Olle Johansson (oej) 2006-11-13 13:24:27.000-0600

Please check the source. Expire_register in 1.2 now returns if peer is null. Do you have that in your code? What's on line 5791 in your source?

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-14 04:34:24.000-0600

I added an ast_log(LOG_WARNING, "expire_register() called with a NULL peer\n") to the code, so i can see if this fixes the error.

I guess I'll see something within a few days

thanks

roy

By: Olle Johansson (oej) 2006-11-14 06:58:55.000-0600

(Note to the public: See how he did not answer my question about the line in the source... Wonder if he's using a severly patched broken Asterisk. he he)

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-14 07:55:58.000-0600

bah. whatever.

The version has been quite stable before the update, as I have mentioned earlier. It seems it's a new trend to add new bugs in all new releases as older ones are fixed........

By: Olle Johansson (oej) 2006-11-14 08:15:05.000-0600

Roy: Abusing developers doesn't really make them willing to help... be careful, this is open source and people are giving their time to help you.

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-14 09:35:43.000-0600

I don't abuse developers, unless you call reporting bugs abusment. Also, this was really not 64bit related, so since I'm whining about that, please reduce my karma a little more

roy

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-15 12:58:33.000-0600

new crash:

#0  0x00002aaaaaccc8d0 in pthread_mutex_lock () from /lib/libpthread.so.0
No symbol table info available.
#1  0x00002aaaabbaab77 in ast_mutex_lock (pmutex=0x60) at lock.h:601
No locals.
#2  0x00002aaaabbbd0a7 in expire_register (data=0x2aaab78ee1ac) at chan_sip.c:5838
       newcount = 0
       peer = (struct sip_peer *) 0x0
       __PRETTY_FUNCTION__ = "expire_register"
#3  0x000000000041279e in ast_sched_runq (con=0x67a4bc) at sched.c:373
       current = (struct sched *) 0x2aaab8117d3c
       tv = {tv_sec = 1163587595, tv_usec = 602005}
       x = 0
       res = 7066716
#4  0x00002aaaabbd6658 in do_monitor (data=0x0) at chan_sip.c:11639
       res = 1
       sip = (struct sip_pvt *) 0x0
       peer = (struct sip_peer *) 0x0
       t = 1163587595
       fastrestart = 0
       lastpeernum = -1
       curpeernum = 1583
       reloading = 0
       __PRETTY_FUNCTION__ = "do_monitor"
ASTERISK-1  0x00002aaaaaccab55 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
ASTERISK-2  0x00002aaaab3d57f0 in clone () from /lib/libc.so.6

By: Olle Johansson (oej) 2006-11-15 14:36:00.000-0600

Roy, in order to help you I need to know what you're running. Either try with a *clean* svn trunk for 1.4 or upload the chan_sip.c you are using, since I can't see this happening on that line of chan_sip.c

By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-16 05:16:16.000-0600

Here you go

As mentioned earlier, we simply cannot run without a jitterbuffer, since this will piss our customers off, and we'll lose them.

roy

By: Olle Johansson (oej) 2006-11-16 08:24:41.000-0600

I know Roy, and you know that I know - but I can't guess the line numbers of that file and you need my help... Calm down, please.

By: Olle Johansson (oej) 2006-11-16 08:40:13.000-0600

Thanks for uploading. Seems like something is expiring the peer at the same time or - I don't know really. The crash is in ASTOBJ macros.

Line 5838 isn't in the expire_register function - are you sure this is the file?

Hmm. What settings to you have for registration expiry and realtime caching?

By: Tilghman Lesher (tilghman) 2006-12-11 00:17:08.000-0600

Housekeeping ping.  Roy, do you have responses to oej's queries?

By: Olle Johansson (oej) 2007-02-15 11:49:35.000-0600

Is this still a problem or can we close this bug report?

By: Olle Johansson (oej) 2007-02-15 12:19:52.000-0600

Closing in agreement with reporter.