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

java.io.IOException: Unexpected cgroup syntax (docker+jenkins+systemd)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: docker-workflow-plugin
    • Environment:
      RHEL 8 beta
      Jenkins 2.173
      - rpm based Installation
      - started as Service
      - running in docker container
      docker 18.09.2
      Jenkins container/Docker host on same machine - using shared binary, socket via bind mounts
    • Similar Issues:
    • Released As:
      1.24

      Description

      Hi,

      following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change https://github.com/jenkinsci/docker-workflow-plugin/pull/169 might be too restrictive.

      Szenario, cf. Field Environment with the following configuration in Jenkins:

      - pipeline script (tried both with groovy sandbox unchecked and checked):

      pipeline {
          agent {
              docker {
                  image 'xxx'
              }
          }
          stages {
              stage('Build') { 
                  steps {
                      sh 'echo "abc"' 
                  }
              }
          }
      }
      • console output of a build:
      Started by user yyy
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on Jenkins in /var/lib/jenkins/workspace/abcd
      [Pipeline] {
      [Pipeline] sh
      + docker inspect -f . xxx
      .
      [Pipeline] withDockerContainer
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
      	at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
      	at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
      	at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
      	at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
      	at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
      ...
      

      Does jenkins check its own cgroup?

      ps -xp 1310:
      1310 ?        Ssl    2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...
      
      cat /proc/1310/cgroup
      12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
      11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
      10:rdma:/
      9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
      2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
      1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
      

      Seems that systemd adds some harm. Running Jenkins in a container without systemd is fine: without any cgroup having a suffix '/system.slice/jenkins.service'.

        Attachments

          Issue Links

            Activity

            whans werner hans created issue -
            whans werner hans made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-56888 [ JENKINS-56888 ]
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/bus_master
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Is the following process' cgroup checked?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/bus_master
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check it's own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/bus_master
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check it's own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/bus_master
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/bus_master
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . image_wlpbuild
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . abcd
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . abcd
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . xxx
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . xxx
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkings check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . xxx
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkins check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            whans werner hans made changes -
            Summary java.io.IOException: Unexpected cgroup syntax java.io.IOException: Unexpected cgroup syntax (docker+jenkins+systemd)
            whans werner hans made changes -
            Environment RHEL 8 beta
            Jenkins 2.173 (rpm based installation, running as service, running as docker container)
            docker 18.09.2
            Jenkins container/Docker host on same machine - using shared binary, socket via bind mounts
            RHEL 8 beta
            Jenkins 2.173
            - rpm based Installation
            - started as Service
            - running in docker container
            docker 18.09.2
            Jenkins container/Docker host on same machine - using shared binary, socket via bind mounts
            whans werner hans made changes -
            Description Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . xxx
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkins check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}
            Hi,

            following behaviour is very similar to JENKINS-56888, with another cgroup pattern. Change [https://github.com/jenkinsci/docker-workflow-plugin/pull/169] might be too restrictive.

            Szenario, cf. Field Environment with the following configuration in Jenkins:

            - pipeline script (tried both with groovy sandbox unchecked and checked):
            {code:java}
            pipeline {
                agent {
                    docker {
                        image 'xxx'
                    }
                }
                stages {
                    stage('Build') {
                        steps {
                            sh 'echo "abc"'
                        }
                    }
                }
            }{code}
             - console output of a build:

            {code:java}
            Started by user yyy
            Running in Durability level: MAX_SURVIVABILITY
            [Pipeline] Start of Pipeline
            [Pipeline] node
            Running on Jenkins in /var/lib/jenkins/workspace/abcd
            [Pipeline] {
            [Pipeline] sh
            + docker inspect -f . xxx
            .
            [Pipeline] withDockerContainer
            [Pipeline] // withDockerContainer
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] End of Pipeline
            java.io.IOException: Unexpected cgroup syntax /docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:60)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:45)
            at org.jenkinsci.plugins.docker.workflow.client.ControlGroup.getContainerId(ControlGroup.java:37)
            at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerIdIfContainerized(DockerClient.java:336)
            at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:159)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268)
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
            ...
            {code}
            Does jenkins check its own cgroup?
            {code:java}
            ps -xp 1310:
            1310 ? Ssl 2:12 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib...

            cat /proc/1310/cgroup
            12:memory:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            11:pids:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            10:rdma:/
            9:hugetlb:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            8:blkio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            7:perf_event:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            6:freezer:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            5:cpuset:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            4:cpu,cpuacct:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            3:devices:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            2:net_cls,net_prio:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383
            1:name=systemd:/docker/f334457e283784c7aac6cbf6245c135037a0c1cd36fd983a285f67ac7d1e0383/system.slice/jenkins.service
            {code}

            Seems that systemd adds some harm. Running Jenkins in a container without systemd is fine: without any cgroup having a suffix '/system.slice/jenkins.service'.
            whans werner hans made changes -
            Priority Minor [ 4 ] Trivial [ 5 ]
            carroll Carroll Chiou made changes -
            Link This issue is duplicated by JENKINS-56888 [ JENKINS-56888 ]
            carroll Carroll Chiou made changes -
            Released As 1.24
            Assignee Carroll Chiou [ carroll ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            carroll Carroll Chiou made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              carroll Carroll Chiou
              Reporter:
              whans werner hans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: