[rrd-users] ERROR: attempting to write beyond end of file

Peter Valdemar Mørch peter at morch.com
Tue Aug 9 11:07:15 CEST 2011


Hi,

This post is about the "ERROR: attempting to write beyond end of file"
error message described in threads [1] and [2]. ( I wasn't subscribed
to the list at the time ).

For the record, I just want to present a way to reproduce this if
needed in future and confirm that r2192 indeed fixed it.

On Jun 28, Tobi wrote in [2] that:
> only in the sense that I was not able to reproduce this on our
> systems ... it would be great to figure the cause of this ...

One way to reproduce this is:
* Install a minimal debian squeeze system from scratch. E.g. use the iso [3].
* apt-get install rrdtool
* run the attached reproduce.sh
* See the attached reproduce.out.txt

Basically:
rrdtool create created.rrd DS:var1:GAUGE:600:U:U RRA:AVERAGE:0.5:1:25
rrdtool resize created.rrd 0 GROW 1
fails, but putting created.rrd through a dump/restore cycle makes it work.

The next day, Jun 29, Tobi commited:

r2192 | oetiker | 2011-06-29 17:18:22 +0200 (Wed, 29 Jun 2011) | 2 lines
Changed paths:
   M /branches/1.4/program/src/rrd_format.c
   M /branches/1.4/program/src/rrd_resize.c
   M /trunk/program/src/rrd_format.c
   M /trunk/program/src/rrd_resize.c

I can confirm that /branches/1.4/ part of the fix works when applied
to rrdtool 1.4.3 on debian squeeze and that a raw checkout of
svn://svn.oetiker.ch/rrdtool/trunk/program also works.

[1]: "ERROR: attempting to write beyond end of file"
http://oss.oetiker.ch/rrdtool/forum.en.html#nabble-td5708645
[2]: "rrd resize error"
http://oss.oetiker.ch/rrdtool/forum.en.html#nabble-td6522576
[3]: http://cdimage.debian.org/debian-cd/6.0.2.1/i386/bt-cd/debian-6.0.2.1-i386-netinst.iso.torrent

--
Peter Valdemar Mørch
http://www.morch.com
-------------- next part --------------
ERROR: attempting to write beyond end of file
$? from rrdtool resize created.rrd 0 GROW 1:  1
$? from rrdtool resize restored.rrd 0 GROW 1:  0
XML diffs
- no XML diffs
These have no diffs? So two rrd files have the same dump output, but
resize on one succeeds and on another it fails?

info diffs
--- created.info	2011-08-09 10:59:17.000000000 +0200
+++ restored.info	2011-08-09 10:59:17.000000000 +0200
@@ -1,4 +1,4 @@
-filename = "created.rrd"
+filename = "restored.rrd"
 rrd_version = "0003"
 step = 300
 last_update = 1312880347
@@ -13,7 +13,7 @@
 ds[var1].unknown_sec = 247
 rra[0].cf = "AVERAGE"
 rra[0].rows = 25
-rra[0].cur_row = 5
+rra[0].cur_row = 0
 rra[0].pdp_per_row = 1
 rra[0].xff = 5.0000000000e-01
 rra[0].cdp_prep[0].value = NaN
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reproduce.sh
Type: application/x-sh
Size: 1008 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20110809/fdcb20ad/attachment.sh 


More information about the rrd-users mailing list