Source: rr
Version: 5.9.0-8
Usertags: pidof-without-procps

Dear maintainer(s) of rr,

it appears that rr uses `pidof` in its testsuite, or that
at least one of its binary packages uses `pidof` at runtime.
Historically, `pidof` was provided by the Essential package
`sysvinit-tools`, making an explicit dependency unnecessary. However
`pidof` will soon be moved to `procps` and will no longer be part of
the Essential set.

Please add an explicit dependency on `procps`:

* via the `Depends:` field of all binary packages of rr
  that use `pidof` at runtime;
* via the `Build-Depends:` field of rr, if `pidof` is
  used in tests run at build-time;
* via the `Depends:` field of `debian/control/tests`, if `pidof` is
  used in autopkgtests.

To prevent any disruption for users of rr, please add
this dependency now, before `pidof` is moved from `sysvinit-utils` to
`procps`. Alternatively, you could remove all uses of `pidof`.

It is believed that rr uses `pidof` due to the following
code snippets:

```
path: rr_5.9.0-6/src/test/term_trace_cpu.run
done
rrpid=$(parent_pid_of $(pidof $EXE-$nonce))
# It's possible for this signal to be acted on before chew_cpu actually


path: rr_5.9.0-6/src/test/nested_detach_kill_stuck.run
done
rrpid=$(parent_pid_of $(pidof $NEST_EXE-$nonce))
echo "  done.  Delivering SIGTERM to $rrpid ..."
kill -TERM $rrpid


path: rr_5.9.0-6/src/test/nested_detach_kill.run
done
rrpid=$(parent_pid_of $(pidof $NEST_EXE-$nonce))
echo "  done.  Delivering SIGTERM to $rrpid ..."
kill -TERM $rrpid


path: rr_5.9.0-6/src/test/util.sh
if ! which pidof &> /dev/null; then
    pidof() {
        ps ax -o 'pid= exe=' | grep ' \(\|.*/\)'"$1"'$' | awk '{print $1}'
    }


path: rr_5.9.0-6/src/test/x86/string_instructions_replay.run
for i in $(seq 1 30); do
  sleep 0.05
  kill -CHLD $rrpid $(pidof $TESTNAME-$nonce) >& /dev/null
done


path: rr_5.9.0-6/src/test/concurrent_signals.run
done
pid=$(pidof $TESTNAME-$nonce)
(for i in $(seq 1 1000); do sleep 0; kill -USR1 $pid; done) &
(for i in $(seq 1 1000); do sleep 0; kill -USR2 $pid; done) &


path: rr_5.9.0-6/src/test/term_trace_syscall.run
done
rrpid=$(parent_pid_of $(pidof $TESTNAME-$nonce))
echo "  done.  Delivering SIGTERM to $rrpid ..."


path: rr_5.9.0-6/scripts/signal-rr-recording.sh
}
for rr_pid in `pidof rr` ; do
    if cat /proc/$rr_pid/cmdline | tr '\0' '\n' | head -n2 | tail -n1 | grep 
-qz '\(^record$\)\|/'  ; then
        signal_descendants $rr_pid


path: rr_5.9.0-6/src/test/execve_loop.run
for i in $(seq 1 30); do
  sleep 0.01
  kill -CHLD $rrpid $(pidof $TESTNAME-$nonce) >& /dev/null
done


path: rr_5.9.0-6/src/test/ignored_async_usr1.run
echo "  done.  Delivering SIGUSR1 ..."
kill -USR1 $rrpid $(pidof $TESTNAME-$nonce)
# Wait for 'record' to actually terminate. Otherwise we might start


path: rr_5.9.0-6/src/test/thread_exit_signal.run
done
pid=$(pidof $TESTNAME-$nonce)
for i in $(seq 1 100); do
  sleep 0.001


path: rr_5.9.0-6/src/test/term_trace_reset.run
sleep 0.01
rrpid=$(parent_pid_of $(pidof $TESTNAME-$nonce))
kill -TERM $rrpid >& /dev/null


path: rr_5.9.0-6/src/test/nested_detach_stop.run
done
sleep_pid=$(pidof $SLEEP_EXE-$nonce)
nested_rr_pid=$(parent_pid_of $sleep_pid)
echo "  done.  Delivering SIGSTOP to nested rr $nested_rr_pid ..."
```

Feel free to close this issue if this is a false positive (for example
if this code is in an unreachable code path).

Regards,

-- 
Gioele Barabucci

Reply via email to