[Web10g-user] Web100/10g lib web100 log file bug

Will Hawkins hawkinsw at opentechinstitute.org
Wed Aug 29 15:16:20 EDT 2012


Hello everyone!

First of all, thank you for all your work on these web measurement
platforms. The data derived from this software is really amazing. As a
new member of the Mlab team, I've recently started working with the
userspace libraries for parsing snap files.

The tools seem to work great overall but I've noticed a few bugs. In
particular, I've noticed a bug in the formatting, encoding and decoding
of the log files.

After the End-Of-Header marker, the date and time are encoded in the
file. For encoding, the time is written out of a time_t data structure
directly into the file. For decoding, the time is read out of the file
and directly into a time_t data structure.

The way this is coded in web100.c (line 1418 for encoding and line 1541
for decoding) works perfectly if sizeof(time_t) on the encoding platform
== sizeof(time_t) on the decoding platform. When the data is encoded on
a 32-bit machine and decoded on a 64-bit machine, things go wrong.

Fixing the size of this field to either 4- or 8-bytes seems like an easy
fix. However, there are probably better ways to do it. If there is a
consensus on the best fix for this, I'd be happy to code it up and
submit a patch.

Thanks again for the work that you're doing on this project. I look
forward to interacting with everyone!

Will


More information about the Web10g-user mailing list