Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOError: java.io.IOException: Zero Header, data corrupted #514

Closed
fabiankessler opened this issue May 22, 2015 · 5 comments
Closed
Labels

Comments

@fabiankessler
Copy link

Using MapDB 1.0.7
Windows 8.1 64bit
Disk=SSD

I work with a map that I get with map = db.getTreeMap(identifier) and then commit after every modification in map with db.commit();

I was running the program in the IDE (IntelliJ). Then IntelliJ itself run out of memory in another project, and closed (killed) all windows. Now the mapdb data is broken.

The exception happens when accessing the map. Deleting the .t file did not help.
The broken database is available here: https://mega.co.nz/#!CkokVD5Q!rQMQZ7-NUjqjvaczr49euPIQm164pvnMnsruRWYraQw

@fabiankessler
Copy link
Author

Exception in thread "main" java.io.IOError: java.io.IOException: Zero Header, data corrupted
at org.mapdb.SerializerBase.deserialize(SerializerBase.java:881)
at org.mapdb.SerializerBase.deserialize(SerializerBase.java:867)
at org.mapdb.SerializerPojo.deserialize(SerializerPojo.java:701)
at org.mapdb.BTreeKeySerializer$BasicKeySerializer.deserialize(BTreeKeySerializer.java:89)
at org.mapdb.BTreeMap$NodeSerializer.deserialize(BTreeMap.java:440)
at org.mapdb.BTreeMap$NodeSerializer.deserialize(BTreeMap.java:288)
at org.mapdb.Store.deserialize(Store.java:297)
at org.mapdb.StoreDirect.get2(StoreDirect.java:475)
at org.mapdb.StoreWAL.get2(StoreWAL.java:336)
at org.mapdb.StoreWAL.get(StoreWAL.java:320)
at org.mapdb.Caches$HashTable.get(Caches.java:246)
at org.mapdb.EngineWrapper.get(EngineWrapper.java:58)
at org.mapdb.BTreeMap$BTreeIterator.advance(BTreeMap.java:924)
at org.mapdb.BTreeMap$BTreeValueIterator.next(BTreeMap.java:1066)
at (my code).printStats(Words.java:129)
at (my code).printStats(SingleTypeWordsData.java:53)
at (my code)DiscoveryApp.(DiscoveryApp.java:44)
at (my code)App.(App.java:34)
at (my code)App.main(App.java:44)
Caused by: java.io.IOException: Zero Header, data corrupted
... 19 more

@jankotek
Copy link
Owner

jankotek commented Jul 5, 2015

I tried to investigate. Name Catalog is corrupted, some values are set to zeroes. Closing this bug, since I see no chance to find what caused the issue.

@jankotek jankotek closed this as completed Jul 5, 2015
@avishayh
Copy link

avishayh commented Jul 9, 2015

happened to me as well, same exception when using database.getHashMap(id)>
each method I try operating on this id returns an exception in the deserialize method.
Is there any way to fix this corruption and still use the DB ?
other records (diffrent id's for getHashMap) on the DB are working properly , I would like to call a delete(id) on this record and loose only this record and not loose all the DB instance.
but delete method also throws the same exception.

@jankotek
Copy link
Owner

jankotek commented Jul 9, 2015

It should be fixable by removing write ahead log (*.t) files

@avishayh
Copy link

Still get the broken record.

will it be possible to have a way in the code to bypass the corrupted data once happens, so the application can "fix" it self without system fix/interference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants