[JIRA] (JENKINS-57466) non-atomic operations on volatile field inspection - hudson.model.UpdateSite.isDue

12 views
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
May 14, 2019, 12:10:34 PM5/14/19
to jenkinsc...@googlegroups.com
Josh Soref created an issue
 
Jenkins / Bug JENKINS-57466
non-atomic operations on volatile field inspection - hudson.model.UpdateSite.isDue
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: image-2019-05-14-12-07-58-232.png
Components: core
Created: 2019-05-14 16:09
Priority: Minor Minor
Reporter: Josh Soref

IntelliJ IDEA 2019.1.2 (Ultimate Edition)
Build #IU-191.7141.44, built on May 7, 2019
JRE: 1.8.0_202-release-1483-b49 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

Steps:

  1. Open hudson.model.UpdateSite (.java) in IntelliJ
  2. Analyze > Inspect Code...
  3.  File ...UpdateSite.java
  4. OK

Actual results

non-atomic operations on volatile field inspection

Reports any non-atomic operations on volatile fields. Non-atomic operations on volatile fields are operations where the field is read and the value is used to update the field. It is possible for the value of the field to change between the read and the write, possibly invalidating the operation. The non-atomic operation can be avoided by surrounding it with a synchronized block or by making use of one of the classes from the java.util.concurrent.atomic package.

~~~~~~~~~~~~~~~~~~~~~~~~
            retryWindow = Math.max(retryWindow,SECONDS.toMillis(15));
~~~~~~~~~~~~~~~~~~~~~~~~
            lastAttempt = now;
            retryWindow = Math.min(retryWindow*2, HOURS.toMillis(1)); // exponential back off but at most 1 hour
        }
~~~~~~~~~~~~~~~~~~~~~~~~
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jsoref+jenkins@gmail.com (JIRA)

unread,
May 14, 2019, 12:11:01 PM5/14/19
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
May 14, 2019, 12:15:02 PM5/14/19
to jenkinsc...@googlegroups.com

wfollonier@cloudbees.com (JIRA)

unread,
May 28, 2019, 8:53:02 AM5/28/19
to jenkinsc...@googlegroups.com

wfollonier@cloudbees.com (JIRA)

unread,
May 28, 2019, 8:53:03 AM5/28/19
to jenkinsc...@googlegroups.com
Wadeck Follonier started work on Bug JENKINS-57466
 
Change By: Wadeck Follonier
Status: Open In Progress

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 13, 2019, 4:39:02 PM6/13/19
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 18, 2019, 8:27:02 AM6/18/19
to jenkinsc...@googlegroups.com
Change By: Oleg Nenashev
Status: In Review Resolved
Resolution: Fixed
Released As: Jenkins 2.181
Reply all
Reply to author
Forward
0 new messages