[rrd-users] ERROR: attempting to write beyond end of file
Stefan Brandl
smb at r-kom.de
Wed Jan 19 09:17:25 CET 2011
On Wed, Jan 19, 2011 at 09:12:19AM +0100, Tobias Oetiker wrote:
> Hi Stefan,
>
> Today Stefan Brandl wrote:
>
> >
> > Sorry Tobi, but my C-Programming knowledge is very limited,
> > not to say non-existent :-(
> > Could you tell me, where to put what code to further debug this?
>
> I would guess something like this could serve:
>
> Index: rrd_open.c
> ===================================================================
> --- rrd_open.c (revision 2172)
> +++ rrd_open.c (working copy)
> @@ -671,7 +671,7 @@
>
> if((rrd_file->pos + count) > old_size)
> {
> - rrd_set_error("attempting to write beyond end of file");
> + rrd_set_error("attempting to write beyond end of file (%ld + %ld > %ld)",rrd_file->pos, count, old_size);
> return -1;
> }
> memcpy(rrd_simple_file->file_start + rrd_file->pos, buf, count);
>
Ok, thanks.
This gives:
noc at lowrider:~$
noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool create tester.rrd DS:inet:GAUGE:600:0:U RRA:AVERAGE:0.5:1:600
noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool resize tester.rrd 0 GROW 100
ERROR: attempting to write beyond end of file (6144 + 8 > 6148)
noc at lowrider:~$
Stefan
More information about the rrd-users
mailing list