Hi,
We are using the REST API with BaseX 7.6. After doing approximately 100 PUT requests for creating documents in a database, we get the error listed below. So far I haven't been able to reproduce it, but I have the database if that would be any help. Any suggestion on how to un-corrupt the database?
Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.6 Java: Oracle Corporation, 1.7.0_25 OS: Windows 7, x86 Stack Trace: java.lang.RuntimeException: Data Access out of bounds: - pre value: 0 - #used blocks: 0 - #total locks: 0 - access: -1 (0 > -1] org.basex.util.Util.notexpected(Util.java:53) org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:488) org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:189) org.basex.data.Data.kind(Data.java:283) org.basex.query.value.node.DBNode.<init>(DBNode.java:49) org.basex.query.value.seq.DBNodeSeq.get(DBNodeSeq.java:108) org.basex.query.value.seq.DBNodeSeq.get(DBNodeSeq.java:96) org.basex.query.QueryResources.compile(QueryResources.java:62) org.basex.query.QueryContext.compile(QueryContext.java:200) org.basex.query.QueryProcessor.compile(QueryProcessor.java:66) org.basex.query.QueryProcessor.execute(QueryProcessor.java:95) org.basex.query.QueryProcessor.queryNodes(QueryProcessor.java:204) org.basex.core.cmd.AQuery.queryNodes(AQuery.java:185) org.basex.core.cmd.Cs.run(Cs.java:23) org.basex.core.Command.run(Command.java:342) org.basex.core.Command.exec(Command.java:321) org.basex.core.Command.execute(Command.java:78) org.basex.server.LocalSession.execute(LocalSession.java:122) org.basex.server.Session.execute(Session.java:37) org.basex.http.rest.RESTCode.open(RESTCode.java:43) org.basex.http.rest.RESTRetrieve.run(RESTRetrieve.java:41) org.basex.http.rest.RESTGet.run(RESTGet.java:67) org.basex.http.rest.RESTServlet.run(RESTServlet.java:14) org.basex.http.BaseXServlet.service(BaseXServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:648) org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559) org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:232) org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:194) org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) org.eclipse.jetty.server.Server.handle(Server.java:365) org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926) org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988) org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635) org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627) org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51) org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) java.lang.Thread.run(Unknown Source)
Med venlig hilsen / Kind regards
[Description: Systematic Logo]http://www.systematic.com/ Lars Iversen Senior Systems Engineer
Søren Frichs Vej 39, 8000 Aarhus C Denmark
Mobile: +45 4196 5164 Lars.Iversen@systematic.commailto:Lars.Iversen@systematic.com www.systematic.comhttp://www.systematic.com
Hi Lars,
you may want to switch to the latest stable snapshot [1], which includes some concurrency bug fixes in our REST(XQ) architecture. Don’t hesitate to give us an updates if you manage to reproduce the bug with the most recent version.
Hope this helps, Christian
PS: we try our best to avoid database corruptions in the first place. Once a database is corrupted, and if no backups exists, it’s generally difficult to restore the original data, as the corruption may have occurred anywhere in the data structures. This may change in a future version, if we decide to implement MVCC or provide some alternative rollback mechanisms.
[1] http://files.basex.org/releases/latest/ ___________________________
2013/6/27 Lars Iversen Lars.Iversen@systematic.com
Hi,****
We are using the REST API with BaseX 7.6. After doing approximately 100 PUT requests for creating documents in a database, we get the error listed below. So far I haven’t been able to reproduce it, but I have the database if that would be any help. Any suggestion on how to un-corrupt the database?
Improper use? Potential bug? Your feedback is welcome:****
Contact: basex-talk@mailman.uni-konstanz.de****
Version: BaseX 7.6****
Java: Oracle Corporation, 1.7.0_25****
OS: Windows 7, x86****
Stack Trace: ****
java.lang.RuntimeException: Data Access out of bounds:****
pre value: 0****
#used blocks: 0****
#total locks: 0****
access: -1 (0 > -1]****
org.basex.util.Util.notexpected(Util.java:53)****
org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:488)****
org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:189)****
org.basex.data.Data.kind(Data.java:283)****
org.basex.query.value.node.DBNode.<init>(DBNode.java:49)****
org.basex.query.value.seq.DBNodeSeq.get(DBNodeSeq.java:108)****
org.basex.query.value.seq.DBNodeSeq.get(DBNodeSeq.java:96)****
org.basex.query.QueryResources.compile(QueryResources.java:62)****
org.basex.query.QueryContext.compile(QueryContext.java:200)****
org.basex.query.QueryProcessor.compile(QueryProcessor.java:66)****
org.basex.query.QueryProcessor.execute(QueryProcessor.java:95)****
org.basex.query.QueryProcessor.queryNodes(QueryProcessor.java:204)****
org.basex.core.cmd.AQuery.queryNodes(AQuery.java:185)****
org.basex.core.cmd.Cs.run(Cs.java:23)****
org.basex.core.Command.run(Command.java:342)****
org.basex.core.Command.exec(Command.java:321)****
org.basex.core.Command.execute(Command.java:78)****
org.basex.server.LocalSession.execute(LocalSession.java:122)****
org.basex.server.Session.execute(Session.java:37)****
org.basex.http.rest.RESTCode.open(RESTCode.java:43)****
org.basex.http.rest.RESTRetrieve.run(RESTRetrieve.java:41)****
org.basex.http.rest.RESTGet.run(RESTGet.java:67)****
org.basex.http.rest.RESTServlet.run(RESTServlet.java:14)****
org.basex.http.BaseXServlet.service(BaseXServlet.java:39)****
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)****
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:648)**
**
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:232)
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:194)
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
org.eclipse.jetty.server.Server.handle(Server.java:365)****
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)****
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)***
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
java.lang.Thread.run(Unknown Source) ****
Med venlig hilsen / Kind regards
[image: Description: Systematic Logo] http://www.systematic.com/ *Lars Iversen* Senior Systems Engineer
Søren Frichs Vej 39, 8000 Aarhus C Denmark
Mobile: +45 4196 5164 Lars.Iversen@systematic.com www.systematic.com****
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de