Closed rgrunber closed 4 weeks ago
@rgrunber this is due to jgit registering a shutdownhook but never unregister it, then when it is finally executed (maven build terminates) "something" went wrong but the text can't be loaded as the classloader is gone, so this is actually leaking.
i have already described it here in more details:
so unless there is a fix in JGit and a new release there is sadly nothing much we can do about it.
Thanks for the reference. Feel free to close unless you'd rather track it.
@laeubi is there an issue open to JGit about the root bug?
Not that I'm aware of, JGit wants me to fill a huge Issue template and last time I tried to contribute said they are not using Github for contributions so I kind of gave up on this. I really don't want this old Bugzilla/Gerrit "feeling" back ;-)
But if you like you can open one and then link it here.
I submitted https://github.com/eclipse-jgit/jgit/issues/36 to JGit. (@laeubi it was not that much of a big issue template, it wasn't taking much more time to fill it than to fill a freetext)
@mickaelistria it seems now we have the text printed, but jgit now just fails earlier:
jgit now just fails earlier
It's probably even worse ;) Can we consider adding a catch clause somewhere in Tycho to ignore this failure and turn it into a log line?
As this more seem to originate from Maven I think no... I initially assumed it was a problem with the internal OSGi framework but think its more generally a problem when the classloader is disposed as @tomaswolf explained here, in general a Shutdownhook must be used with care and I think JGit is using them wrong as described at https://docs.oracle.com/javase/8/docs/technotes/guides/lang/hook-design.html one should simply cancel a hook when it is no longer needed instead of it lingering around forever.
Is it already possible to leverage the JGit fix in Tycho?
If it is released to maven central somewhere (or a snapshot repo) it should be possible to add an additional <dependency>
element to the jgit timestamp provider.
The JGit snapshot maven repo is https://repo.eclipse.org/content/repositories/jgit-snapshots .
Fixed in 5.0.0-SNAPSHOT (via #3994) and 4.0.9 (via #3966)
I recently started seeing the following error in our Maven builds that use Tycho. There's not much info in the stacktrace and I couldn't find any references to
JGitText
in Tycho, so I thought it might have been a Jenkins plugin issue, but I see the error in GitHub Actions also. It doesn't appear to be harmful.https://github.com/redhat-developer/vscode-java/actions/runs/7708013160
We run builds on every new change, and the first one from last week where this started happening was on the bump from 4.0.4 to 4.0.5.
I've seen it in JDT UI main builds : https://ci.eclipse.org/jdt/job/eclipse.jdt.ui-github/job/master/12/console
However, there's also similar builds of the same project on Jenkins where the issue doesn't occur : https://ci.eclipse.org/ls/job/jdt-ls-master/1956/console