[asterisk-dev] Error msg: Asterisk is not Thread safe

Patrick asterisk-list at puzzled.xs4all.nl
Sun Dec 7 05:52:44 CST 2008


Tilghman Lesher wrote:
> 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

Results from a test on Fedora 10 x86_64 with glibc 2.9 and gcc 4.3.2:

[patrick at localhost Desktop]$ gvim testcase
testcase    testcase.c
[patrick at localhost Desktop]$ gvim testcase.c
[patrick at localhost Desktop]$ ./testcase
LOCK test_for_thread_safety:60 res=0
LOCK test_for_thread_safety:63 res=0
UNLOCK test_for_thread_safety:72 res=0
LOCK test_thread_body:23 res=0
test_thread_body:26 lock_count=11 != 10
LOCK test_thread_body:30 res=0
test_thread_body:33 lock_count=21 != 20
UNLOCK test_for_thread_safety:80 res=0
test_for_thread_safety:83 lock_count=20 != 0
UNLOCK test_thread_body:38 res=0
UNLOCK test_thread_body:45 res=0
Mutexes do not behave as recursive mutexes.

No idea what it all means but I hope this helps.

Regards,
Patrick



More information about the asterisk-dev mailing list