New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Released
Owner:
Closed: Apr 2015
Cc:



Sign in to add a comment

Fatal internal server error (NPE) upon cloning towards slave while hiding some refs

Project Member Reported by marco.mm...@gmail.com, Apr 21 2015

Issue description

Affected Version: 2.11 (post-2.10 regression)

What steps will reproduce the problem?
scenario; cf. dannorth.net/whats-in-a-story:

Given a gerrit project with exclusive access of refs/heads/branch for group G
  And a gerrit user that is not in that group (G)
When that user clones the project repo towards a gerrit --slave
Then the slave wrongfully outputs a NPE (below)
  And clone fails in a fatal fashion as a result.

What is the expected output? What do you see instead?
-Expected: a successfully cloned repo, as master still does in 2.11.
-Actual: fatal; internal server error.

Please provide any additional information below.
-NPE:
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
	at com.google.gerrit.server.git.SearchingChangeCacheImpl.get(SearchingChangeCacheImpl.java:73)
	at com.google.gerrit.server.git.VisibleRefFilter.visibleChanges(VisibleRefFilter.java:180)
	at com.google.gerrit.server.git.VisibleRefFilter.filter(VisibleRefFilter.java:91)
	at com.google.gerrit.server.git.VisibleRefFilter.filter(VisibleRefFilter.java:169)
	at com.google.gerrit.server.git.VisibleRefFilter.getAdvertisedRefs(VisibleRefFilter.java:158)
	at org.eclipse.jgit.transport.AbstractAdvertiseRefsHook.advertiseRefs(AbstractAdvertiseRefsHook.java:62)
	at org.eclipse.jgit.transport.UploadPack.sendAdvertisedRefs(UploadPack.java:783)
	at org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:662)
	at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:628)
	at com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:80)
	at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
	at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
	at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
	at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:444)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:377)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at com.google.gerrit.server.index.IndexRewriteImpl.isIndexPredicate(IndexRewriteImpl.java:210)
	at com.google.gerrit.server.index.IndexRewriteImpl.rewriteImpl(IndexRewriteImpl.java:166)
	at com.google.gerrit.server.index.IndexRewriteImpl.rewrite(IndexRewriteImpl.java:140)
	at com.google.gerrit.server.query.change.QueryProcessor.queryChanges(QueryProcessor.java:135)
	at com.google.gerrit.server.query.change.QueryProcessor.queryChanges(QueryProcessor.java:102)
	at com.google.gerrit.server.query.change.QueryProcessor.queryChanges(QueryProcessor.java:86)
	at com.google.gerrit.server.query.change.InternalChangeQuery.query(InternalChangeQuery.java:150)
	at com.google.gerrit.server.query.change.InternalChangeQuery.byProject(InternalChangeQuery.java:108)
	at com.google.gerrit.server.git.SearchingChangeCacheImpl$Loader.load(SearchingChangeCacheImpl.java:102)
	at com.google.gerrit.server.git.SearchingChangeCacheImpl$Loader.load(SearchingChangeCacheImpl.java:87)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
	... 25 more

cf. https://groups.google.com/forum/#!msg/repo-discuss/3KBuykQWa1Q/Lq7yAgeq-gIJ

 
Project Member

Comment 1 by huga...@gmail.com, Apr 21 2015

Labels: -Priority-Minor Priority-Major
Status: Accepted

Comment 2 Deleted

Project Member

Comment 3 by marco.mm...@gmail.com, Apr 23 2015

Fyi, I removed my previous (wrong) comment #2.
Project Member

Comment 4 by marco.mm...@gmail.com, Apr 23 2015

Cc: huga...@gmail.com
Owner: marco.mm...@gmail.com
Status: Started
Project Member

Comment 5 by marco.mm...@gmail.com, Apr 23 2015

Status: ChangeUnderReview
Project Member

Comment 7 by marco.mm...@gmail.com, Apr 23 2015

Moved to stable-2.11 => https://gerrit-review.googlesource.com/#/c/67405/
Labels: FixedIn-2.11.1
Status: Submitted
Status: Released

Sign in to add a comment