Thanks and Regards,Rajesh
On Tuesday, April 16, 2024 at 6:29:48 PM UTC+1 Rajesh Babhulkar wrote:Hi ,We are using Gerrit version 3.9.1 . Found the following error in error log. Can someone please help to fix this? ow can we fix this error?[2024-04-16T00:45:09.240-04:00] [SSH git-upload-pack /abc (xxxx)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user xxxx account 1004013) during git-upload-pack '/wnc'
org.eclipse.jgit.transport.UploadPackInternalServerErrorException
at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:819)
at com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:101)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:109)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:74)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:492)
at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:675)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: org.eclipse.jgit.transport.WantNotValidException: want 38ce168b1ba9b5dee575d84f58099266a472370d not valid
at org.eclipse.jgit.transport.UploadPack$AdvertisedRequestValidator.checkWants(UploadPack.java:1989)
CLIENT: What refs do you have?
SERVER:
REF-UPDATE: refs/heads/volatile-dev-branch is force pushed making dc79180... orphan
CLIENT:: I want dc7d9180725d1bd4ca2d6c23fc7d0217c26f5d87
SERVER: Internal Server Error "want dc7d9180725d1bd4ca2d6c23fc7d0217c26f5d87 not valid" (since it's no longer reachable from any branch).
As far as I'm aware this is due to a security feature in Gerrit that will prevent you from cloning/fetching if the sha1 you're trying to fetch is not advertised anymore when you get to fetch it.
Couldn't find any better docs on this than [1]
Retrying should fix the issue. You can also set uploadpack.allowanysha1inwant to true(as per link), but this might have some security implications. Ensure you understand them before enabling this setting.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=573390
Thanks and Regards,Rajesh
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/43ab1e4a-5867-4f0e-8805-9fd01f217a45n%40googlegroups.com.
--For us it affects large and busy repositories where some workflows include mirror clones or fetches of refs/changes/*, since those include notedb refs (e.g. refs/changes/01/101/meta), which tend to be updated a lot (comments, votes, etc.).As far as I'm aware this is due to a security feature in Gerrit that will prevent you from cloning/fetching if the sha1 you're trying to fetch is not advertised anymore when you get to fetch it.
Couldn't find any better docs on this than [1]
Retrying should fix the issue. You can also set uploadpack.allowanysha1inwant to true(as per link), but this might have some security implications. Ensure you understand them before enabling this setting.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=573390
Thanks and Regards,Rajesh--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/43ab1e4a-5867-4f0e-8805-9fd01f217a45n%40googlegroups.com.
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/eb9562cf-f5c6-46f2-9124-9b96e6954c01n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/5676c71f-d627-4855-9706-d32cb2b21841n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAG7bb4BYUVPppdxN2SD5vC4_F-3R2TpS821wNJrcx0%3DsKube8A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/831af0f1-59fa-41a3-b60d-55fb1cca57fbn%40googlegroups.com.
which may cause discrepancies causing that AdvertisedRequestValidator fails. I am thinking about fixing that by using SnapshottingRefDirectory in thismethod.
This should have the effect that each ref is read at most once and such races shouldn't happen anymore without compromising visibility checks in Gerrit.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAKSZd3QEr1x2otS737uyyuagknn%3D0QysrRrXhTbsx9qYP%2BAf9Q%40mail.gmail.com.
One thing should be mentioned though: the difference between Git/SSH and Git/HTTP.Git/SSH:- there is a unique session with JGit- JGit “remembers” the list of advertised refs- JGit validates the “wants” against the ones “remembered” in the session, even if then have changed on the repo in the meantimeGit/HTTP:- each HTTP call is separate, there no unique session (or state) with JGit on the server- JGit “computes” the visible refs that are advertised- JGit validates the “wants” against the ones “visible at the time” of the HTTP callI have verified that the wants-not-valid because of the repo being very active happens on Git/HTTP a lot more than on Git/SSH, because of the way the protocol works.
--Piotr
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/1969464b-8407-4fd9-a4d6-afabf7d74a1dn%40googlegroups.com.
[...] I understand this can help, as in V2 client can fetch arbitrary OID and in my case V0/V1 is being used.
If V0/V1 is used, allowAnySHA1InWant can help, so JGit 6.5 / Gerrit 3.7.1.
Yet I was not able to enable uploadPack.allowAnySHA1InWant. I tried to add it to:- $site_path/etc/gerrit.config- $site_path/etc/jgit.config- $site_path/git/project.git/configall without success.