1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/daemons/clvmd
Alasdair G Kergon f2eda36cfa clvmd: Fix client list corruption
Centralise editing of the client list into _add_client() and
_del_client().  Introduce _local_client_count to track the size of the
list for debugging purposes.  Simplify and standardise the various ways
the list gets walked.

While processing one element of the list in main_loop(),
cleanup_zombie() may be called and remove a different element, so make
sure main_loop() refreshes its list state on return.  Prior to this
patch, the list edits for clients disappearing could race against the
list edits for new clients connecting and corrupt the list and cause a
variety of segfaults.

An easy way to trigger such failures was by repeatedly running shell
commands such as:
  lvs &; lvs &; lvs &;...;killall -9 lvs; lvs &; lvs &;...

Situations that occasionally lead to the failures can be spotted by
looking for 'EOF' with 'inprogress=1' in the clvmd debug logs.
2017-07-01 01:34:38 +01:00
..
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
clvm.h gcc: cleanup Wunused-const-variable 2016-02-23 14:41:24 +01:00
clvmd-cman.c doc: change fsf address 2016-01-21 12:11:37 +01:00
clvmd-command.c clvmd: add client id to debug log messages 2017-07-01 01:17:40 +01:00
clvmd-common.h doc: change fsf address 2016-01-21 12:11:37 +01:00
clvmd-comms.h doc: change fsf address 2016-01-21 12:11:37 +01:00
clvmd-corosync.c clvmd: add mutex protection for cpg_ call 2017-02-05 17:55:37 +01:00
clvmd-openais.c doc: change fsf address 2016-01-21 12:11:37 +01:00
clvmd-singlenode.c doc: change fsf address 2016-01-21 12:11:37 +01:00
clvmd.c clvmd: Fix client list corruption 2017-07-01 01:34:38 +01:00
clvmd.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-functions.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-functions.h doc: change fsf address 2016-01-21 12:11:37 +01:00
Makefile.in doc: change fsf address 2016-01-21 12:11:37 +01:00
refresh_clvmd.c doc: change fsf address 2016-01-21 12:11:37 +01:00
refresh_clvmd.h doc: change fsf address 2016-01-21 12:11:37 +01:00