Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So far unsuccessful attempt to make Jenkins startup more robust again…
…st bugs like JENKINS-25440. Even though SezpozModule.configure catches and ignores the faulty component, Guice still dies: … hudson.ExtensionFinder$GuiceFinder <init> SEVERE: Failed to create Guice container from all the plugins com.google.inject.internal.guava.collect.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jgit/storage/file/FileRepository at … at com.google.inject.Guice.createInjector(Guice.java:73) at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:279)
- Loading branch information
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22d433d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kohsuke FYI, Guice system still does not protect against all problems in plugins. This one is easily reproduced but I did not manage to track it down.
22d433d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a little more debugging. It turns out that there are two extensions at play.
JenkowWorkflowRepository
is the one that has aNoClassDefFoundError
, whichconfigure
does notice, so this extension is skipped with a warning. But then there is alsoJenkowWorkflowRepositorySSHAccess
which@Inject
s aJenkowWorkflowRepository
.configure
does not get any error from that, so it passes it on to Guice to bind, which then dies with the linkage error.I tried to reproduce all this in
ExtensionFinderTest.testFailingInstance
without luck. It seems that this test is provoking a different kind of error: one caught byFaultTolerantScope
, whereas the problem here is errors caught earlier bySezpozModule.resolve
. I am not sure how to adjust the test to behave the way I expect it to, since the real behavior involves a linkage error thrown when resolving a class, rather than instantiating it.How serious is this? The severity is critical: Jenkins does not start. On the other hand, the problem only seems to affect cases where there is not only a linkage error (hopefully unusual), but
@Inject
is also used among extensions (which is rarely done).22d433d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing the context here. Is there a way for me to reproduce this? It sounds like I need to run Jenkow plugin with some specific version of git-client plugin?
It feels like this is something we can punt on for a few weeks easily. Yes, Jenkins fails to start, but hopefully the log is making it obvious where the problem lies (or is it not?), and so the admin can be instructed to go into $JENKINS_HOME and downgrade/remove faulty plugins. I think it's a fairly straightforward procedure.
22d433d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JENKINS-25440 is the context. IIRC I merely tried to install the Jenkow plugins on 1.580.x.
It does not.