badboy / rdb-rs

RDB parsing & dumping library and utility
https://rdb.fnordig.de/
MIT License
62 stars 17 forks source link

Bug on parsing dump.rdb #12

Closed eskomorokhov closed 8 years ago

eskomorokhov commented 8 years ago

I got sources from repo:master branch and build it. Then during ./rdb -f plain -d 5 dump_6368.rdb I got error: Parsing failed: Can't skip number of requested bytes

While without -d option it works well.

badboy commented 8 years ago

Can you send me the dump file? Upload it somewhere and send me a link (if too private sent to janerik at fnordig.de)

eskomorokhov commented 8 years ago

I cannot send due to it's size it is about 1.7 Gb and it is private data. Besides, on some dumps i get error "thread '

' panicked at 'called Result::unwrap() on an Err value: Error { repr: Os { code: 32, message: "Broken pipe" } }', ../src/libcore/result.rs:738". What does it mean?

badboy commented 8 years ago
  1. Too bad. Can you maybe try to reduce it, removing sensitive stuff and reproduce the error? Otherwise I can't really look into it.
  2. Are you piping the output somewhere? In that case the receiving program (or file) might have crashed/stopped reading/filled the hard disk
eskomorokhov commented 8 years ago

Thanks for your time.

  1. I think this problem could be produced due to connected to binary keys problem or some other problem.
  2. Yes, I pipe data like: ./rdb -f plain dump.rdb >file. Could I save result without piping?
badboy commented 8 years ago

Right now there's no option for writing to a file directly. I might as well include it at some point.

This whole project is a bit in an alpha-state right now and I don't have as much time as I like to drive it forward, so it might take a few more weeks to get these bugs fixed.

messense commented 8 years ago

Same issue.

messense commented 8 years ago

dump.rdb.zip

$ rdb -f protocol -d 1 dump.rdb

Parsing failed: Can't skip number of requested bytes
$ rdb -f protocol -k '^*:count$' dump.rdb
*2
$6
SELECT
$1
0

Parsing failed: Can't skip number of requested bytes
badboy commented 8 years ago

Thank you! I will look into it when I find the time.

badboy commented 8 years ago

ok, I got a minimal example now and I think I now what happens.

badboy commented 8 years ago

Ok, I found the problem for the above, but encountered more bugs while testing this

badboy commented 8 years ago

Bugs fixed, tests added in #16. Waiting for the merge, then pushing a bug fix release.

messense commented 8 years ago

Thanks. Great job!