Projects onedev server Issues #731
#731  Exception after upgrade to 7.2.2
Closed
jbauer opened 6 months ago

After upgrading to 7.2.2 I get the following exception right after logging in:

OOPS! There Is An Error

An unexpected exception occurred
Back To Home
org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [WebMarkupContainer [Component id = body]]
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1838)
	at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
	at org.apache.wicket.Component.beforeRender(Component.java:1018)
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1826)
	at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
	at org.apache.wicket.Component.beforeRender(Component.java:1018)
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1826)
	at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
	at org.apache.wicket.Component.beforeRender(Component.java:1018)
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1826)
	at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
	at org.apache.wicket.Component.beforeRender(Component.java:1018)
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1826)
	at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
	at org.apache.wicket.Page.onBeforeRender(Page.java:801)
	at io.onedev.server.web.page.base.BasePage.onBeforeRender(BasePage.java:262)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
	at org.apache.wicket.Component.beforeRender(Component.java:1018)
	at org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
	at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
	at org.apache.wicket.Component.render(Component.java:2327)
	at org.apache.wicket.Page.renderPage(Page.java:1018)
	at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
	at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:195)
	at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
	at org.apache.wicket.request.flow.ResetResponseException$ResponseResettingDecorator.respond(ResetResponseException.java:88)
	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:917)
	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:93)
	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:274)
	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:231)
	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:302)
	at org.apache.wicket.protocol.ws.AbstractUpgradeFilter.processRequestCycle(AbstractUpgradeFilter.java:70)
	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.onedev.server.web.DefaultWicketServlet.service(DefaultWicketServlet.java:43)
	at io.onedev.server.web.DefaultWicketServlet$$EnhancerByGuice$$a3c976f.CGLIB$service$0(<generated>)
	at io.onedev.server.web.DefaultWicketServlet$$EnhancerByGuice$$a3c976f$$FastClassByGuice$$e042ac26.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
	at io.onedev.server.persistence.SessionInterceptor$1.call(SessionInterceptor.java:23)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.SessionInterceptor.invoke(SessionInterceptor.java:18)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:78)
	at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:54)
	at io.onedev.server.web.DefaultWicketServlet$$EnhancerByGuice$$a3c976f.service(<generated>)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
	at com.google.inject.servlet.DefaultFilterPipeline.dispatch(DefaultFilterPipeline.java:47)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at io.onedev.server.git.GoGetFilter.doFilter(GoGetFilter.java:87)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at io.onedev.server.git.GitLfsFilter.doFilter(GitLfsFilter.java:440)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at io.onedev.server.git.GitFilter.doFilter(GitFilter.java:330)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:450)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at io.onedev.server.util.jetty.DisableTraceFilter.doFilter(DisableTraceFilter.java:28)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.lang.Thread.run(Thread.java:748)
Caused by: jetbrains.exodus.ExodusException: Can't read full bytes from log [/opt/onedev/site/projects/14/info/commit] with address 65536 (file 00000000000.xd), offset: 65536, read: 6698
	at jetbrains.exodus.log.LogCache.readFullPage(LogCache.java:103)
	at jetbrains.exodus.log.SharedLogCache.getPage(SharedLogCache.java:85)
	at jetbrains.exodus.log.DataIterator.checkPage(DataIterator.java:96)
	at jetbrains.exodus.log.DataIterator.checkPageSafe(DataIterator.java:105)
	at jetbrains.exodus.log.DataIterator.<init>(DataIterator.java:43)
	at jetbrains.exodus.env.EnvironmentImpl$3.getDataIterator(EnvironmentImpl.java:605)
	at jetbrains.exodus.tree.btree.BTreeBase.getLoggable(BTreeBase.java:119)
	at jetbrains.exodus.tree.btree.BTree.<init>(BTree.java:40)
	at jetbrains.exodus.env.EnvironmentImpl$3.<init>(EnvironmentImpl.java:601)
	at jetbrains.exodus.env.EnvironmentImpl.loadMetaTree(EnvironmentImpl.java:601)
	at jetbrains.exodus.env.MetaTreeImpl.create(MetaTreeImpl.java:115)
	at jetbrains.exodus.env.EnvironmentImpl.flushTransaction(EnvironmentImpl.java:667)
	at jetbrains.exodus.env.ReadWriteTransaction.flush(ReadWriteTransaction.java:109)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:1008)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:257)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$2.process(DefaultCommitInfoManager.java:229)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.processCommitRange(DefaultCommitInfoManager.java:713)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:225)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManager.java:978)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:100)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:96)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.DefaultSessionManager.run(DefaultSessionManager.java:96)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13.doWorks(DefaultCommitInfoManager.java:967)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$2.doWorks(DefaultBatchWorkManager.java:110)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$1.run(DefaultBatchWorkManager.java:78)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:252)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:248)
	at io.onedev.server.security.SecurityUtils$3.call(SecurityUtils.java:378)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$4.call(DefaultWorkExecutor.java:121)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at io.onedev.server.security.SecurityUtils$1.run(SecurityUtils.java:352)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more
