sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.96k stars 579 forks source link

ODirectMemoryViolationException with npm install and npm publish #240

Open haraleib opened 1 year ago

haraleib commented 1 year ago

When I try to publish something with npm publish --registry {hostedNexusNpmRegistryUrl} or when I use npm install aPackage --registry {nexusNpmRegistryGroupUrl} I get the following exception. I think the Exception should already be fixed in my version, as I found a fix for a Exception like this on https://help.sonatype.com/repomanager2/release-notes/older-release-notes?_ga=2.190674028.671534210.1694414387-1295069759.1690194358 -> NEXUS-7837

com.orientechnologies.orient.core.exception.OStorageException: null
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable20.put(OLocalHashTable20.java:407)
    at com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine.put(OHashTableIndexEngine.java:153)
    at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:80)
    at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:35)
    at com.orientechnologies.orient.core.index.OIndexAbstract.putInSnapshot(OIndexAbstract.java:967)
    at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:1146)
    at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:772)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic$CommitIndexesCallback.run(OTransactionOptimistic.java:101)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:1199)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:606)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:156)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2659)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2627)
    at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore.updatePackage(OrientMetadataStore.java:349)
    at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore.replacePackage(OrientMetadataStore.java:328)
    at com.bolyuba.nexus.plugin.npm.service.internal.ProxyMetadataServiceImpl.mayUpdatePackageRoot(ProxyMetadataServiceImpl.java:255)
    at com.bolyuba.nexus.plugin.npm.service.internal.ProxyMetadataServiceImpl.doGeneratePackageRoot(ProxyMetadataServiceImpl.java:207)
    at com.bolyuba.nexus.plugin.npm.service.internal.GeneratorSupport.generatePackageRoot(GeneratorSupport.java:113)
    at com.bolyuba.nexus.plugin.npm.service.internal.GroupMetadataServiceImpl.doGeneratePackageRoot(GroupMetadataServiceImpl.java:95)
    at com.bolyuba.nexus.plugin.npm.service.internal.GeneratorSupport.generatePackageRoot(GeneratorSupport.java:113)
    at com.bolyuba.nexus.plugin.npm.service.internal.GeneratorSupport.producePackageRoot(GeneratorSupport.java:82)
    at com.bolyuba.nexus.plugin.npm.group.DefaultNpmGroupRepository.doRetrieveLocalItem(DefaultNpmGroupRepository.java:143)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.doRetrieveItem(AbstractRepository.java:1248)
    at org.sonatype.nexus.proxy.repository.AbstractGroupRepository.doRetrieveItem(AbstractGroupRepository.java:240)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:760)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:592)
    at org.sonatype.nexus.proxy.router.DefaultRepositoryRouter.retrieveItem(DefaultRepositoryRouter.java:155)
    at org.sonatype.nexus.content.internal.ContentServlet.doGet(ContentServlet.java:386)
    at org.sonatype.nexus.content.internal.ContentServlet.service(ContentServlet.java:352)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:297)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:281)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:186)
    at com.google.inject.servlet.AbstractServletPipeline.service(AbstractServletPipeline.java:65)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    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.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.sonatype.nexus.web.internal.SecurityFilter.executeChain(SecurityFilter.java:90)
    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 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.yammer.metrics.web.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:76)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.CommonHeadersFilter.doFilter(CommonHeadersFilter.java:69)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.ErrorPageFilter.doFilter(ErrorPageFilter.java:71)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.BaseUrlHolderFilter.doFilter(BaseUrlHolderFilter.java:66)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at org.sonatype.nexus.web.internal.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:96)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
    at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterPipeline.dispatch(NexusGuiceFilter.java:56)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at com.yammer.metrics.jetty.InstrumentedHandler.handle(InstrumentedHandler.java:200)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.orientechnologies.common.directmemory.ODirectMemoryViolationException: Negative offset was provided
    at com.orientechnologies.common.directmemory.OUntrackedDirectMemoryPointer.rangeCheck(OUntrackedDirectMemoryPointer.java:230)
    at com.orientechnologies.common.directmemory.OUntrackedDirectMemoryPointer.getByte(OUntrackedDirectMemoryPointer.java:155)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWALChangesTree.getByteValue(OWALChangesTree.java:33)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage.getByteValue(ODurablePage.java:136)
    at com.orientechnologies.orient.core.index.hashindex.local.OHashIndexFileLevelMetadataPage.isRemoved(OHashIndexFileLevelMetadataPage.java:145)
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable20.splitBucket(OLocalHashTable20.java:1978)
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable20.doPut(OLocalHashTable20.java:1603)
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable20.put(OLocalHashTable20.java:399)
    ... 110 common frames omitted
nblair commented 1 year ago

Hi @haraleib - can you upgrade to the latest 2.x version (2.15.1) and report back?

haraleib commented 1 year ago

Hi @nblair, we updated to 2.15.1 and we get the same error as mentioned above.