you're probably right but I wonder what you are doing that is binding and unbinding so much?
Please post it to jira.freeswitch.org/bOn Nov 28, 2011, at 2:31 AM, Karol Golab wrote:
Hi!
I've noticed some strange code in src/switch_event.c - could someone
smarter (& knowing the mentioned code) please take a look?
The problem is in the order of calls to locks BLOCK & RWLOCK - it
differs between functions:
switch_event_bind_removable
switch_mutex_lock(BLOCK);
switch_thread_rwlock_wrlock(RWLOCK);
switch_event_unbind_callback
switch_thread_rwlock_wrlock(RWLOCK);
switch_mutex_lock(BLOCK);
switch_event_unbind
switch_thread_rwlock_wrlock(RWLOCK);
switch_mutex_lock(BLOCK);
As I understand this may lead to an outright deadlock between bind
and unbind.
I stumbled upon this code while debugging what seems like deadlocks
in our test FS installation put under some heavy load. The load is about
25 new event subscribers per second (destroyed few seconds later) and
about 700 events per second.
Regards,
Karol
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org