Robin Shen commented 6 months ago

Looks like some file in the cache is corrupted. Please stop OneDev, delete directory /opt/onedev/site/projects/14/info/commit, and start OneDev. That directory will be recreated.

jbauer commented 6 months ago

Hmm. I tried that on all projects that produced the exception but it did not help. After starting OneDev the same projects produce the exception again. I have only removed the commit folder as you said.

INFO  - Launching application from '/app'...
INFO  - Starting server...
INFO  - Successfully checked /opt/onedev
09:45:43 INFO  i.onedev.commons.bootstrap.Bootstrap - Launching application from '/opt/onedev'...
09:45:43 INFO  i.onedev.commons.bootstrap.Bootstrap - Cleaning temp directory...
09:45:45 INFO  io.onedev.commons.loader.AppLoader - Starting server...
09:46:03 INFO  i.o.s.e.impl.DefaultProjectManager - Checking projects...
09:46:09 ERROR jetbrains.exodus.env.EnvironmentImpl - Failed to flush transaction
jetbrains.exodus.ExodusException: Can't read full bytes from log [/opt/onedev/site/projects/14/info/commit] with address 65536 (file 00000000000.xd), offset: 65536, read: 6698
	at jetbrains.exodus.log.LogCache.readFullPage(LogCache.java:103)
	at jetbrains.exodus.log.SharedLogCache.getPage(SharedLogCache.java:85)
	at jetbrains.exodus.log.DataIterator.checkPage(DataIterator.java:96)
	at jetbrains.exodus.log.DataIterator.checkPageSafe(DataIterator.java:105)
	at jetbrains.exodus.log.DataIterator.<init>(DataIterator.java:43)
	at jetbrains.exodus.env.EnvironmentImpl$3.getDataIterator(EnvironmentImpl.java:605)
	at jetbrains.exodus.tree.btree.BTreeBase.getLoggable(BTreeBase.java:119)
	at jetbrains.exodus.tree.btree.BTree.<init>(BTree.java:40)
	at jetbrains.exodus.env.EnvironmentImpl$3.<init>(EnvironmentImpl.java:601)
	at jetbrains.exodus.env.EnvironmentImpl.loadMetaTree(EnvironmentImpl.java:601)
	at jetbrains.exodus.env.MetaTreeImpl.create(MetaTreeImpl.java:115)
	at jetbrains.exodus.env.EnvironmentImpl.flushTransaction(EnvironmentImpl.java:667)
	at jetbrains.exodus.env.ReadWriteTransaction.flush(ReadWriteTransaction.java:109)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:1008)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:257)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$2.process(DefaultCommitInfoManager.java:229)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.processCommitRange(DefaultCommitInfoManager.java:713)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:225)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManager.java:978)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:100)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:96)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.DefaultSessionManager.run(DefaultSessionManager.java:96)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13.doWorks(DefaultCommitInfoManager.java:967)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$2.doWorks(DefaultBatchWorkManager.java:110)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$1.run(DefaultBatchWorkManager.java:78)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:252)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:248)
	at io.onedev.server.security.SecurityUtils$3.call(SecurityUtils.java:378)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$4.call(DefaultWorkExecutor.java:121)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at io.onedev.server.security.SecurityUtils$1.run(SecurityUtils.java:352)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
09:46:09 ERROR jetbrains.exodus.env.EnvironmentImpl - Failed to rollback high address
jetbrains.exodus.ExodusException: write not in progress
	at jetbrains.exodus.log.Log.ensureWriter(Log.java:786)
	at jetbrains.exodus.log.Log.revertWrite(Log.java:338)
	at jetbrains.exodus.env.EnvironmentImpl.flushTransaction(EnvironmentImpl.java:675)
	at jetbrains.exodus.env.ReadWriteTransaction.flush(ReadWriteTransaction.java:109)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:1008)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:257)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$2.process(DefaultCommitInfoManager.java:229)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.processCommitRange(DefaultCommitInfoManager.java:713)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:225)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManager.java:978)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:100)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:96)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.DefaultSessionManager.run(DefaultSessionManager.java:96)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13.doWorks(DefaultCommitInfoManager.java:967)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$2.doWorks(DefaultBatchWorkManager.java:110)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$1.run(DefaultBatchWorkManager.java:78)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:252)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:248)
	at io.onedev.server.security.SecurityUtils$3.call(SecurityUtils.java:378)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$4.call(DefaultWorkExecutor.java:121)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at io.onedev.server.security.SecurityUtils$1.run(SecurityUtils.java:352)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
