[Bug 1337576] [NEW] cron starts binary with /bin/sh

Launchpad Bug Tracker 1337576 at bugs.launchpad.net
Thu Jul 3 21:42:40 UTC 2014


You have been subscribed to a public bug:

-- Problem Description --
CRON uses shell to start a binary executable defined in crontab, which is a waste of the resources for the extra shell process hanging in the system. It's supposed to run it directly with exec system call.

*** Here are some command outputs to see the extra process(12327) and relevant information: ***
# ps -ef | grep -e CRON -e PMLnx
root     12326   771  0 13:59 ?        00:00:00 CRON
root     12327 12326  0 13:59 ?        00:00:00 /bin/sh -c /var/perf/pm/bin/daemon_PMLnx      <--- extra layer, a waste
root     12328 12327  0 13:59 ?        00:00:00 /var/perf/pm/bin/daemon_PMLnx

# crontab -l
59 * * * * /var/perf/pm/bin/daemon_PMLnx

# file /var/perf/pm/bin/daemon_PMLnx
/var/perf/pm/bin/daemon_PMLnx: ELF 64-bit LSB  executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.0.0, BuildID[sha1]=1761d6d97eabb4e52870cb517fe6bf457e5bf89e, stripped

# uname -a
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:09:21 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux

# dpkg -l cron
    Name  Version            Architecture  Description
+++-=====-==================-=============-=========================
ii  cron  3.0pl1-124ubuntu2  ppc64el       process scheduling daemon

*** Expect cron to directly execute a binary like this ***
# ps -ef | grep -e CRON -e PMLnx
root      2293  2223  0 09:59 ?        00:00:00 /usr/sbin/CRON -n
root      2294  2293  0 09:59 ?        00:00:00 /var/perf/pm/bin/daemon_PMLnx

# uname -a
Linux hulala 3.12.15-3-default #1 SMP Wed Apr 2 17:08:55 UTC 2014 (69c2ea8) ppc64le ppc64le ppc64le GNU/Linux

# cat /etc/SuSE-release
SUSE Linux Enterprise Server 12 (ppc64le)
VERSION = 12
PATCHLEVEL = 0

** Affects: cron (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: architecture-ppc64le bugnameltc-112970 severity-normal
-- 
cron starts binary with /bin/sh
https://bugs.launchpad.net/bugs/1337576
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to cron in Ubuntu.



More information about the foundations-bugs mailing list