View Issue Details

IDProjectCategoryView StatusLast Update
0002641GNUnetdatacache librarypublic2012-12-21 16:49
ReporterSree Harsha Totakura Assigned ToChristian Grothoff  
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.4 
Target Version0.9.5Fixed in Version0.9.5 
Summary0002641: Unusual number reported to statistics by datacache for "bytes stored"
Descriptiongnunet-statistics shows unusually big number for the number of bytes stored
harsha@nautophone:~/repos/sree-testbed$ gnunet-statistics -s datacache
    datacache # bytes stored: 695785550805
Steps To Reproducestart peer
wait for 10~20 min
gnunet-statistics -s datacache
TagsNo tags attached.
Attached Files
log.txt (356,352 bytes)

Activities

Christian Grothoff

2012-11-10 21:08

manager   ~0006562

I cannot reproduce this. Can you please run your peer with

$ gnunet-statistics -s datacache -n "# bytes stored" -w

running at the same time so I might get a glance as to what is going on?

Sree Harsha Totakura

2012-11-12 13:45

developer   ~0006570

Last edited: 2012-11-12 13:47

Attached a file containing the output.
The counter increases by a large value in line 1476.

Christian Grothoff

2012-11-13 14:52

manager   ~0006584

Ah, that's an increase by "-1672" mod uint32...

Christian Grothoff

2012-11-13 14:54

manager   ~0006585

Here it is (datacache.c:117):

size_t size;
// ...
  GNUNET_STATISTICS_update (h->stats, gettext_noop ("# bytes stored"), -size,
                            GNUNET_NO);

On my system, size_t is a 64-bit value, so "- size == size", but then the cast to a "long long" (update takes a *signed* value) makes everything OK.

On your system, size_t is a 32-bit value, so "- size" = UINT32_MAX - size, and then the (implicit) cast to "long long" does nothing, and you jump almost +4GB.

Christian Grothoff

2012-11-13 14:55

manager   ~0006586

Fixed in SVN 24931.

Issue History

Date Modified Username Field Change
2012-11-08 14:30 Sree Harsha Totakura New Issue
2012-11-10 14:02 Christian Grothoff Assigned To => Christian Grothoff
2012-11-10 14:02 Christian Grothoff Status new => assigned
2012-11-10 14:02 Christian Grothoff Target Version => 0.9.5
2012-11-10 14:05 Christian Grothoff Priority normal => urgent
2012-11-10 21:08 Christian Grothoff Note Added: 0006562
2012-11-10 21:08 Christian Grothoff Status assigned => feedback
2012-11-12 13:45 Sree Harsha Totakura File Added: log.txt
2012-11-12 13:45 Sree Harsha Totakura Note Added: 0006570
2012-11-12 13:45 Sree Harsha Totakura Status feedback => assigned
2012-11-12 13:47 Sree Harsha Totakura Note Edited: 0006570
2012-11-13 14:52 Christian Grothoff Note Added: 0006584
2012-11-13 14:54 Christian Grothoff Note Added: 0006585
2012-11-13 14:55 Christian Grothoff Note Added: 0006586
2012-11-13 14:55 Christian Grothoff Status assigned => resolved
2012-11-13 14:55 Christian Grothoff Fixed in Version => 0.9.5
2012-11-13 14:55 Christian Grothoff Resolution open => fixed
2012-12-21 16:49 Christian Grothoff Status resolved => closed