09:46:09 ERROR i.o.s.u.c.DefaultBatchWorkManager - Error doing works
jetbrains.exodus.ExodusException: write not in progress
	at jetbrains.exodus.log.Log.ensureWriter(Log.java:786)
	at jetbrains.exodus.log.Log.revertWrite(Log.java:338)
	at jetbrains.exodus.env.EnvironmentImpl.flushTransaction(EnvironmentImpl.java:675)
	at jetbrains.exodus.env.ReadWriteTransaction.flush(ReadWriteTransaction.java:109)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:1008)
	at jetbrains.exodus.env.EnvironmentImpl.executeInTransaction(EnvironmentImpl.java:257)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$2.process(DefaultCommitInfoManager.java:229)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.processCommitRange(DefaultCommitInfoManager.java:713)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:225)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManager.java:978)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:100)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:96)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.DefaultSessionManager.run(DefaultSessionManager.java:96)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13.doWorks(DefaultCommitInfoManager.java:967)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$2.doWorks(DefaultBatchWorkManager.java:110)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$1.run(DefaultBatchWorkManager.java:78)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:252)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:248)
	at io.onedev.server.security.SecurityUtils$3.call(SecurityUtils.java:378)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$4.call(DefaultWorkExecutor.java:121)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at io.onedev.server.security.SecurityUtils$1.run(SecurityUtils.java:352)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
09:46:10 INFO  i.o.s.e.i.DefaultBuildParamManager - Caching build param info...
09:46:11 INFO  i.o.s.e.i.DefaultBuildMetricManager - Caching build metric info...
09:46:11 INFO  i.o.s.e.impl.DefaultBuildManager - Caching build info...
09:46:13 INFO  i.o.s.e.i.DefaultAgentAttributeManager - Caching agent attribute info...
09:46:13 INFO  i.o.s.e.impl.DefaultIssueManager - Caching issue info...
09:46:14 ERROR i.o.s.u.c.DefaultBatchWorkManager - Error doing works
jetbrains.exodus.ExodusException: Can't read full bytes from log [/opt/onedev/site/projects/72/info/commit] with address 786432 (file 00000000000.xd), offset: 786432, read: -1
	at jetbrains.exodus.log.LogCache.readFullPage(LogCache.java:103)
	at jetbrains.exodus.log.SharedLogCache.getPage(SharedLogCache.java:85)
	at jetbrains.exodus.log.DataIterator.checkPage(DataIterator.java:96)
	at jetbrains.exodus.tree.btree.BTreeBase.getDataIterator(BTreeBase.java:96)
	at jetbrains.exodus.tree.btree.BTreeBase.getLoggable(BTreeBase.java:119)
	at jetbrains.exodus.tree.btree.BTree.<init>(BTree.java:40)
	at jetbrains.exodus.env.StoreImpl.openImmutableTree(StoreImpl.java:201)
	at jetbrains.exodus.env.TransactionBase.getTree(TransactionBase.java:125)
	at jetbrains.exodus.env.ReadWriteTransaction.getTree(ReadWriteTransaction.java:186)
	at jetbrains.exodus.env.StoreImpl.get(StoreImpl.java:69)
	at io.onedev.server.infomanager.AbstractEnvironmentManager.readBytes(AbstractEnvironmentManager.java:84)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$1.compute(DefaultCommitInfoManager.java:204)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$1.compute(DefaultCommitInfoManager.java:199)
	at jetbrains.exodus.env.EnvironmentImpl.computeInTransaction(EnvironmentImpl.java:1022)
	at jetbrains.exodus.env.EnvironmentImpl.computeInTransaction(EnvironmentImpl.java:277)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:199)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManager.java:978)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:100)
	at io.onedev.server.persistence.DefaultSessionManager$2.call(DefaultSessionManager.java:96)
	at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
	at io.onedev.server.persistence.DefaultSessionManager.run(DefaultSessionManager.java:96)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13.doWorks(DefaultCommitInfoManager.java:967)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$2.doWorks(DefaultBatchWorkManager.java:110)
	at io.onedev.server.util.concurrent.DefaultBatchWorkManager$1.run(DefaultBatchWorkManager.java:78)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:252)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$5.call(DefaultWorkExecutor.java:248)
	at io.onedev.server.security.SecurityUtils$3.call(SecurityUtils.java:378)
	at io.onedev.server.util.concurrent.DefaultWorkExecutor$4.call(DefaultWorkExecutor.java:121)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at io.onedev.server.security.SecurityUtils$1.run(SecurityUtils.java:352)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
