This is a post for myself, how to fix this problem. It happens to my Alfresco instance when after power failure some file indexes get borked.
So the error:
…
Caused by: java.lang.RuntimeException: Error during run with lock.
…
Caused by: java.io.IOException: read past EOF
What happened there was the lucene indexes are messed up. Something dirty, when the power got cut, happened to some of the files. What the solution is:
Rebuild the index.
As simple as that.