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

Swarm plugin hogs CPU on OpenBSD starting from 3.37 release

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • swarm-plugin
    • None
    • Jenkins 2.387.1 (and several earlier LTSes)
      swarm-client 3.37 - 3.39 confirmed to misbehave

      As posted in https://github.com/jenkinsci/swarm-plugin/pull/493 to "Migrate from Apache HttpComponents Client to Java Platform HTTP client" which led to this misbehavior (for reasons unknown), on OpenBSD 6.5 (the earliest we have with JDK 11 to run the agent, old OS versions needed for backwards-compatibility testing of our project) at some point after agent start-up it begins hogging CPU - sometimes after a couple of minutes, sometimes closer to an hour; this was not seen on other OSes: 

      load averages: 24.62, 24.07, 18.40                   nutci-openbsd-65-amd64 20:40:02
      49 processes: 47 idle, 2 on processor                              up 70 days, 10:50
      CPU0 states: 97.0% user,  0.0% nice,  0.0% sys,  0.0% spin,  0.0% intr,  3.0% idle
      CPU1 states: 97.0% user,  0.0% nice,  2.0% sys,  1.0% spin,  0.0% intr,  0.0% idle
      CPU2 states: 95.0% user,  0.0% nice,  0.0% sys,  0.0% spin,  0.0% intr,  5.0% idle
      CPU3 states: 99.0% user,  0.0% nice,  0.0% sys,  0.0% spin,  0.0% intr,  1.0% idle
      CPU4 states: 98.0% user,  0.0% nice,  0.0% sys,  0.0% spin,  0.0% intr,  2.0% idle
      CPU5 states: 94.1% user,  0.0% nice,  1.0% sys,  0.0% spin,  0.0% intr,  5.0% idle
      Memory: Real: 979M/1865M act/tot Free: 2090M Cache: 527M Swap: 60M/700M
      
        PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
      60147 abuild    28    0 1727M  334M onproc/2  fsleep  125:20 571.29% java 

       Seems it is intensively getting the clock: 

      :; ktrace -p 26855 & sleep 1 ; kdump -l
      ...
       26855 java     RET   clock_gettime 0
       26855 java     STRU  struct timespec { 248537.795834508 }
       26855 java     STRU  struct timespec { 248537.795835658 }
       26855 java     STRU  struct timespec { 248537.795836548 }
       26855 java     STRU  struct timespec { 248537.795837448 }
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42a11f7b68)
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb438a0183d8)
       26855 java     STRU  struct timespec { 248537.795844548 }
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42f5b9fb38)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42e736cd58)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb430066f988)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb4326769d08)
       26855 java     STRU  struct timespec { 248537.795849268 }
       26855 java     RET   clock_gettime 0
       26855 java     STRU  struct timespec { 248537.795851718 }
       26855 java     STRU  struct timespec { 248537.795852688 }
       26855 java     STRU  struct timespec { 248537.795853528 }
       26855 java     STRU  struct timespec { 248537.795854398 }
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42a11f7b78)
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb438a0183c8)
       26855 java     STRU  struct timespec { 248537.795861478 }
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42f5b9fb28)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42e736cd48)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb430066f978)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb4326769cf8)
       26855 java     STRU  struct timespec { 248537.795865848 }
       26855 java     RET   clock_gettime 0
       26855 java     STRU  struct timespec { 248537.795868018 }
       26855 java     STRU  struct timespec { 248537.795869508 }
       26855 java     STRU  struct timespec { 248537.795870398 }
       26855 java     STRU  struct timespec { 248537.795871268 }
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42a11f7b68)
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb438a0183d8)
       26855 java     STRU  struct timespec { 248537.795878828 }
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42f5b9fb38)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42e736cd58)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb430066f988)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb4326769d08)
       26855 java     STRU  struct timespec { 248537.795883568 }
       26855 java     RET   clock_gettime 0
       26855 java     STRU  struct timespec { 248537.795885328 }
       26855 java     STRU  struct timespec { 248537.795886408 }
       26855 java     STRU  struct timespec { 248537.795887248 }
       26855 java     STRU  struct timespec { 248537.795888108 }
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42a11f7b78)
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     RET   clock_gettime 0
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb438a0183c8)
       26855 java     STRU  struct timespec { 248537.795894678 }
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42f5b9fb28)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb42e736cd48)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb430066f978)
       26855 java     CALL  clock_gettime(CLOCK_MONOTONIC,0xb4326769cf8)
       26855 java     STRU  struct timespec { 248537.795899128 }
       26855 java     RET   clock_gettime 0
      ... 

      spews hundreds of lines per second :\

      Marking as blocker, since this keeps us with swarm-agent 3.36 on that worker.

            Unassigned Unassigned
            jimklimov Jim Klimov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: