"cgroup v2 unified hierarchy" on macox monterey, latest circleci/picard, yikes

One of my favorite CircleCI features stopped working for me recently: local builds using circleci CLI.

Here’s the error:

Error: 
Unexpected environment preparation error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy

FWIW, this used to work fine a few weeks ago.

I tried deleting: ~/.circleci/build_agent_settings.json
Also prune all my docker stuff via:

docker system prune --all

More details:
MacOS: 12.0.1 (21A559)

$ circleci version
0.1.16535+5010eb7 (homebrew)

Command:

$ circleci local execute -c .circleci/local-config.yml --job 'build'
Docker image digest: sha256:d1c138870d351735f88da6ce191aaa88bff32872d238e95df01d0d5b1a5ef88b
====>> Spin up environment
Build-agent version  ()
System information:
 Server Version: 20.10.11
 Storage Driver: overlay2
  Backing Filesystem: extfs
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Kernel Version: 5.10.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64

Error: 
Unexpected environment preparation error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy

Step failed
Task failed
Error: Unhandled prepare executor error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy

Any suggestions?

2 Likes

Also seeing this with the latest CLI (0.1.16535) when using macOS with Docker Desktop 4.3.0. It wasn’t a problem with Docker 4.2.0.

Maybe it’s related to this in the Docker 4.3.0 changelog:

Docker Desktop now uses cgroupv2. If you need to run systemd in a container then…

Hey folks wanted to provide an update on this issue, we recently pushed a fix that we believe addresses this issue on both macOS and Linux. Details are in the GitHub issue I linked above. If you are still seeing issues, do not hesitate to comment in either this post or the GitHub Issue.

1 Like

Thanks! After running the suggested: rm ~/.circleci/build_agent_settings.json, all was well again with local CircleCI builds. Joy!

1 Like

Thanks, that fixed it on my MacBook :smile: