Bug 582618 - Corrupt .bitmap files generated during GC
Summary: Corrupt .bitmap files generated during GC
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 6.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-08 10:14 EST by Petr Hrebejk CLA
Modified: 2023-11-08 10:15 EST (History)
0 users

See Also:


Attachments
Repo before GC (3.80 MB, application/zip)
2023-11-08 10:14 EST, Petr Hrebejk CLA
no flags Details
Repo after GC (496.12 KB, application/zip)
2023-11-08 10:15 EST, Petr Hrebejk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hrebejk CLA 2023-11-08 10:14:43 EST
Created attachment 289226 [details]
Repo before GC

See the attached files the GC on the repo in before.zip procuces the repo in after.zip including the .bitmap file. When you take the after repo put it in some jGit based git server the repo can not be cloned due to:

java.lang.IllegalArgumentException: java.lang.IndexOutOfBoundsException: 0
	at org.eclipse.jgit.internal.storage.file.BitmapIndexImpl$MutableBitmapIndex.getObject(BitmapIndexImpl.java:427) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.file.BitmapIndexImpl$CompressedBitmap$1.next(BitmapIndexImpl.java:366) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.file.BitmapIndexImpl$CompressedBitmap$1.next(BitmapIndexImpl.java:1) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.pack.PackWriter.findObjectsToPackUsingBitmaps(PackWriter.java:2246) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.pack.PackWriter.findObjectsToPack(PackWriter.java:2026) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack(PackWriter.java:1027) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:2424) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:2311) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.fetchV2(UploadPack.java:1302) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.serveOneCommandV2(UploadPack.java:1365) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.serviceV2(UploadPack.java:1426) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.transport.UploadPack.uploadWithExceptionPropagation(UploadPack.java:875) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.UploadPackServlet.upload(UploadPackServlet.java:191) ~[org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.UploadPackServlet.lambda$1(UploadPackServlet.java:170) ~[org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.UploadPackServlet.defaultUploadPackHandler(UploadPackServlet.java:210) ~[org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.UploadPackServlet.doPost(UploadPackServlet.java:173) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
	at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:212) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.UploadPackServlet$Factory.doFilter(UploadPackServlet.java:137) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:210) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.RepositoryFilter.doFilter(RepositoryFilter.java:109) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:210) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.NoCacheFilter.doFilter(NoCacheFilter.java:50) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:210) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.UrlPipeline.service(UrlPipeline.java:189) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.SuffixPipeline.service(SuffixPipeline.java:70) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.MetaFilter.doFilter(MetaFilter.java:148) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.http.server.glue.MetaServlet.service(MetaServlet.java:106) [org.eclipse.jgit.http.server-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at com.tasktop.c2c.server.scm.web.GitSmartHttpServlet.service(GitSmartHttpServlet.java:171) [com.tasktop.c2c.server-scm.server-1.34.0-SNAPSHOT.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
	at org.springframework.web.servlet.handler.SimpleServletHandlerAdapter.handle(SimpleServletHandlerAdapter.java:67) [spring-webmvc-5.3.30.jar:5.3.30]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072) [spring-webmvc-5.3.30.jar:5.3.30]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965) [spring-webmvc-5.3.30.jar:5.3.30]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.30.jar:5.3.30]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) [spring-webmvc-5.3.30.jar:5.3.30]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.30.jar:5.3.30]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.springframework.tenancy.web.TenancyContextIntegrationFilter.doFilter(TenancyContextIntegrationFilter.java:64) [spring-tenancy-2.0.0.BUILD-SNAPSHOT.jar:?]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.30.jar:5.3.30]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:352) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:117) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:164) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:150) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190) [spring-security-web-5.8.7.jar:5.8.7]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.30.jar:5.3.30]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.30.jar:5.3.30]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.17.1.jar:2.17.1]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [jetty-security-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IndexOutOfBoundsException: 0
	at org.eclipse.jgit.util.BlockList.get(BlockList.java:98) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	at org.eclipse.jgit.internal.storage.file.BitmapIndexImpl$MutableBitmapIndex.getObject(BitmapIndexImpl.java:420) ~[org.eclipse.jgit-6.7.0.202309050840-r.jar:6.7.0.202309050840-r]
	


Actually tested again jGit 6.7 but did not find the version in the listbox
Comment 1 Petr Hrebejk CLA 2023-11-08 10:15:57 EST
Created attachment 289227 [details]
Repo after GC