Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41797

Jenkins jobs loading stuck resetting ProxyWhitelist

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: script-security-plugin
    • Labels:
      None
    • Environment:
      Script Security Plugin 1.19
      Permissive Script Security Plugin 0.1 (does not seem to be related)
    • Similar Issues:

      Description

      All 32 of my loading threads got stuck there never seem to resume again.

      "Loading job my-task" #51 daemon prio=5 os_prio=0 tid=0x00007efeb011e800 nid=0x32c66 runnable [0x00007eff48245000]
         java.lang.Thread.State: RUNNABLE
      	at java.util.WeakHashMap.put(WeakHashMap.java:453)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.ProxyWhitelist.reset(ProxyWhitelist.java:95)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.ProxyWhitelist.<init>(ProxyWhitelist.java:54)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.ProxyWhitelist.<init>(ProxyWhitelist.java:117)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.run(GroovySandbox.java:136)
      	at hudson.matrix.FilterScript.evaluate(FilterScript.java:45)
      	at hudson.matrix.FilterScript.apply(FilterScript.java:85)
      	at hudson.matrix.Combination.evalGroovyExpression(Combination.java:101)
      	at hudson.matrix.Combination.evalGroovyExpression(Combination.java:91)
      	at hudson.matrix.MatrixProject.rebuildConfigurations(MatrixProject.java:641)
      	at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:508)
      	at hudson.model.Items.load(Items.java:320)
      	at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

          Hide
          olivergondza Oliver Gondža added a comment -

          Fix proposed.

          Show
          olivergondza Oliver Gondža added a comment - Fix proposed.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java
          http://jenkins-ci.org/commit/script-security-plugin/d0a5fbce93218e17341f866f27fdba2be77e2b08
          Log:
          JENKINS-41797 Make sure wrapper WeakHashMap will not be manipulated concurrenlty

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java http://jenkins-ci.org/commit/script-security-plugin/d0a5fbce93218e17341f866f27fdba2be77e2b08 Log: JENKINS-41797 Make sure wrapper WeakHashMap will not be manipulated concurrenlty
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java
          http://jenkins-ci.org/commit/script-security-plugin/598d7ef3040b5e65e30a0d46ba6560f257812453
          Log:
          Merge pull request #106 from olivergondza/JENKINS-41797

          [FIXED JENKINS-41797] Make sure wrapper WeakHashMap will not be manipulated concurrenlty

          Compare: https://github.com/jenkinsci/script-security-plugin/compare/7d56ac842117...598d7ef3040b

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java http://jenkins-ci.org/commit/script-security-plugin/598d7ef3040b5e65e30a0d46ba6560f257812453 Log: Merge pull request #106 from olivergondza/ JENKINS-41797 [FIXED JENKINS-41797] Make sure wrapper WeakHashMap will not be manipulated concurrenlty Compare: https://github.com/jenkinsci/script-security-plugin/compare/7d56ac842117...598d7ef3040b
          Show
          lvotypkova Lucie Votypkova added a comment - Hello I caught the same issue with Script Security Plugin 1.41 - the same stacktrace, no lock for this operation and 15 threads got stuck. I think it comes with this change https://github.com/jenkinsci/script-security-plugin/commit/1ecf82eed7ab18bde4a781d5eb2768288f6f1ffe#diff-9d227066b0b6daf6826d5e00deddd362 this collection is not protected https://github.com/jenkinsci/script-security-plugin/blob/master/src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java#L68 and threads got stuck here  https://github.com/jenkinsci/script-security-plugin/blob/master/src/main/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/ProxyWhitelist.java#L121

            People

            • Assignee:
              olivergondza Oliver Gondža
              Reporter:
              olivergondza Oliver Gondža
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: