should only be reset when a real token is received or membership protocol
could run into problems with certain timing parameters.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2988 fd59a12c-fef9-0310-b244-a6a79926bd2f
Patch fixes following situation:
1. objdb receives reload notification and ends in function
object_reload_config. This will call objdb_wrlock. I will call this
thread #1
2. Another thread will decide to update corosync statistics and calls
object_key_increment. This calls objdb_rdlock. This thread is #2. But
because condition (lock_thread != pthread_self()) is satisfied, it will
also calls pthread_rwlock_rdlock. This will blocks, because thread #1
holds the lock.
3. object_reload_config will call reload functions (as real example
xml2objdb). xml2objdb needs to calls object_create. This calls
objdb_rdlock, but will hang on pthread_mutex_lock(&meta_lock), because
this lock is held by thread #2.
-> deadlock
It is handled by using recursive mutex.
Also every function is now really locked.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2963 fd59a12c-fef9-0310-b244-a6a79926bd2f
Corosync has problem with readdir_r if pathconf function fails.
Main problem is hidden in calling pathconf (internally calls statfs)
which may fail. After this fail, newly allocated memory for readdir_r
was smaller than expected and memory was overwritten by readdir_r.
Patch removes calling of pathconf and rather use NAME_MAX constant which
is always large enough for all file systems.
Also return value of malloc SHOULD be checked.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2962 fd59a12c-fef9-0310-b244-a6a79926bd2f
Send CPG_REASON_PROCDOWN on process left
Our manual pages are clear:
CPG_REASON_PROCDOWN - the process left a group without calling
cpg_leave().
Currently, we are sending CPG_REASON_LEAVE in such situation.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2946 fd59a12c-fef9-0310-b244-a6a79926bd2f
Move configure to %build section
don't set corosync's init levels during an upgrade of the corosync package
Patch from Vadym Chepkov
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2943 fd59a12c-fef9-0310-b244-a6a79926bd2f
reject retransmitted tokens
if token.aru = aru in token on last rotation ... do some logic
Here is how the current code works:
last_aru = instance->my_last_aru;
instance->my_last_aru = token->aru;
reject retransmitted tokens
if token.aru = aru in token on last rotation ... do some logic
The issue is last_aru will be set to token->aru when a token retransmission
occurs before a new token arrives.
This results in the "do some logic" part happening more often then it should.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2917 fd59a12c-fef9-0310-b244-a6a79926bd2f
'dump_subsys_config()' which is is turn used by the static function
'dump_full_config()' which is never used.
Are these functions used by someone using some magic? I did not find
any reference and even the flag LOGSYS_DEBUG, which prevents them from
compiling, does not exist at some other point.
If these functions are really not used, please remove them (because at
least one of them has a buffer overflow). Patch against 1.2.3
is attached.
If there is a need for these functions, I'll send a patch to fix
the 'decode_mode()' function.
Kind regards
Andreas Florath
Signed-off-by: Andreas Florath <gnu4u at flonatel dot org>
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2915 fd59a12c-fef9-0310-b244-a6a79926bd2f
This patch unify behaviour of SYS V semaphores and POSIX semaphores.
POSIX semaphores never return CS_ERR_TRY_AGAIN on EINTR and keeps
waiting. This was fixed for SYS V semaphores in rev. 2303.
Another change is to remove very small probability of hung forever in
coroipcc_dispatch_put.
Last change is removal of duplicate code by adding ipc_sem_wait function.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2907 fd59a12c-fef9-0310-b244-a6a79926bd2f
in corosync.conf to explicitly state that you need to use
the network address, as opposed to "should always end in
zero", which is only correct for class C networks.
Regards,
Tim
--
Tim Serong <tserong@novell.com>
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2856 fd59a12c-fef9-0310-b244-a6a79926bd2f