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
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
we had some __attribute__((__noreturn__))
and some __attribute__((noreturn))
I made them all: __attribute__((noreturn))
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2853 fd59a12c-fef9-0310-b244-a6a79926bd2f
trigger the dumping of flight data using:
corosync-objctl -w runtime.blackbox.dump_flight_data=anything
trigger the dumping of state using:
corosync-objctl -w runtime.blackbox.dump_state=anything
then read the flight data as usual:
corosync-fplay
This patch includes a wrapper script called:
corosync-blackbox
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2799 fd59a12c-fef9-0310-b244-a6a79926bd2f