Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 108004

Summary: fcron truncating jobs' lines in crontab file (all versions?)
Product: Gentoo Linux Reporter: Gregg Casillo <gregg.casillo>
Component: [OLD] Core systemAssignee: Cron Team <cron-bugs+disabled>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gregg Casillo 2005-10-03 11:29:47 UTC
I cannot get jobs to run via fcron's /etc/crontab, because it appears to be
truncating the lines. The lines are very long as they include command-line
parameters for record-v4l2.pl, a script included with the media-tv/ivtv driver
to record video to files. Here's a couple example lines I have in my crontab:

0 12 2 10 0 root record-v4l2.pl --input /dev/v4l/video 0 --directory /mnt/video
--directory-format "" --output klegp_000519.mpg --duration 1590 --inputnum 5
--bitrate 6000000 --peakbitrate 8000000 --output-settings 0

30 12 2 10 0 root record-v4l2.pl --input /dev/v4l/video 0 --directory /mnt/video
--directory-format "" --output kcomm_003148.mpg --duration 1590 --inputnum 5
--bitrate 6000000 --peakbitrate 8000000 --output-settings 0

I have each of those on one line, no wrapping. Whenever I try to use a "/"
character to wrap each of those on multiple lines, it makes NO difference. Here
is what I get in my /var/log/message:

Oct  2 12:00:00 ketenc fcron[13856]: Job record-v4l2.pl --input /dev/v4l/video 0
--directory /mnt/video --directory-format "" --output klegp_000519.mpg
--duration 1590 --inputnum 5 --bitrate 6000000 (truncated)
Oct  2 12:00:00 ketenc fcron[13856]: Job record-v4l2.pl --input /dev/v4l/video 0
--directory /mnt/video --directory-format "" --output klegp_000519.mpg
--duration 1590 --inputnum 5 --bitrate 6000000 (truncated)
Oct  2 12:30:00 ketenc fcron[14063]: Job record-v4l2.pl --input /dev/v4l/video 0
--directory /mnt/video --directory-format "" --output kcomm_003148.mpg
--duration 1590 --inputnum 5 --bitrate 6000000 (truncated)
Oct  2 12:30:00 ketenc fcron[14063]: Job record-v4l2.pl --input /dev/v4l/video 0
--directory /mnt/video --directory-format "" --output kcomm_003148.mpg
--duration 1590 --inputnum 5 --bitrate 6000000 (truncated)

I have tried 3.0.0-r1, 3.0.0, and 2.0.2. This is very odd, because I've been
using fcron successfully for some time though I don't know what version. I
recently did an "emerge world -u", and now I'm being stymied by fcron.

Reproducible: Always
Steps to Reproduce:
1. add long lines to /etc/crontab
2. time comes for job to execute
3. job fails to run because the line is truncated
Comment 1 Gregg Casillo 2005-10-03 11:35:41 UTC
Correction, I used a backslash to wrap the jobs on multiple lines.
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-10-27 16:02:27 UTC
3.0.0-r1?

As for the log messages, the "(truncated)" just means the log message was truncated:

In log.c:

    static char truncated[] = " (truncated)";
    ...
    if (len >= MAX_MSG)
        strcpy(msg + (MAX_MSG - 1) - sizeof(truncated), truncated);
Comment 3 Gregg Casillo 2005-11-01 09:49:42 UTC
Whoops, you're right about the log messages themselves being truncated. As for
-r1, I created a custom ebuild in my overlay that allows fcron to be built
without dependencies on ssmtp and mailbase; I detest mail servers.

Not sure why it wasn't working before, but it's working again. record-v4l2.pl
doesn't like it when the bitrate and peakbitrate are the same; I discovered this
today while nosing around, and my jobs are running via cron again. So I'm happy.
I'll close this bug. Sorry to trouble everyone over it.