[libvirt] [PATCH 1/2] Avoid taking lock in libvirt debug dump

Daniel Veillard veillard at redhat.com
Thu Mar 17 07:41:23 UTC 2011


As pointed out, locking the buffer from the signal handler
cannot been garanteed to be safe, so to avoid any hazard
we prefer the trade off of dumping logs possibly messed up
by concurrent logging activity rather than risk a daemon
crash.

* src/util/logging.c: change virLogEmergencyDumpAll() to not
  take any lock on the log buffer but reset buffer content variables
  to an empty set before starting the actual dump.

Signed-off-by: Daniel Veillard <veillard at redhat.com>
---
 src/util/logging.c |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-taking-lock-in-libvirt-debug-dump.patch
Type: text/x-patch
Size: 2456 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110317/815800ee/attachment-0001.bin>


More information about the libvir-list mailing list