[libvirt] [PATCH 3/5] lxc: Enable under valgrind again

Michal Privoznik posted 5 patches 7 years, 6 months ago
[libvirt] [PATCH 3/5] lxc: Enable under valgrind again
Posted by Michal Privoznik 7 years, 6 months ago
So we originally disabled LXC driver when libvirtd is running
under valgrind back in 05436ab7ff087 (which dates to beginning of
2009) as it was causing valgrind to crash. It's not the case
anymore. Valgrind works with LXC happily.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/lxc/lxc_driver.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 6969dddcab..8867645cdc 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1550,19 +1550,8 @@ static int lxcStateInitialize(bool privileged,
                               void *opaque ATTRIBUTE_UNUSED)
 {
     virCapsPtr caps = NULL;
-    const char *ld;
     virLXCDriverConfigPtr cfg = NULL;
 
-    /* Valgrind gets very annoyed when we clone containers, so
-     * disable LXC when under valgrind
-     * XXX remove this when valgrind is fixed
-     */
-    ld = virGetEnvBlockSUID("LD_PRELOAD");
-    if (ld && strstr(ld, "vgpreload")) {
-        VIR_INFO("Running under valgrind, disabling driver");
-        return 0;
-    }
-
     /* Check that the user is root, silently disable if not */
     if (!privileged) {
         VIR_INFO("Not running privileged, disabling driver");
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/5] lxc: Enable under valgrind again
Posted by Erik Skultety 7 years, 6 months ago
On Wed, Jul 25, 2018 at 03:02:09PM +0200, Michal Privoznik wrote:
> So we originally disabled LXC driver when libvirtd is running
> under valgrind back in 05436ab7ff087 (which dates to beginning of
> 2009) as it was causing valgrind to crash. It's not the case
> anymore. Valgrind works with LXC happily.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list