[Bug 1579560] [NEW] mix-up of cron job stderr outputs for simultaneous jobs when sent over postfix
Cedric Bhihe
1579560 at bugs.launchpad.net
Sun May 8 18:55:22 UTC 2016
Public bug reported:
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: mailuser at domain.com
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
** Affects: cron (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug third-party-packages trusty
** Attachment added: "Cron <ckb at Schubert> . $HOME_.profile; _usr_bin_wget -O $HOME_.thunderbird_835kzmqu.default_Mail_se-flair_4592671.png -o $HOME_Downloads_Logs_wget.log -- https:_stackexchange.com_users_flair_4592671.png.eml"
https://bugs.launchpad.net/bugs/1579560/+attachment/4658814/+files/Cron%20%3Cckb%40Schubert%3E%20.%20%24HOME_.profile%3B%20_usr_bin_wget%20-O%20%24HOME_.thunderbird_835kzmqu.default_Mail_se-flair_4592671.png%20-o%20%24HOME_Downloads_Logs_wget.log%20--%20https%3A_stackexchange.com_users_flair_4592671.png.eml
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cron in Ubuntu.
https://bugs.launchpad.net/bugs/1579560
Title:
mix-up of cron job stderr outputs for simultaneous jobs when sent over
postfix
Status in cron package in Ubuntu:
New
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: mailuser at domain.com
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1579560/+subscriptions
More information about the foundations-bugs
mailing list