Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Jesse Glick
While changing the initializer settings may have happened to solve the
issue in this case, the advice is not generally applicable. Use
JENKINS-50663 for discussion.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1B6WZMdo2DHVYdETSTXiaomQKsPKqcg-UVnzAMfDbLPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Baptiste Mathus
AIUI, interesting to read and related:
https://www.cloudbees.com/blog/jenkins-plugin-developer-case-files-episode-1-when-extensions-bites-you-posterior

2018-04-10 12:26 GMT+02:00 Julien HENRY :

> My point was to clarify the specific case of GlobalConfiguration. I'm not
> pretending any Initializer should be after JOB_LOADED.
>
> The deadlock was sneaky, because it can only be reproduced if you have
> previous config data. So we haven't spotted it during our tests (because we
> start from a clean env) and we ended up releasing something broken.
>
> Julien Henry | SonarSource
>
> Developer
> https://sonarsource.com
>
> 2018-04-10 11:59 GMT+02:00 Daniel Beck :
>
>>
>> > On 10. Apr 2018, at 11:51, Julien HENRY 
>> wrote:
>> >
>> > If you look at the stacktraces, the deadlock occurs in the constructor
>> of the GlobalConfiguration, because it ends up calling OldDataMonitor that
>> itself access ExtensionList, and that seems to conflict with other plugins
>> like GitSCM that also access ExtensionList from its Initializer.
>>
>>
>> Right, so in this case it depends on the class you extend. More
>> convoluted, but still doesn't look like it can never be earlier than
>> JOB_LOADED…?
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Developers" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/jenkinsci-dev/hyMmQ-eDDVo/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> jenkinsci-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-dev/486CA78C-5D51-4FF3-AE39-021CC3499A17%40beckweb.net.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CAD9wyxE%3DmHzo8SQtLhb9ReNQo4ngkMUj8bJk
> LeMEzbAVVC79UA%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS4rwYnx04eYiLLD5BvfNk_N7EZ2T9BV3xppkNKJc3zJ0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Julien HENRY
My point was to clarify the specific case of GlobalConfiguration. I'm not
pretending any Initializer should be after JOB_LOADED.

The deadlock was sneaky, because it can only be reproduced if you have
previous config data. So we haven't spotted it during our tests (because we
start from a clean env) and we ended up releasing something broken.

Julien Henry | SonarSource

Developer
https://sonarsource.com

2018-04-10 11:59 GMT+02:00 Daniel Beck :

>
> > On 10. Apr 2018, at 11:51, Julien HENRY 
> wrote:
> >
> > If you look at the stacktraces, the deadlock occurs in the constructor
> of the GlobalConfiguration, because it ends up calling OldDataMonitor that
> itself access ExtensionList, and that seems to conflict with other plugins
> like GitSCM that also access ExtensionList from its Initializer.
>
>
> Right, so in this case it depends on the class you extend. More
> convoluted, but still doesn't look like it can never be earlier than
> JOB_LOADED…?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/hyMmQ-eDDVo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/486CA78C-5D51-4FF3-AE39-021CC3499A17%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxE%3DmHzo8SQtLhb9ReNQo4ngkMUj8bJkLeMEzbAVVC79UA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Daniel Beck

> On 10. Apr 2018, at 11:51, Julien HENRY  wrote:
> 
> If you look at the stacktraces, the deadlock occurs in the constructor of the 
> GlobalConfiguration, because it ends up calling OldDataMonitor that itself 
> access ExtensionList, and that seems to conflict with other plugins like 
> GitSCM that also access ExtensionList from its Initializer.


Right, so in this case it depends on the class you extend. More convoluted, but 
still doesn't look like it can never be earlier than JOB_LOADED…?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/486CA78C-5D51-4FF3-AE39-021CC3499A17%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Julien HENRY
The deadlock seems to occurs whatever is in the method annotated by
@Initializer. We tried to put a log at the very beginning of the method and
it was never called.

If you look at the stacktraces, the deadlock occurs in the constructor of
the GlobalConfiguration, because it ends up calling OldDataMonitor that
itself access ExtensionList, and that seems to conflict with other plugins
like GitSCM that also access ExtensionList from its Initializer.

Julien Henry | SonarSource

Developer
https://sonarsource.com

2018-04-10 11:35 GMT+02:00 Daniel Beck :

>
> > On 10. Apr 2018, at 10:39, Julien HENRY 
> wrote:
> >
> > Could it be possible to improve the situation, by at least completing
> the Javadoc, or maybe detecting and failing fast when a GlobalConfiguration
> tries to use an Initializer earlier than JOB_LOADED ?
> >
>
> It probably depends on what your initializer does.
>
> I understand the Javadoc to mean that it needs to be PLUGINS_PREPARED _or
> later_ -- if that (or something similar) would have helped, just file a PR
> to core. Thanks!
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/hyMmQ-eDDVo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/61B2D983-17C5-42B8-86D4-731E7E2F5D04%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxGDa17qejsfe_qYGX-Ew%3DFYQjQFKgKW7jmfNhk1R1Y9fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Daniel Beck

> On 10. Apr 2018, at 10:39, Julien HENRY  wrote:
> 
> Could it be possible to improve the situation, by at least completing the 
> Javadoc, or maybe detecting and failing fast when a GlobalConfiguration tries 
> to use an Initializer earlier than JOB_LOADED ?
> 

It probably depends on what your initializer does.

I understand the Javadoc to mean that it needs to be PLUGINS_PREPARED _or 
later_ -- if that (or something similar) would have helped, just file a PR to 
core. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/61B2D983-17C5-42B8-86D4-731E7E2F5D04%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.