[asterisk-dev] Error msg: Asterisk is not Thread safe
Kaloyan Kovachev
kkovachev at varna.net
Sun Dec 7 03:32:33 CST 2008
It looks like glibc-2.7's fault:
Slackware 12.1
LOCK test_for_thread_safety:60 res=0
LOCK test_for_thread_safety:63 res=0
UNLOCK test_for_thread_safety:72 res=0
UNLOCK test_for_thread_safety:80 res=0
LOCK test_thread_body:23 res=0
LOCK test_thread_body:30 res=0
UNLOCK test_thread_body:38 res=0
UNLOCK test_thread_body:45 res=0
test_for_thread_safety:89 lock_count=20 != 0
Mutexes do not behave as recursive mutexes.
Slamd64 12.1
LOCK test_for_thread_safety:60 res=0
LOCK test_for_thread_safety:63 res=0
UNLOCK test_for_thread_safety:72 res=0
UNLOCK test_for_thread_safety:80 res=0
LOCK test_thread_body:23 res=0
LOCK test_thread_body:30 res=0
UNLOCK test_thread_body:38 res=0
UNLOCK test_thread_body:45 res=0
test_for_thread_safety:89 lock_count=10 != 0
Mutexes do not behave as recursive mutexes.
both use 'gcc version 4.2.3' and glibc-2.7. One strange thing is that running
it several times gives 'A-okay' most of the time, but an error with lock count
10 or 20 (different each time) just rarely - probably that's why the message
is not shown frequently
On Sat, 6 Dec 2008 17:23:52 -0600, Tilghman Lesher wrote
> On Saturday 06 December 2008 13:20:51 Derek Smithies wrote:
> > Hi,
> > Terry - more details please.
> >
> > What hardware cards are in your machine - how many active lines etc..
> >
> > What driver/svn version etc?
> >
> > It might be mobo specific.. It might be memory related.
> >
> > It could be compiler specific.
> >
> > Can whoever is getting these thread messages please report what exactly
> > they have on their box too please..
>
> I have the actual code converted into an independent source file, with
> debugging messages, so you can see where the error lies. I have attached
> the C source here. You can compile this with:
> gcc -o testcase -pthread testcase.c
>
> This appears to be a problem on Ubuntu 8.04 and 8.10, while 7.10 is okay.
> Also, Debian Lenny does not appear to manifest this issue. Of note is that
> Ubuntu 7.10 uses glibc version 2.6.1, while 8.04 and 8.10 both use glibc 2.7.
> It would be helpful for several people on different distributions to run this
> testcase program, and report back the distribution name, version, and glibc
> version on that machine. My suspicion is that this is either a glibc issue
> that Debian has fixed and has not made its way into Ubuntu yet, or else
> Ubuntu introduced this problem downstream of Debian. Knowing whether
> other distributions on glibc 2.7 also have this issue will help us isolate
> the cause.
>
> --
> Tilghman
More information about the asterisk-dev
mailing list