cmusatyalab / gammaray

Distributed Streaming Virtual Machine Introspection
Apache License 2.0
17 stars 6 forks source link

end < start on redis pubsub msgs #20

Closed ghost closed 10 years ago

ghost commented 10 years ago

Using follow.py on test:test:/var/log/syslog and replaying traces using our redis-load-generation-test.log, we noticed that some messages have end < start, which seems odd.

theonewolf commented 10 years ago

Yep, this looks like a bug. I think even on insert into Redis they are getting mangled.

This sector on disk is associated with the file '/home/wolf/scratch' which fits into a single block:

get sector:21332280
"start:0:end:67108864:file:86271"

You can see the end value is ludicrously high here. Going to check the output BSON from the disk crawler, and also the import code into Redis.

theonewolf commented 10 years ago

Output BSON as interpreted by the bson_printer tool from the disk crawler looks OK:

bson-printer /home/wolf/VM/vm_ext4_test/ext4_index.bson

...

{
        'type' : [BSON_STRING, 4] 'file'
        'inode_sector' : [BSON_INT64] 33560304
        'inode_offset' : [BSON_INT64] 1536
        'inode_num' : [BSON_INT32] 1055719
        'path' : [BSON_STRING, 18] '/home/wolf/scratch'
        'is_dir' : [BSON_BOOLEAN] false
        'size' : [BSON_INT64] 309
        'mode' : [BSON_INT64] 33277
        'link_count' : [BSON_INT64] 1
        'uid' : [BSON_INT64] 1000
        'gid' : [BSON_INT64] 1000
        'atime' : [BSON_INT64] 1348086515
        'mtime' : [BSON_INT64] 1345582976
        'ctime' : [BSON_INT64] 1345582979
        'sectors' : [BSON_ARRAY] {
        '0' : [BSON_INT32] 21332280
}
        'extents' : [BSON_ARRAY] {
}