View Issue Details

IDProjectCategoryView StatusLast Update
0002641GNUnetdatacache librarypublic2012-12-21 15:49
ReporterSree Harsha Totakura Assigned ToChristian Grothoff Due Date
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 20: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 12:45

updater   ~0006570

Last edited: 2012-11-12 12:47

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

Christian Grothoff

2012-11-13 13:52

manager   ~0006584

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

Christian Grothoff

2012-11-13 13: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 13:55

manager   ~0006586

Fixed in SVN 24931.

Issue History

Date ModifiedUsernameFieldChange
2012-11-08 13:30Sree Harsha TotakuraNew Issue
2012-11-10 13:02Christian GrothoffAssigned To => Christian Grothoff
2012-11-10 13:02Christian GrothoffStatusnew => assigned
2012-11-10 13:02Christian GrothoffTarget Version => 0.9.5
2012-11-10 13:05Christian GrothoffPrioritynormal => urgent
2012-11-10 20:08Christian GrothoffNote Added: 0006562
2012-11-10 20:08Christian GrothoffStatusassigned => feedback
2012-11-12 12:45Sree Harsha TotakuraFile Added: log.txt
2012-11-12 12:45Sree Harsha TotakuraNote Added: 0006570
2012-11-12 12:45Sree Harsha TotakuraStatusfeedback => assigned
2012-11-12 12:47Sree Harsha TotakuraNote Edited: 0006570
2012-11-13 13:52Christian GrothoffNote Added: 0006584
2012-11-13 13:54Christian GrothoffNote Added: 0006585
2012-11-13 13:55Christian GrothoffNote Added: 0006586
2012-11-13 13:55Christian GrothoffStatusassigned => resolved
2012-11-13 13:55Christian GrothoffFixed in Version => 0.9.5
2012-11-13 13:55Christian GrothoffResolutionopen => fixed
2012-12-21 15:49Christian GrothoffStatusresolved => closed