[SRU] Log flood when installing acpid and acpi-support inside a 22.04 container

Bug #1977896 reported by Simon Déziel
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
acpid (Debian)
Fix Released
Unknown
acpid (Ubuntu)
Fix Released
Undecided
Luís Infante da Câmara

Bug Description

[Impact]
The acpid.service unit contains `ConditionVirtualization=!container` but something keeps asking systemd to start the acpid service which is not possible due to the unmet condition (!container).

The acpid.path unit contains `DirectoryNotEmpty=/etc/acpi/events/` meaning that it uses inotify to trigger the acpid.service which is probably what's causing the endless loop.

This SRU fixes this by adding `ConditionVirtualization=!container` to acpid.path and acpid.socket, that is listed in the Requires of acpid.service.

[Test Plan]
1) Create Jammy and Focal containers
lxc launch ubuntu:22.04 jammy-ctn
lxc launch ubuntu:20.04 focal-ctn
2) Install acpid and acpi-support in the Jammy container
lxc exec jammy-ctn -- apt-get update
lxc exec jammy-ctn -- apt-get install -Vy acpid acpi-support
3) Check the logs while apt is stalled at "Setting up acpi-support"
lxc exec jammy-ctn -- journalctl -fu acpid.service
4) Stop the Jammy container
lxc stop jammy-ctn
5) Install acpid and acpi-support in the Focal container
lxc exec focal-ctn -- apt-get update
lxc exec focal-ctn -- apt-get install -Vy acpid acpi-support
6) Check the logs while apt is stalled at "Setting up acpi-support", if it gets stalled, or after the installation otherwise
lxc exec focal-ctn -- journalctl -fu acpid.service

3) will show a huge flood of, and 6) will show several of:

Jun 07 23:42:50 jammy-ctn systemd[1]: Condition check resulted in ACPI event daemon being skipped.

A workaround is to empty /etc/acpi/events with:

lxc exec $CONTAINER -- sh -c 'mv /etc/acpi/events/* /tmp/'

[Where problems could occur]
This could affect non-container environments, such as native Ubuntu machines and Ubuntu VMs.

Changed in acpid (Debian):
status: Unknown → New
Changed in acpid (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in acpid (Ubuntu):
status: New → Confirmed
Revision history for this message
brian mullan (bmullan) wrote :

This bug affects all 22.04 LXD Container configuration for me.

Revision history for this message
brian mullan (bmullan) wrote :

Additional Log info from my LXD ubuntu 22.04 container

$ lxc exec cn1 bash

root@cn1:~# apt-get install -Vy acpid acpi-support

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
   libfreetype6 (2.11.1+dfsg-1ubuntu0.1)
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
   libiw30 (30~pre9-13.1ubuntu4)
   wireless-tools (30~pre9-13.1ubuntu4)
Recommended packages:
   toshset
The following NEW packages will be installed:
   acpi-support (0.144)
   acpid (1:2.0.33-1ubuntu1)
   libiw30 (30~pre9-13.1ubuntu4)
   wireless-tools (30~pre9-13.1ubuntu4)
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 174 kB of archives.
After this operation, 588 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 acpid amd64 1:2.0.33-1ubuntu1 [35.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 acpi-support amd64 0.144 [9954 B]
Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libiw30 amd64 30~pre9-13.1ubuntu4 [18.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 wireless-tools amd64 30~pre9-13.1ubuntu4 [110 kB]
Fetched 174 kB in 1s (238 kB/s)
Selecting previously unselected package acpid.
(Reading database ... 33820 files and directories currently installed.)
Preparing to unpack .../acpid_1%3a2.0.33-1ubuntu1_amd64.deb ...
Unpacking acpid (1:2.0.33-1ubuntu1) ...
Selecting previously unselected package acpi-support.
Preparing to unpack .../acpi-support_0.144_amd64.deb ...
Unpacking acpi-support (0.144) ...
Selecting previously unselected package libiw30:amd64.
Preparing to unpack .../libiw30_30~pre9-13.1ubuntu4_amd64.deb ...
Unpacking libiw30:amd64 (30~pre9-13.1ubuntu4) ...
Selecting previously unselected package wireless-tools.
Preparing to unpack .../wireless-tools_30~pre9-13.1ubuntu4_amd64.deb ...
Unpacking wireless-tools (30~pre9-13.1ubuntu4) ...
Setting up acpid (1:2.0.33-1ubuntu1) ...
Created symlink /etc/systemd/system/sockets.target.wants/acpid.socket → /lib/systemd/system/acpid.socket.
Created symlink /etc/systemd/system/paths.target.wants/acpid.path → /lib/systemd/system/acpid.path.
Setting up libiw30:amd64 (30~pre9-13.1ubuntu4) ...
Setting up acpi-support (0.144) ...
Failed to restart acpid.service: Transport endpoint is not connected
See system logs and 'systemctl status acpid.service' for details.
Failed to get properties: Transport endpoint is not connected
Setting up wireless-tools (30~pre9-13.1ubuntu4) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Error: Timeout was reached

Revision history for this message
Luís Infante da Câmara (luis220413) wrote :
Changed in acpid (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → Luís Infante da Câmara (luis220413)
Revision history for this message
Luís Infante da Câmara (luis220413) wrote :
summary: - log flood when installing acpid and acpi-support inside a 22.04
+ [SRU] Log flood when installing acpid and acpi-support inside a 22.04
container
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.