|
|
c313de |
From 2544ab6ac5b788d2df319afaef8d495409aa7b32 Mon Sep 17 00:00:00 2001
|
|
|
c313de |
Message-Id: <2544ab6ac5b788d2df319afaef8d495409aa7b32@dist-git>
|
|
|
c313de |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
c313de |
Date: Tue, 30 Jul 2019 16:04:51 +0200
|
|
|
c313de |
Subject: [PATCH] util: command: Ignore bitmap errors when enumerating file
|
|
|
c313de |
descriptors to close
|
|
|
c313de |
MIME-Version: 1.0
|
|
|
c313de |
Content-Type: text/plain; charset=UTF-8
|
|
|
c313de |
Content-Transfer-Encoding: 8bit
|
|
|
c313de |
|
|
|
c313de |
virCommandMassCloseGetFDsLinux fails when running libvird on valgrind
|
|
|
c313de |
with the following message:
|
|
|
c313de |
|
|
|
c313de |
libvirt: error : internal error: unable to set FD as open: 1024
|
|
|
c313de |
|
|
|
c313de |
This is because valgrind opens few file descriptors beyond the limit:
|
|
|
c313de |
|
|
|
c313de |
65701125 lr-x------. 1 root root 64 Jul 18 14:48 1024 -> /home/pipo/build/libvirt/gcc/src/.libs/libvirtd
|
|
|
c313de |
65701126 lrwx------. 1 root root 64 Jul 18 14:48 1025 -> '/tmp/valgrind_proc_3849_cmdline_186612e3 (deleted)'
|
|
|
c313de |
65701127 lrwx------. 1 root root 64 Jul 18 14:48 1026 -> '/tmp/valgrind_proc_3849_auxv_186612e3 (deleted)'
|
|
|
c313de |
65701128 lrwx------. 1 root root 64 Jul 18 14:48 1027 -> /dev/pts/11
|
|
|
c313de |
65701129 lr-x------. 1 root root 64 Jul 18 14:48 1028 -> 'pipe:[65689522]'
|
|
|
c313de |
65701130 l-wx------. 1 root root 64 Jul 18 14:48 1029 -> 'pipe:[65689522]'
|
|
|
c313de |
65701131 lr-x------. 1 root root 64 Jul 18 14:48 1030 -> /tmp/vgdb-pipe-from-vgdb-to-3849-by-root-on-angien
|
|
|
c313de |
|
|
|
c313de |
Ignore bitmap errors in this case since we'd leak those FD's anyways in
|
|
|
c313de |
the previous scenario.
|
|
|
c313de |
|
|
|
c313de |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
c313de |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
c313de |
(cherry picked from commit 728343983787cbd4d7ae8fa2007a157bb140f02a)
|
|
|
c313de |
|
|
|
c313de |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1721434
|
|
|
c313de |
|
|
|
c313de |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
c313de |
Message-Id: <b10f29e40efb516e15a053c2e3aa8963c3ea9715.1564495366.git.mprivozn@redhat.com>
|
|
|
c313de |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c313de |
---
|
|
|
c313de |
src/util/vircommand.c | 7 +------
|
|
|
c313de |
1 file changed, 1 insertion(+), 6 deletions(-)
|
|
|
c313de |
|
|
|
c313de |
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
|
|
|
c313de |
index 2353a4a554..dfc7e5428b 100644
|
|
|
c313de |
--- a/src/util/vircommand.c
|
|
|
c313de |
+++ b/src/util/vircommand.c
|
|
|
c313de |
@@ -519,12 +519,7 @@ virCommandMassCloseGetFDsLinux(virCommandPtr cmd ATTRIBUTE_UNUSED,
|
|
|
c313de |
goto cleanup;
|
|
|
c313de |
}
|
|
|
c313de |
|
|
|
c313de |
- if (virBitmapSetBit(fds, fd) < 0) {
|
|
|
c313de |
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
c313de |
- _("unable to set FD as open: %d"),
|
|
|
c313de |
- fd);
|
|
|
c313de |
- goto cleanup;
|
|
|
c313de |
- }
|
|
|
c313de |
+ ignore_value(virBitmapSetBit(fds, fd));
|
|
|
c313de |
}
|
|
|
c313de |
|
|
|
c313de |
if (rc < 0)
|
|
|
c313de |
--
|
|
|
c313de |
2.22.0
|
|
|
c313de |
|