jgit complaining that “close() called when useCnt is already zero”

1,148 views
Skip to first unread message

Benoit Sigoure

unread,
Jun 13, 2017, 8:44:49 PM6/13/17
to Repo and Gerrit Discussion
Hi,
For a while we’ve seen a lot of log spam like this in Gerrit’s error log:

[2017-06-13 17:17:08,356] [HTTP-4503] WARN  org.eclipse.jgit.lib.Repository : close() called when useCnt is already zero for Repository[/persist/home/gerrit2/gerrit/git/ardc-config.git]
[2017-06-13 17:17:25,080] [pool-31-thread-2] WARN  org.eclipse.jgit.lib.Repository : close() called when useCnt is already zero for Repository[/persist/home/gerrit2/gerrit/git/ardc-config.git]

We upgraded to Gerrit 2.14.1 on Sunday and since the upgrade we see this warning thousands of times per day.  I’m not sure whether it’s related to the upgrade though, we’ve seen it for a while, it just seems spammier right now.  Currently it’s always this same repo causing all the spam.  I don’t know what’s special about it, it’s one of our smaller repos with very little activity (maybe 3-5 commits per day).

Just in case it matters, we have the following plugins enabled:

Plugin NameSettingsVersionStatus
commit-message-length-validatorv2.14.1Enabled
download-commandsv2.14.1Enabled
gitblit2.14.171.0Enabled
hooksv2.14.1Enabled
javamelodyv2.13Enabled
metrics-reporter-jmx5d70993Enabled
reviewers-by-blame40d1941Enabled
reviewnotesv2.14.1Enabled

--
Benoit "tsuna" Sigoure

David Pursehouse

unread,
Jun 13, 2017, 9:28:22 PM6/13/17
to Benoit Sigoure, Repo and Gerrit Discussion
On Wed, Jun 14, 2017 at 9:44 AM Benoit Sigoure <tsun...@gmail.com> wrote:
Hi,
For a while we’ve seen a lot of log spam like this in Gerrit’s error log:

[2017-06-13 17:17:08,356] [HTTP-4503] WARN  org.eclipse.jgit.lib.Repository : close() called when useCnt is already zero for Repository[/persist/home/gerrit2/gerrit/git/ardc-config.git]
[2017-06-13 17:17:25,080] [pool-31-thread-2] WARN  org.eclipse.jgit.lib.Repository : close() called when useCnt is already zero for Repository[/persist/home/gerrit2/gerrit/git/ardc-config.git]


These warnings *should* no longer be appearing from core Gerrit or core plugins.

Is it possible to enable debug logging?  The DEBUG log should include a stack trace that will show the caller of close().
--
Benoit "tsuna" Sigoure

--
--
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.
For more options, visit https://groups.google.com/d/optout.

luca.mi...@gmail.com

unread,
Jun 14, 2017, 2:07:48 AM6/14/17
to Benoit Sigoure, David Pursehouse, Repo and Gerrit Discussion
You have GitBlit amongst the plugins, which uses JGit as well.
It could be as well the cause of the spamming.

Luca

Sent from my iPhone

Stephan Leuschner

unread,
Sep 11, 2017, 2:38:40 AM9/11/17
to Repo and Gerrit Discussion
Having the same issue with 2.14.2
Enabled DEBUG logging

[2017-09-06 13:29:15,650] [SSH git-upload-pack '/REPONAME' (USERNAME)] DEBUG org.eclipse.jgit.lib.Repository : close() called when useCnt is already zero for Repository[REPOPATH]
java.lang.IllegalStateException
 at org.eclipse.jgit.lib.Repository.close(Repository.java:907)
 at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:99)
 at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:30)
 at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:63)
 at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:418)
 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
 at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:418)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)

Happening VERY often!

Luca Milanesio

unread,
Sep 11, 2017, 3:56:25 AM9/11/17
to Stephan Leuschner, Repo and Gerrit Discussion
Seems a debug message, do you see any issues in Gerrit that could be associated to that?

Luca.

Reply all
Reply to author
Forward
0 new messages