09:46:14 ERROR i.o.s.u.c.DefaultBatchWorkManager - Error doing works
jetbrains.exodus.ExodusException: Can't read full bytes from log [/opt/onedev/site/projects/73/info/commit] with address 65536 (file 00000000000.xd), offset: 65536, read: 15304
	at jetbrains.exodus.log.LogCache.readFullPage(LogCache.java:103)
	at jetbrains.exodus.log.SharedLogCache.getPage(SharedLogCache.java:85)
	at jetbrains.exodus.log.DataIterator.checkPage(DataIterator.java:96)
	at jetbrains.exodus.log.DataIterator.checkPageSafe(DataIterator.java:105)
	at jetbrains.exodus.log.DataIterator.<init>(DataIterator.java:43)
	at jetbrains.exodus.env.EnvironmentImpl$3.getDataIterator(EnvironmentImpl.java:605)
	at jetbrains.exodus.tree.btree.BTreeBase.getLoggable(BTreeBase.java:119)
	at jetbrains.exodus.tree.btree.BTreeBase.compareLeafToKey(BTreeBase.java:175)
	at jetbrains.exodus.tree.btree.BasePageImmutable.binarySearch(BasePageImmutable.java:189)
	at jetbrains.exodus.tree.btree.BasePageImmutable.binarySearch(BasePageImmutable.java:141)
	at jetbrains.exodus.tree.btree.BottomPage.get(BottomPage.java:139)
	at jetbrains.exodus.tree.btree.BottomPage.get(BottomPage.java:57)
	at jetbrains.exodus.tree.btree.BTreeBase.get(BTreeBase.java:185)
	at jetbrains.exodus.env.MetaTreeImpl.getRootAddress(MetaTreeImpl.java:150)
	at jetbrains.exodus.env.StoreImpl.openImmutableTree(StoreImpl.java:194)
	at jetbrains.exodus.env.TransactionBase.getTree(TransactionBase.java:125)
	at jetbrains.exodus.env.ReadWriteTransaction.getTree(ReadWriteTransaction.java:186)
	at jetbrains.exodus.env.StoreImpl.get(StoreImpl.java:69)
	at io.onedev.server.infomanager.AbstractEnvironmentManager.readBytes(AbstractEnvironmentManager.java:84)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$1.compute(DefaultCommitInfoManager.java:204)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$1.compute(DefaultCommitInfoManager.java:199)
	at jetbrains.exodus.env.EnvironmentImpl.computeInTransaction(EnvironmentImpl.java:1022)
	at jetbrains.exodus.env.EnvironmentImpl.computeInTransaction(EnvironmentImpl.java:277)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.doCollect(DefaultCommitInfoManager.java:199)
	at io.onedev.server.infomanager.DefaultCommitInfoManager.access$2200(DefaultCommitInfoManager.java:88)
	at io.onedev.server.infomanager.DefaultCommitInfoManager$13$1.run(DefaultCommitInfoManage...
jbauer commented 6 months ago

The upgrade was from 7.1.7 to 7.2.2. Given that only a handful of projects are affected (6 out of ~70) a downgrade doesn't makes sense I guess (not even sure if OneDev supports downgrades).

Robin Shen commented 6 months ago

Downgrade is not supported. Please upgrade to 7.2.3 to see if it solves the issue. If not, it will be great help if you can upload one of the problematic project on this site so that I can investigate what might be wrong.

jbauer commented 6 months ago

Should I delete the commit directory again before upgrading? Or maybe the full info folder? Not sure what is stored in there and if I will loose data then.

Robin Shen commented 6 months ago

You may delete whole info folder. All data stored there are cache data derived from database and git repository, and can be safely deleted. OneDev will re-create them upon next start.

jbauer commented 6 months ago

I have removed the info folder of affected projects and upgraded to 7.2.3. Now it starts without exception and I can log-in again. Thanks for the help!

Robin Shen changed state to 'Closed' 6 months ago
Previous Value Current Value
Open
Closed
Robin Shen commented 6 months ago

No problem. Closing now.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Seen Builds
Issue Votes (0)
Watchers (5)
Reference
issue onedev/server#731
Please wait...
Page is in error, reload to recover