mix-up of cron job stderr outputs for simultaneous jobs when sent over postfix

Bug #1579560 reported by Cedric Bhihe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description already available at https://answers.launchpad.net/ubuntu/+question/293431.

Use case: two (non-root) cron jobs trigger simultaneously (i.e. two different crontab entries scheduled at the same time)

Context: Trusty 14.04.4 Desktop LTS
$ uname -r /// 3.16.0-50-generic
Cron version: 3.0pl1-124ubuntu2 (trusty)
Postfix version: 2.11.0-1 (trusty)

# cron entry #1
# `rsync' Mozilla FF's profile from RAM-DISK to SSD every 4 hrs.
# (FF's profile lives in RAM right from boot on.)
0 */4 * * * . $HOME/.profile; /opt/bin/fxram-sync profile

# cron entry #2
# Download an embedded picture from a specific web page every 2 hrs.
# Save with date-stamp.
0 */2 * * * . $HOME/.profile; /usr/bin/wget -O $HOME/Press-rev/Pix/$(/bin/date +%Y%m%D%H%M%S).png -o $HOME/Downloads/Logs/wget.log -- https://some.domain.net/news/that-pix.png

Cron jobs and pertinent script(s) function perfectly well.
Postfix is configured and has be stable in last 18 months.

As soon as the 2 cron entries are enabled (to trigger simultaneously) however, Cron Daemon starts sending mixed up stderr outputs (via Postfix). See example below:

===============================
    From: Cron Daemon <---@ ---->
    Subject: Cron . $HOME/.profile; /usr/bin/wget -O $HOME/Press-rev/Pix/$(/bin/date +%Y%m%D%H%M%S).png -- https://some.domain.net/news/that-pix.png
    To: <email address hidden>

    rsync: stat "/home/user/.mozilla/firefox/main/.cookies.sqlite-wal.YA5Dzv" failed: No such file or directory (2)
    rsync: rename "/home/user/.mozilla/firefox/main/.cookies.sqlite-wal.YA5Dzv" -> "cookies.sqlite-wal": No such file or directory (2)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
===============================

In the example above one gets the header subject line from cron entry #2, which otherwise produces no error, and in the message body the stderr of cron entry #1 about .cookies.sqlite-wal not being found (normal in my setup).

By delaying either one of the two cron entries by a few minutes, the email snafu disappears completely and no stderr output report is mailed.
___________________________________________________________________

COPY OF THE NON-SANITIZED Cron Daemon email provided as attachment.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: cron 3.0pl1-124ubuntu2
ProcVersionSignature: Ubuntu 3.16.0-50.67~14.04.1-generic 3.16.7-ckt16
Uname: Linux 3.16.0-50-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
Date: Sun May 8 20:43:48 2016
ExecutablePath: /usr/sbin/cron
InstallationDate: Installed on 2014-05-09 (729 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcEnviron:
 PATH=(custom, no user)
 TERM=linux
SourcePackage: cron
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.init.cron.conf: 2014-10-10T12:35:19.881072

Revision history for this message
Cedric Bhihe (cedric-bhihe) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.