[JIRA] [disk-usage-plugin] (JENKINS-30934) Changing crontab settings blocks "configSubmit" for 3x60 seconds

2 views
Skip to first unread message

tom.gl@free.fr (JIRA)

unread,
Oct 13, 2015, 5:12:02 PM10/13/15
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour created an issue
 
Jenkins / Bug JENKINS-30934
Changing crontab settings blocks "configSubmit" for 3x60 seconds
Issue Type: Bug Bug
Assignee: Lucie Votypkova
Components: disk-usage-plugin
Created: 13/Oct/15 9:11 PM
Priority: Major Major
Reporter: Thomas de Grenier de Latour

With recent disk-usage plugin (0.26+), changing the crontab expressions in the global settings will block Jenkins configuration for (up to) 180 seconds (when the 3 crontab settings are modified at once).

Taking several thread-dumps when it happens shows, successively, the following three stacks:

"Handling POST /jenkins/configSubmit from 127.0.0.1 : RequestHandlerThread[#14]" daemon prio=10 tid=0x00007f2c4820d000 nid=0x3311 waiting on condition [0x00007f2c2e7dd000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at hudson.plugins.disk_usage.DiskUsageCalculation.reschedule(DiskUsageCalculation.java:101)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configureBuildsCalculation(DiskUsageProjectActionFactory.java:359)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configure(DiskUsageProjectActionFactory.java:293)
	at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:2899)
	at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:2862)
...
"Handling POST /jenkins/configSubmit from 127.0.0.1 : RequestHandlerThread[#14]" daemon prio=10 tid=0x00007f2c4820d000 nid=0x3311 waiting on condition [0x00007f2c2e7dd000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at hudson.plugins.disk_usage.DiskUsageCalculation.reschedule(DiskUsageCalculation.java:101)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configureJobsCalculation(DiskUsageProjectActionFactory.java:369)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configure(DiskUsageProjectActionFactory.java:294)
	at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:2899)
	at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:2862)
...
"Handling POST /jenkins/configSubmit from 127.0.0.1 : RequestHandlerThread[#14]" daemon prio=10 tid=0x00007f2c4820d000 nid=0x3311 waiting on condition [0x00007f2c2e7dd000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at hudson.plugins.disk_usage.DiskUsageCalculation.reschedule(DiskUsageCalculation.java:101)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configureWorkspacesCalculation(DiskUsageProjectActionFactory.java:379)
	at hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl.configure(DiskUsageProjectActionFactory.java:295)
	at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:2899)
	at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:2862)
...

The offending commit is this one, which introduces a Thread.sleep(60000) in DiskUsageCalculation.reschedule():
https://github.com/jenkinsci/disk-usage-plugin/commit/9ec92f4887032f3dadbe52f91a803b638fe7721e

I don't understand (at all) the purpose of this sleep calls (is it some testing/debugging code which should have been removed before commit?), thus I'm not able to submit a PR.

Thanks for having a look at this,
Thomas.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

tom.gl@free.fr (JIRA)

unread,
Oct 13, 2015, 5:55:01 PM10/13/15
to jenkinsc...@googlegroups.com

I don't understand (at all) the purpose of this sleep calls (is it some testing/debugging code which should have been removed before commit?), thus I'm not able to submit a PR.

Actually, since "it's testing code" is the only explanation I can think of, I've submitted a PR to drop it:
https://github.com/jenkinsci/disk-usage-plugin/pull/37

lvotypko@redhat.com (JIRA)

unread,
Oct 14, 2015, 7:02:01 AM10/14/15
to jenkinsc...@googlegroups.com

Hi,
this sleep time was because cron is only in minutes. I do not remember where the problem was exactly. It was before there was so many calculation threads. I will look at it, I believe there is better way how to do it (without so much sleeping).

scm_issue_link@java.net (JIRA)

unread,
Oct 16, 2015, 7:49:01 AM10/16/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Thomas de Grenier de Latour
Path:
src/main/java/hudson/plugins/disk_usage/DiskUsageCalculation.java
http://jenkins-ci.org/commit/disk-usage-plugin/f0ffb21fc598d532a5094240ac5285521e7e29b4
Log:
JENKINS-30934 - remove dubious Thread.sleep(60000)

scm_issue_link@java.net (JIRA)

unread,
Oct 16, 2015, 7:49:02 AM10/16/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Lucie Votypkova
Path:
src/main/java/hudson/plugins/disk_usage/DiskUsageCalculation.java
http://jenkins-ci.org/commit/disk-usage-plugin/8ca492d321ad1df66e77b7b6fe0b3c1ea6a97ce5
Log:
Merge pull request #37 from thomasgl-orange/dont-Thread-sleep

JENKINS-30934 - remove dubious Thread.sleep(60000)

tom.gl@free.fr (JIRA)

unread,
Feb 11, 2020, 3:27:07 AM2/11/20
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour closed an issue as Fixed
 

Closing my old resolved issues...

Change By:
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages