pcp
[Top] [All Lists]

Re: QA resource leaks

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: QA resource leaks
From: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Date: Tue, 17 Mar 2015 11:44:25 -0400
Cc: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1848657835.7797630.1426570540279.JavaMail.zimbra@xxxxxxxxxx>
References: <727434822.7795923.1426569757887.JavaMail.zimbra@xxxxxxxxxx> <1848657835.7797630.1426570540279.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mutt/1.4.2.2i
Hi -

> [...]
> Frank, test 666 is leaking pmmgr and valgrind processes ...
> [...]
> I have two of those for every test run over the last few days.  It
> looks like sudo's parent was killed, rather than the pmmgr child,
> since its been reparented to init.

ISTM the sudo is not necessary or helpful here.  The following patch
takes that out, and doesn't affect results otherwise.

- FChE

diff --git a/qa/666 b/qa/666
index d6fbbadcd7cd..65bfed9d57ec 100755
--- a/qa/666
+++ b/qa/666
@@ -32,7 +32,7 @@ export PMCD_WAIT_TIMEOUT PMCD_CONNECT_TIMEOUT 
PMCD_RECONNECT_TIMEOUT
 
 _cleanup()
 {
-    if [ -n "$pid" ]; then $sudo kill $pid; fi
+    if [ -n "$pid" ]; then kill $pid; fi
     # restart pmcd and primary pmlogger
     $sudo $PCP_RC_DIR/pcp restart >>$seq.full 2>&1
     _wait_for_pmcd
@@ -81,7 +81,7 @@ echo 'pcp://localhost:44321/' >>$tmp.dir/target-host
 echo 'localhost6' >>$tmp.dir/target-host
 echo 'pcp://localhost6:44321/' >>$tmp.dir/target-host
 # note -v -v here is the same as -D appl0,appl1
-$sudo $_valgrind_clean_assert $PCP_BINADM_DIR/pmmgr -v -v -p 5 -l $tmp.out -c 
$tmp.dir >$tmp.valout 2>$tmp.valerr &
+$_valgrind_clean_assert $PCP_BINADM_DIR/pmmgr -U `whoami` -v -v -p 5 -l 
$tmp.out -c $tmp.dir >$tmp.valout 2>$tmp.valerr &
 pid=$!
 echo "pid=$!" >>$seq.full
 
@@ -227,7 +227,7 @@ done
 
 date >>$seq.full
 echo "=== ZZZ kill pmmgr ===" | tee -a $seq.full
-$sudo kill $pid
+kill $pid
 pid=
 sleep 2
 

<Prev in Thread] Current Thread [Next in Thread>