Error in systemd logs: 'Failed to attach to cgroup /user.slice/user-1001.slice/user@1001.service: Device or resource busy'

Solution Verified - Updated -

Issue

  • When a user or automation tool rapidly starts and stops sessions for the same UID, the following errors appear in the logs:
Apr 01 00:11:10 hostname systemd[<PID>]: user@1001.service: Failed to attach to cgroup /user.slice/user-1001.slice/user@1001.service: Device or resource busy
Apr 01 00:11:10 hostname systemd[<PID>]: user@1001.service: Failed at step CGROUP spawning /usr/lib/systemd/systemd: Device or resource busy
Apr 01 00:11:10 hostname systemd[1]: user@1001.service: Main process exited, code=exited, status=219/CGROUP
Apr 01 00:11:10 hostname systemd[1]: user@1001.service: Failed with result 'exit-code'.
Apr 01 00:11:10 hostname systemd[1]: Failed to start User Manager for UID 1001.

Environment

  • Red Hat Enterprise Linux 9
  • component
    • systemd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content