marcust / gitant

Ant Task integration for Git using JGit, mostly to extract Revision info
5 stars 2 forks source link

git-info is running forever #1

Open 1stone opened 10 years ago

1stone commented 10 years ago

I'm using the gitant task "git-info" within several ant projects to retrieve git information for code tagging. This runs fine within many projects, but with some the invocation of git-info takes terribly long (over 10 minutes to return!) and burns the CPU.

So far, I was not able to figure out any reason for that. The underlying git repository isn't very large (in comparison to others where git-info is running fine). Monitoring the JVM (ant) didn't show significant GC activity but high CPU load. I tried "git gc" and "git fsck" to clean/fix any potential anomalies within the git repository, but no effect.

Any hints welcome.

1stone commented 10 years ago

This was tested with a previous SNAPSHOT but also with v0.1.2.

1stone commented 10 years ago

See http://pastebin.com/7QRQa5gE for a full JVM thread dump when waiting on git-info

marcust commented 10 years ago

Well, first glance on the dump shows that there are an awfull lot of recursive "findFirstReachable" calls. But I don't think that you could actually produce a cycle in your git graph. Maybe you can path it to show what it actually does at that point. I guess you can't give me the repository?

1stone commented 9 years ago

There is nothing particular complicated in the git graph. In fact, it is managed with Gitflow (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/). Unfortunately, I'm not able to provide the repository ;)

By now, the repository has advanced with new labels and branches, so that I'm currently unable to reproduce the problem. If there is anything despite that you would like me to test or provide, let me know.

In any case, I'll keep this on my radar and post any new findings as soon as this happens again.