canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.38k stars 931 forks source link

limits.cpu does not apply with cgroupsV2 on Gentoo #8896

Closed epsilon-0 closed 3 years ago

epsilon-0 commented 3 years ago

Required information

config: {}
api_extensions:
- storage_zfs_remove_snapshots
- container_host_shutdown_timeout
- container_stop_priority
- container_syscall_filtering
- auth_pki
- container_last_used_at
- etag
- patch
- usb_devices
- https_allowed_credentials
- image_compression_algorithm
- directory_manipulation
- container_cpu_time
- storage_zfs_use_refquota
- storage_lvm_mount_options
- network
- profile_usedby
- container_push
- container_exec_recording
- certificate_update
- container_exec_signal_handling
- gpu_devices
- container_image_properties
- migration_progress
- id_map
- network_firewall_filtering
- network_routes
- storage
- file_delete
- file_append
- network_dhcp_expiry
- storage_lvm_vg_rename
- storage_lvm_thinpool_rename
- network_vlan
- image_create_aliases
- container_stateless_copy
- container_only_migration
- storage_zfs_clone_copy
- unix_device_rename
- storage_lvm_use_thinpool
- storage_rsync_bwlimit
- network_vxlan_interface
- storage_btrfs_mount_options
- entity_description
- image_force_refresh
- storage_lvm_lv_resizing
- id_map_base
- file_symlinks
- container_push_target
- network_vlan_physical
- storage_images_delete
- container_edit_metadata
- container_snapshot_stateful_migration
- storage_driver_ceph
- storage_ceph_user_name
- resource_limits
- storage_volatile_initial_source
- storage_ceph_force_osd_reuse
- storage_block_filesystem_btrfs
- resources
- kernel_limits
- storage_api_volume_rename
- macaroon_authentication
- network_sriov
- console
- restrict_devlxd
- migration_pre_copy
- infiniband
- maas_network
- devlxd_events
- proxy
- network_dhcp_gateway
- file_get_symlink
- network_leases
- unix_device_hotplug
- storage_api_local_volume_handling
- operation_description
- clustering
- event_lifecycle
- storage_api_remote_volume_handling
- nvidia_runtime
- container_mount_propagation
- container_backup
- devlxd_images
- container_local_cross_pool_handling
- proxy_unix
- proxy_udp
- clustering_join
- proxy_tcp_udp_multi_port_handling
- network_state
- proxy_unix_dac_properties
- container_protection_delete
- unix_priv_drop
- pprof_http
- proxy_haproxy_protocol
- network_hwaddr
- proxy_nat
- network_nat_order
- container_full
- candid_authentication
- backup_compression
- candid_config
- nvidia_runtime_config
- storage_api_volume_snapshots
- storage_unmapped
- projects
- candid_config_key
- network_vxlan_ttl
- container_incremental_copy
- usb_optional_vendorid
- snapshot_scheduling
- snapshot_schedule_aliases
- container_copy_project
- clustering_server_address
- clustering_image_replication
- container_protection_shift
- snapshot_expiry
- container_backup_override_pool
- snapshot_expiry_creation
- network_leases_location
- resources_cpu_socket
- resources_gpu
- resources_numa
- kernel_features
- id_map_current
- event_location
- storage_api_remote_volume_snapshots
- network_nat_address
- container_nic_routes
- rbac
- cluster_internal_copy
- seccomp_notify
- lxc_features
- container_nic_ipvlan
- network_vlan_sriov
- storage_cephfs
- container_nic_ipfilter
- resources_v2
- container_exec_user_group_cwd
- container_syscall_intercept
- container_disk_shift
- storage_shifted
- resources_infiniband
- daemon_storage
- instances
- image_types
- resources_disk_sata
- clustering_roles
- images_expiry
- resources_network_firmware
- backup_compression_algorithm
- ceph_data_pool_name
- container_syscall_intercept_mount
- compression_squashfs
- container_raw_mount
- container_nic_routed
- container_syscall_intercept_mount_fuse
- container_disk_ceph
- virtual-machines
- image_profiles
- clustering_architecture
- resources_disk_id
- storage_lvm_stripes
- vm_boot_priority
- unix_hotplug_devices
- api_filtering
- instance_nic_network
- clustering_sizing
- firewall_driver
- projects_limits
- container_syscall_intercept_hugetlbfs
- limits_hugepages
- container_nic_routed_gateway
- projects_restrictions
- custom_volume_snapshot_expiry
- volume_snapshot_scheduling
- trust_ca_certificates
- snapshot_disk_usage
- clustering_edit_roles
- container_nic_routed_host_address
- container_nic_ipvlan_gateway
- resources_usb_pci
- resources_cpu_threads_numa
- resources_cpu_core_die
- api_os
- resources_system
- usedby_consistency
- resources_gpu_mdev
- console_vga_type
- projects_limits_disk
- storage_rsync_compression
- gpu_mdev
- resources_pci_iommu
- resources_network_usb
- resources_disk_address
- network_state_vlan
- gpu_sriov
- migration_stateful
- disk_state_quota
- storage_ceph_features
- gpu_mig
api_status: stable
api_version: "1.0"
auth: trusted
public: false
auth_methods:
- tls
environment:
  addresses: []
  architectures:
  - x86_64
  - i686
  certificate: |
    -----BEGIN CERTIFICATE-----
    MIICEjCCAZigAwIBAgIQX+AVHCilvAJLdC7HRDelezAKBggqhkjOPQQDAzA5MRww
    GgYDVQQKExNsaW51eGNvbnRhaW5lcnMub3JnMRkwFwYDVQQDDBByb290QGNvbXBp
    bGVOT09CMB4XDTIwMTIxODE1NTQwN1oXDTMwMTIxNjE1NTQwN1owOTEcMBoGA1UE
    ChMTbGludXhjb250YWluZXJzLm9yZzEZMBcGA1UEAwwQcm9vdEBjb21waWxlTk9P
    QjB2MBAGByqGSM49AgEGBSuBBAAiA2IABDHB5mO85aRF3AwfuB6VWGLqHzTYnNh9
    hFjXNQYjM4Pm6RJYCaTfTXmxlzgrzNExe6C8XyUuJw0+7bMJUjnw4uVkDsz2zeNA
    dPTTRqVltrxebBtqeLZnw8shwsTgKoffD6NlMGMwDgYDVR0PAQH/BAQDAgWgMBMG
    A1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwLgYDVR0RBCcwJYILY29t
    cGlsZU5PT0KHBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAEwCgYIKoZIzj0EAwMDaAAw
    ZQIwF1SoLK6x7LY1qG5ohQro0jeCWhTsAO1JMLPRPs7Gu638ssVNoTZHoKBkSe34
    c/9eAjEA0L1ooW1Wj+cC5hsVKTNtTzQ6tydJEq56pFQCW6zIo/qFI1di+sFytiHv
    tYq06/xF
    -----END CERTIFICATE-----
  certificate_fingerprint: 7990752d0917e22ae0800805c333f1437c93b869ae837dead84ea6ac44621a2a
  driver: qemu | lxc
  driver_version: 6.0.0 | 4.0.9
  firewall: xtables
  kernel: Linux
  kernel_architecture: x86_64
  kernel_features:
    netnsid_getifaddrs: "true"
    seccomp_listener: "true"
    seccomp_listener_continue: "true"
    shiftfs: "false"
    uevent_injection: "true"
    unpriv_fscaps: "true"
  kernel_version: 5.10.27-gentoo-x86_64
  lxc_features:
    cgroup2: "true"
    devpts_fd: "true"
    mount_injection_file: "true"
    network_gateway_device_route: "true"
    network_ipvlan: "true"
    network_l2proxy: "true"
    network_phys_macvlan_mtu: "true"
    network_veth_router: "true"
    pidfd: "true"
    seccomp_allow_deny_syntax: "true"
    seccomp_notify: "true"
    seccomp_proxy_send_notify_fd: "true"
  os_name: Gentoo
  os_version: ""
  project: default
  server: lxd
  server_clustered: false
  server_name: compileNOOB
  server_pid: 3192
  server_version: 4.0.6
  storage: dir
  storage_version: "1"

Issue description

When cgroups v2 is enabled on Gentoo the limits.cpu config set does not apply.

Steps to reproduce

To reproduce error when cgroups v2 is enabled

$ lxc exec alpine nproc
24
$ lxc config set alpine limits.cpu 10
$ lxc exec alpine nproc
24
$ lxc config get alpine limits.cpu
10

When cgroups v1 is enabled (in /etc/rc.conf) the limits are shown properly in nproc.

Information to attach

epsilon-0 commented 3 years ago

Information from lxc monitor:

lxc monitor ``` location: none metadata: context: {} level: dbug message: 'New event listener: 738c09c3-103a-4814-966d-bede5a415117' timestamp: "2021-06-15T18:26:15.142795014Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0 username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:17.576996142Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0/instances?recursion=2 username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:17.579976487Z" type: logging location: none metadata: context: driver: dir instance: uap pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.58667332Z" type: logging location: none metadata: context: driver: dir instance: uap pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.586848851Z" type: logging location: none metadata: context: driver: dir instance: gentoo-lto pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.587764921Z" type: logging location: none metadata: context: driver: dir instance: gentoo-lto pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.587881397Z" type: logging location: none metadata: context: driver: dir instance: debianSID pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.588079729Z" type: logging location: none metadata: context: driver: dir instance: debianSID pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.588200682Z" type: logging location: none metadata: context: driver: dir instance: ubuntuAPOORVA pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.595728457Z" type: logging location: none metadata: context: driver: dir instance: ubuntuAPOORVA pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.59595059Z" type: logging location: none metadata: context: driver: dir instance: alpine pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.596901488Z" type: logging location: none metadata: context: driver: dir instance: alpine pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.597053481Z" type: logging location: none metadata: context: driver: dir instance: hos-control pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.600018702Z" type: logging location: none metadata: context: driver: dir instance: hos-control pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.600125453Z" type: logging location: none metadata: context: driver: dir instance: gentoo-coding pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.601290985Z" type: logging location: none metadata: context: driver: dir instance: gentoo-coding pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.60141222Z" type: logging location: none metadata: context: driver: dir instance: gentoo-science pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.603312468Z" type: logging location: none metadata: context: driver: dir instance: gentoo-science pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.603468979Z" type: logging location: none metadata: context: driver: dir instance: hos pool: default project: default level: dbug message: GetInstanceUsage started timestamp: "2021-06-15T18:26:17.605605088Z" type: logging location: none metadata: context: driver: dir instance: hos pool: default project: default level: dbug message: GetInstanceUsage finished timestamp: "2021-06-15T18:26:17.605741869Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0 username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:22.447269846Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0/instances/alpine username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:22.451022048Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0 username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:26.066131864Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0/instances/alpine username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:26.069408787Z" type: logging location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0/events username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:26.073365836Z" type: logging location: none metadata: context: {} level: dbug message: 'New event listener: af3f439f-d170-428a-954f-e8e10cd5c282' timestamp: "2021-06-15T18:26:26.073655486Z" type: logging location: none metadata: context: ip: '@' method: PUT protocol: unix url: /1.0/instances/alpine username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:26.074269067Z" type: logging location: none metadata: context: {} level: dbug message: 'New task Operation: cfd03f06-dc9d-476f-b89d-1d2026d88b1c' timestamp: "2021-06-15T18:26:26.11828473Z" type: logging location: none metadata: context: {} level: dbug message: 'Started task operation: cfd03f06-dc9d-476f-b89d-1d2026d88b1c' timestamp: "2021-06-15T18:26:26.118773692Z" type: logging location: none metadata: class: task created_at: "2021-06-15T18:26:26.079724434Z" description: Updating instance err: "" id: cfd03f06-dc9d-476f-b89d-1d2026d88b1c location: none may_cancel: false metadata: null resources: containers: - /1.0/containers/alpine instances: - /1.0/instances/alpine status: Pending status_code: 105 updated_at: "2021-06-15T18:26:26.079724434Z" timestamp: "2021-06-15T18:26:26.118727635Z" type: operation location: none metadata: class: task created_at: "2021-06-15T18:26:26.079724434Z" description: Updating instance err: "" id: cfd03f06-dc9d-476f-b89d-1d2026d88b1c location: none may_cancel: false metadata: null resources: containers: - /1.0/containers/alpine instances: - /1.0/instances/alpine status: Running status_code: 103 updated_at: "2021-06-15T18:26:26.079724434Z" timestamp: "2021-06-15T18:26:26.119152052Z" type: operation location: none metadata: context: ip: '@' method: GET protocol: unix url: /1.0/operations/cfd03f06-dc9d-476f-b89d-1d2026d88b1c username: aisha level: dbug message: Handling timestamp: "2021-06-15T18:26:26.122140337Z" type: logging location: none metadata: context: {} level: eror message: Error reading host's cpuset.cpus timestamp: "2021-06-15T18:26:26.123757952Z" type: logging location: none metadata: context: {} level: dbug message: 'Scheduler: container alpine changed: re-balancing' timestamp: "2021-06-15T18:26:26.123628888Z" type: logging location: none metadata: context: driver: dir instance: alpine pool: default project: default level: dbug message: UpdateInstanceBackupFile started timestamp: "2021-06-15T18:26:26.164519258Z" type: logging location: none metadata: action: instance-updated source: /1.0/instances/alpine timestamp: "2021-06-15T18:26:26.169218131Z" type: lifecycle location: none metadata: context: driver: dir instance: alpine pool: default project: default level: dbug message: UpdateInstanceBackupFile finished timestamp: "2021-06-15T18:26:26.169187207Z" type: logging location: none metadata: context: {} level: dbug message: 'Success for task operation: cfd03f06-dc9d-476f-b89d-1d2026d88b1c' timestamp: "2021-06-15T18:26:26.169241708Z" type: logging location: none metadata: class: task created_at: "2021-06-15T18:26:26.079724434Z" description: Updating instance err: "" id: cfd03f06-dc9d-476f-b89d-1d2026d88b1c location: none may_cancel: false metadata: null resources: containers: - /1.0/containers/alpine instances: - /1.0/instances/alpine status: Success status_code: 200 updated_at: "2021-06-15T18:26:26.079724434Z" timestamp: "2021-06-15T18:26:26.169609494Z" type: operation location: none metadata: context: {} level: dbug message: 'Event listener finished: af3f439f-d170-428a-954f-e8e10cd5c282' timestamp: "2021-06-15T18:26:26.171349188Z" type: logging location: none metadata: context: {} level: dbug message: 'Disconnected event listener: af3f439f-d170-428a-954f-e8e10cd5c282' timestamp: "2021-06-15T18:26:26.17162345Z" type: logging ```

Relevant information from the above -

location: none
metadata:
  context: {}
  level: eror
  message: Error reading host's cpuset.cpus
timestamp: "2021-06-15T18:26:26.123757952Z"
type: logging
stgraber commented 3 years ago

Anything useful in /var/lib/lxd/logs/lxd.log?

We have automated testing to validate that limits.cpu works on cgroup2: https://jenkins.linuxcontainers.org/job/lxd-test-cgroup/kernel=cgroup2,restrict=master/335/console

So given your error above, it suggests that /sys/fs/cgroup may be missing the cpuset.cpus file?

epsilon-0 commented 3 years ago

The logs directory above does not exist, but you are correct, the /sys/fs/cgroup/cpuset.cpus file does not exist

$ ls -l /sys/fs/cgroup/cpu*
-rw-r--r--  1 root root       0 Jun 15 18:12 cpu.pressure
-r--r--r--  1 root root       0 Jun 15 18:12 cpu.stat
-r--r--r--  1 root root       0 Jun 15 18:12 cpuset.cpus.effective
-r--r--r--  1 root root       0 Jun 15 18:12 cpuset.mems.effective

Not sure what is the method for creating that file.

stgraber commented 3 years ago

Does the file existing in sub-directories of /sys/fs/cgroup?

epsilon-0 commented 3 years ago

Yes, a lot of these files exist

$ find . -iname "cpuset.cpus"
./virtlogd/cpuset.cpus
./smtpd/cpuset.cpus
./lxc.payload.alpine/cpuset.cpus
./net.enp5s0f0/cpuset.cpus
./lxc.monitor.gentoo-coding/cpuset.cpus
./net.br0/cpuset.cpus
./lxc.monitor.alpine/cpuset.cpus
./lxd/cpuset.cpus
./lxc.payload.gentoo-coding/cpuset.cpus
./cni-dhcp/cpuset.cpus
./lxcfs/cpuset.cpus
./lxc.monitor.hos/cpuset.cpus
./lxc.payload.hos/user.slice/cpuset.cpus
./lxc.payload.hos/init.scope/cpuset.cpus
./lxc.payload.hos/system.slice/docker-6c8bcb646a1ea1509c8f6450ef86c5351a185dc0f92f83a6c88661a1b411b666.scope/cpuset.cpus
./lxc.payload.hos/system.slice/containerd.service/cpuset.cpus
./lxc.payload.hos/system.slice/systemd-networkd.service/cpuset.cpus
./lxc.payload.hos/system.slice/organizr.service/cpuset.cpus
./lxc.payload.hos/system.slice/cron.service/cpuset.cpus
./lxc.payload.hos/system.slice/calibre.service/cpuset.cpus
./lxc.payload.hos/system.slice/homelabos.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-35bbfd1c14d7990deaac01595cce433131f3e7085331468e7696fd81a0dc1e63.scope/cpuset.cpus
./lxc.payload.hos/system.slice/docker.service/cpuset.cpus
./lxc.payload.hos/system.slice/rpcbind.socket/cpuset.cpus
./lxc.payload.hos/system.slice/bitwarden.service/cpuset.cpus
./lxc.payload.hos/system.slice/networkd-dispatcher.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-f8b153f2ef28cec8a7af81699ba4c8a154f5effb811a2e2a9e0d5470f63b3ccd.scope/cpuset.cpus
./lxc.payload.hos/system.slice/system-modprobe.slice/cpuset.cpus
./lxc.payload.hos/system.slice/systemd-journald.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-9ed1bb554a69b5664cdcc97cbabc2bcdaad846afb1d8a09d80e75bd1102044f5.scope/cpuset.cpus
./lxc.payload.hos/system.slice/unattended-upgrades.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-2528561c22eb6be754cd10b67191d48f83ea8f70c996f6c75aa63d4b56b2ca6b.scope/cpuset.cpus
./lxc.payload.hos/system.slice/ssh.service/cpuset.cpus
./lxc.payload.hos/system.slice/rsyslog.service/cpuset.cpus
./lxc.payload.hos/system.slice/openldap.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-8305b2b22cf23e6d355d1a4c7c301ac6f8fa681056981b46478fe70a780af4f5.scope/cpuset.cpus
./lxc.payload.hos/system.slice/console-getty.service/cpuset.cpus
./lxc.payload.hos/system.slice/rpcbind.service/cpuset.cpus
./lxc.payload.hos/system.slice/freshrss.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-c61f925b2bd438f5b737a13622cce67a70869f6dd2aa58f6d3cc08a43b21d487.scope/cpuset.cpus
./lxc.payload.hos/system.slice/run-rpc_pipefs.mount/cpuset.cpus
./lxc.payload.hos/system.slice/docker-aace8c3e96efba76c681f66775348d0696ae586043e25a778248d68e50f909d3.scope/cpuset.cpus
./lxc.payload.hos/system.slice/monicahq.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-f04ec6d5233ac6d5545b6b61d91df66dbf7e328c1b8ff26c7669a50961eb5e18.scope/cpuset.cpus
./lxc.payload.hos/system.slice/docker.socket/cpuset.cpus
./lxc.payload.hos/system.slice/docker-df8759fb6e550703687baa7e47fb1ed4edcd8bfbcaa24acad1a631c48c2ae432.scope/cpuset.cpus
./lxc.payload.hos/system.slice/systemd-resolved.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-8e14a15c8e8cffee74d81682e83d494cffafd7fda4fa2ab8e71144be83bc16d4.scope/cpuset.cpus
./lxc.payload.hos/system.slice/dev-hugepages.mount/cpuset.cpus
./lxc.payload.hos/system.slice/cpuset.cpus
./lxc.payload.hos/system.slice/dbus.service/cpuset.cpus
./lxc.payload.hos/system.slice/system-getty.slice/cpuset.cpus
./lxc.payload.hos/system.slice/system-wg\x2dquick.slice/cpuset.cpus
./lxc.payload.hos/system.slice/authelia.service/cpuset.cpus
./lxc.payload.hos/system.slice/systemd-logind.service/cpuset.cpus
./lxc.payload.hos/system.slice/docker-21dba2268e18fcee8fe78dea88e19df382ca8bf80310ab50aa35638bbbcd1ac7.scope/cpuset.cpus
./lxc.payload.hos/cpuset.cpus
./udev/cpuset.cpus
./libvirtd/cpuset.cpus
./syslog-ng/cpuset.cpus
./cronie/cpuset.cpus
./sshd/cpuset.cpus
epsilon-0 commented 3 years ago

This is interesting, if I manually set cpus for gentoo-coding, I get the correct result -

$ echo 1-3 > /sys/fs/cgroup/lxc.payload.gentoo-coding/cpuset.cpus
$ lxc exec gentoo-coding nproc 
3

Also it seems like if I set the cpuset.cpus for lxc.payload.hos it also sets the cpuset.cpus for all its sub processes.

$ echo 1-3 > /sys/fs/cgroup/lxc.payload.hos/cpuset.cpus
$ taskset -cp 5453 # pid of a docker container in hos
pid 5453's current affinity list: 1-3
stgraber commented 3 years ago

Yeah, LXD doesn't get that far as it's tripping on getting the root cpuset.

I'll need to check what's different in our test environment.

stgraber commented 3 years ago

I'm unable to reproduce the issue :(

Looking at our logic here, we'd normally parse:

Then you get the error if neither of them are found or can be read.

So this seems to suggest that there was some kind of issue reading /sys/fs/cgroup/cpuset.cpus.effective on your system.

stgraber commented 3 years ago
root@vm01:~# nproc
4
root@vm01:~# ls -lh /sys/fs/cgroup/cpu*
-rw-r--r-- 1 root root 0 Jun 16 02:53 /sys/fs/cgroup/cpu.pressure
-r--r--r-- 1 root root 0 Jun 16 02:53 /sys/fs/cgroup/cpuset.cpus.effective
-r--r--r-- 1 root root 0 Jun 16 02:53 /sys/fs/cgroup/cpuset.mems.effective
root@vm01:~# cat /sys/fs/cgroup/cpuset.cpus.effective
0-3
root@vm01:~# lxc launch images:ubuntu/20.04 u1 -c limits.cpu=2
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
Creating u1
Starting u1                               
root@vm01:~# lxc exec u1 -- nproc
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
2
root@vm01:~# cat /sys/fs/cgroup/lxc.payload.u1/cpuset.cpus
0,3
epsilon-0 commented 3 years ago

My cpuset.cpus.effective file seems to be there and also gives out correct results.

$ cat /sys/fs/cgroup/cpuset.cpus.effective
0-23

Am not sure why the limits.cpu is giving out the error still.

stgraber commented 3 years ago

Can you strace -f -o debug -p PID your LXD process (replacing PID with the right value) while triggering another change of limits.cpu?

Then ctrl+c and hopefully the debug file will include some stuff about cpuset.cpus.effective

epsilon-0 commented 3 years ago

I couldn't get anything with the above command when attaching to the process - lxd --group lxd --syslog. I instead executed - strace lxc config set alpine limits.cpu 15 and got -

execve("/usr/bin/lxc", ["lxc", "config", "set", "alpine", "limits.cpu", "15"], 0x7ffc87e6d4d8 /* 44 vars */) = 0
brk(NULL)                               = 0x13cf000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=33929, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 33929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1d35472000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\22\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=14544, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d35470000
mmap(NULL, 16672, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d3546b000
mmap(0x7f1d3546c000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f1d3546c000
mmap(0x7f1d3546d000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f1d3546d000
mmap(0x7f1d3546e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f1d3546e000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320k\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\1\0\1\300\4\0\0\0\t\0\0\0\0\0\0\0"..., 48, 792) = 48
pread64(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0", 32, 840) = 32
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=147448, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 128048, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d3544b000
mprotect(0x7f1d35451000, 81920, PROT_NONE) = 0
mmap(0x7f1d35451000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f1d35451000
mmap(0x7f1d35460000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f1d35460000
mmap(0x7f1d35465000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7f1d35465000
mmap(0x7f1d35467000, 13360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d35467000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3009\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\1\0\1\300\4\0\0\0;\0\0\0\0\0\0\0"..., 48, 848) = 48
pread64(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0", 32, 896) = 32
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1794208, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1807112, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d35291000
mprotect(0x7f1d352b3000, 1630208, PROT_NONE) = 0
mmap(0x7f1d352b3000, 1318912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f1d352b3000
mmap(0x7f1d353f5000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x164000) = 0x7f1d353f5000
mmap(0x7f1d35441000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1af000) = 0x7f1d35441000
mmap(0x7f1d35447000, 13064, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d35447000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3528e000
arch_prctl(ARCH_SET_FS, 0x7f1d3528e740) = 0
mprotect(0x7f1d35441000, 16384, PROT_READ) = 0
mprotect(0x7f1d35465000, 4096, PROT_READ) = 0
mprotect(0x7f1d3546e000, 4096, PROT_READ) = 0
mprotect(0x103f000, 4096, PROT_READ)    = 0
mprotect(0x7f1d354aa000, 8192, PROT_READ) = 0
munmap(0x7f1d35472000, 33929)           = 0
set_tid_address(0x7f1d3528ea10)         = 4113
set_robust_list(0x7f1d3528ea20, 24)     = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f1d35451680, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f1d35451720, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL)                               = 0x13cf000
brk(0x13f0000)                          = 0x13f0000
sched_getaffinity(0, 8192, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]) = 64
openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3
read(3, "2097152\n", 20)                = 8
close(3)                                = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3524e000
mmap(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3522e000
mmap(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3512e000
mmap(NULL, 8388608, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3492e000
mmap(NULL, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d3092e000
mmap(NULL, 536870912, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d1092e000
mmap(0xc000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(0xc000000000, 67108864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0e92e000
mmap(NULL, 2165776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0e71d000
mmap(0x7f1d3522e000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d3522e000
mmap(0x7f1d351ae000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d351ae000
mmap(0x7f1d34d34000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d34d34000
mmap(0x7f1d3295e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d3295e000
mmap(0x7f1d20aae000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d20aae000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0e61d000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0e60d000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0e5fd000
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc000002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid()                                = 4113
rt_sigaction(SIGHUP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGILL, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSTKFLT, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGURG, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPROF, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPWR, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSYS, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {sa_handler=0x7f1d35451680, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {sa_handler=0x7f1d35451680, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, 8) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f1d35451680, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_1, NULL, {sa_handler=0x7f1d35451720, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {sa_handler=0x7f1d35451720, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f1d35451720, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_3, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_3, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_4, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_5, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_6, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_7, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_8, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_9, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_10, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_11, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_12, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_13, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_14, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_15, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_16, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_17, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_18, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_19, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_20, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_21, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_22, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_23, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_24, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_25, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_26, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_27, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_28, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_29, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_30, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_31, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_32, {sa_handler=0x4717e0, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1d3545d120}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1d0ddfc000
mprotect(0x7f1d0ddfd000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
clone(child_stack=0x7f1d0e5fbef0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[4120], tls=0x7f1d0e5fc640, child_tidptr=0x7f1d0e5fc910) = 4120
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1d0d5fb000
mprotect(0x7f1d0d5fc000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
clone(child_stack=0x7f1d0ddfaef0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[4121], tls=0x7f1d0ddfb640, child_tidptr=0x7f1d0ddfb910) = 4121
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=4113, si_uid=1000} ---
rt_sigreturn({mask=[]})                 = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1d0c5b9000
mprotect(0x7f1d0c5ba000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
clone(child_stack=0x7f1d0cdb8ef0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[4123], tls=0x7f1d0cdb9640, child_tidptr=0x7f1d0cdb9910) = 4123
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xc00007ad50, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000100150, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1cff7ff000
mprotect(0x7f1cff800000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
clone(child_stack=0x7f1cffffeef0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[4124], tls=0x7f1cfffff640, child_tidptr=0x7f1cfffff910) = 4124
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/bin/lxc", 128) = 12
fcntl(0, F_GETFL)                       = 0x2 (flags O_RDWR)
futex(0xc000100150, FUTEX_WAKE_PRIVATE, 1) = 1
fcntl(1, F_GETFL)                       = 0x1 (flags O_WRONLY)
fcntl(2, F_GETFL)                       = 0x1 (flags O_WRONLY)
openat(AT_FDCWD, "/usr/bin/lxc", O_RDONLY|O_CLOEXEC) = 3
epoll_create1(EPOLL_CLOEXEC)            = 4
pipe2([5, 6], O_NONBLOCK|O_CLOEXEC)     = 0
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN, data={u32=17667584, u64=17667584}}) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=224217496, u64=139762754996632}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc000196eb4) = -1 EPERM (Operation not permitted)
fstat(3, {st_mode=S_IFREG|0755, st_size=13265920, ...}) = 0
pread64(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\2\0>\0\1\0\0\0\0204@\0\0\0\0\0"..., 64, 0) = 64
pread64(3, "H9\301\17\2176\377\377\377H\213\204$\30\1\0\0H\213\214$ \1\0\0H\211\204$\250\1\0"..., 64, 1658240) = 64
pread64(3, "\204\322\17\205\204\1\0\0H\213\204$\220\0\0\0H\203\270\340\0\0\0\0\17\205^\1\0\0\200\270"..., 64, 3316480) = 64
pread64(3, "D$8\17\21\204$\20\1\0\0\17\20D$H\17\21\204$ \1\0\0\203=q\260\201\0\0\220"..., 64, 4974720) = 64
pread64(3, "(H\211L$0\350u \240\377H\213D$8H\213L$@H\213|$XH\211O\10\203="..., 64, 6632960) = 64
pread64(3, "\377\377\377\377\377\377\377\377\\}\0\0\377\377\377\377\200h\32\0\200h\32\0C\254\0\0`\210\5\0"..., 64, 8291200) = 64
pread64(3, "esc.(*stringName).getText\0google"..., 64, 9949440) = 64
pread64(3, "\3\350\2.\347\2\262\6\0\226\0102\4Z\4\n\3\n\2\6\f\21\2\17\6N\4\n\6\n\7\f"..., 64, 11607680) = 64
close(3)                                = 0
futex(0xc00007ad50, FUTEX_WAKE_PRIVATE, 1) = 1
getrandom("\x9b\x60\xe3\x66\x8b\x7b\x97\x86\xb1\xcc\x33\x73\xfd\x74\xd3\x71\x3e\x5e\x40\xb0\x49\x8f\xa2\x31", 24, 0) = 24
uname({sysname="Linux", nodename="compileNOOB", ...}) = 0
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1974896, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 1974896, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1d0c3d6000
close(3)                                = 0
ioctl(1, TCGETS, 0xc000197ae4)          = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(2, TCGETS, 0xc000197ae4)          = -1 ENOTTY (Inappropriate ioctl for device)
uname({sysname="Linux", nodename="compileNOOB", ...}) = 0
openat(AT_FDCWD, "/etc/os-release", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=224217496, u64=139762754996632}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0001977b4) = -1 EPERM (Operation not permitted)
fstat(3, {st_mode=S_IFREG|0644, st_size=190, ...}) = 0
read(3, "NAME=Gentoo\nID=gentoo\nPRETTY_NAM"..., 512) = 190
read(3, "", 322)                        = 0
close(3)                                = 0
newfstatat(AT_FDCWD, "/home/aisha/.config/lxc/config.yml", {st_mode=S_IFREG|0644, st_size=188, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "/home/aisha/.config/lxc/config.yml", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=224217496, u64=139762754996632}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0002297cc) = -1 EPERM (Operation not permitted)
fstat(3, {st_mode=S_IFREG|0644, st_size=188, ...}) = 0
read(3, "default-remote: local\nremotes:\n "..., 512) = 188
read(3, "", 324)                        = 0
close(3)                                = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/usr/share/locale/C.UTF8/LC_MESSAGES/lxd.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/C.utf8/LC_MESSAGES/lxd.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/C/LC_MESSAGES/lxd.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
mmap(NULL, 1439992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0c276000
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d0c236000
newfstatat(AT_FDCWD, "/home/aisha/.config/lxc/config.yml", {st_mode=S_IFREG|0644, st_size=188, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "/home/aisha/.config/lxc/config.yml", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=224217496, u64=139762754996632}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc00022964c) = -1 EPERM (Operation not permitted)
fstat(3, {st_mode=S_IFREG|0644, st_size=188, ...}) = 0
read(3, "default-remote: local\nremotes:\n "..., 512) = 188
read(3, "", 324)                        = 0
close(3)                                = 0
newfstatat(AT_FDCWD, "/var/lib/lxd", {st_mode=S_IFDIR|0711, st_size=332, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/home/aisha/.config/lxc/config.yml", {st_mode=S_IFREG|0644, st_size=188, ...}, AT_SYMLINK_NOFOLLOW) = 0
ioctl(2, TCGETS, 0xc0002299d4)          = -1 ENOTTY (Inappropriate ioctl for device)
futex(0xc000100150, FUTEX_WAKE_PRIVATE, 1) = 1
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/lib/lxd/unix.socket"}, 27) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=224217496, u64=139762754996632}}) = 0
getsockname(3, {sa_family=AF_UNIX}, [112 => 2]) = 0
getpeername(3, {sa_family=AF_UNIX, sun_path="/var/lib/lxd/unix.socket"}, [112 => 27]) = 0
futex(0xc00007ad50, FUTEX_WAKE_PRIVATE, 1) = 1
read(3, 0xc0002cf000, 4096)             = -1 EAGAIN (Resource temporarily unavailable)
epoll_pwait(4, [], 128, 0, NULL, 2)     = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
epoll_pwait(4, [{events=EPOLLIN|EPOLLOUT|EPOLLHUP|EPOLLRDHUP, data={u32=224217496, u64=139762754996632}}], 128, 0, NULL, 0) = 1
epoll_pwait(4, [{events=EPOLLOUT, data={u32=224217496, u64=139762754996632}}], 128, -1, NULL, 23) = 1
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
epoll_pwait(4, [{events=EPOLLOUT, data={u32=224217496, u64=139762754996632}}], 128, -1, NULL, 23) = 1
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
epoll_pwait(4, [{events=EPOLLIN|EPOLLOUT, data={u32=224217496, u64=139762754996632}}], 128, -1, NULL, 23) = 1
futex(0x10aac58, FUTEX_WAKE_PRIVATE, 1) = 1
read(3, "HTTP/1.1 200 OK\r\nContent-Type: a"..., 4096) = 3093
futex(0xc000100150, FUTEX_WAKE_PRIVATE, 1) = 1
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc00008eb3c) = 0
close(3)                                = 0
futex(0xc00007ad50, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
epoll_pwait(4, [{events=EPOLLOUT, data={u32=224217264, u64=139762754996400}}], 128, 59953, NULL, 23) = 1
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x10ab510, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
+++ exited with 0 +++
stgraber commented 3 years ago

That won't do you any good, we need to trace the daemon. lxc just sends a request over the network (unix socket) to LXD, it doesn't itself do anything with the system.

epsilon-0 commented 3 years ago

OK, here is the strace when I run it on the [lxc monitor] /var/lib/lxd/containers alpine process with PID 3590 -

strace: Process 3590 attached
epoll_wait(3, [{events=EPOLLIN, data={u32=57624976, u64=57624976}}], 10, -1) = 1
accept(10, NULL, NULL)                  = 14
fcntl(14, F_SETFD, FD_CLOEXEC)          = 0
setsockopt(14, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 14, {events=EPOLLIN, data={u32=57625408, u64=57625408}}) = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=57625408, u64=57625408}}], 10, -1) = 1
recvmsg(14, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=3192, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 16
sendto(14, "\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0", 16, MSG_NOSIGNAL, NULL, 0) = 16
epoll_ctl(3, EPOLL_CTL_DEL, 14, NULL)   = 0
close(14)                               = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=57624976, u64=57624976}}], 10, -1) = 1
accept(10, NULL, NULL)                  = 14
fcntl(14, F_SETFD, FD_CLOEXEC)          = 0
setsockopt(14, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 14, {events=EPOLLIN, data={u32=57625568, u64=57625568}}) = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=57625568, u64=57625568}}], 10, -1) = 1
recvmsg(14, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=3192, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 16
sendto(14, "\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0", 16, MSG_NOSIGNAL, NULL, 0) = 16
epoll_ctl(3, EPOLL_CTL_DEL, 14, NULL)   = 0
close(14)                               = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=57624976, u64=57624976}}], 10, -1) = 1
accept(10, NULL, NULL)                  = 14
fcntl(14, F_SETFD, FD_CLOEXEC)          = 0
setsockopt(14, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 14, {events=EPOLLIN, data={u32=57625408, u64=57625408}}) = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=57625408, u64=57625408}}], 10, -1) = 1
recvmsg(14, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=3192, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 16
sendto(14, "\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0", 16, MSG_NOSIGNAL, NULL, 0) = 16
epoll_ctl(3, EPOLL_CTL_DEL, 14, NULL)   = 0
close(14)                               = 0
epoll_wait(3, ^Cstrace: Process 3590 detached
 <detached ...>
stgraber commented 3 years ago

That's not the right process, you need to run it against the LXD daemon itself.

epsilon-0 commented 3 years ago

I presume you mean the process lxd --group lxd --syslog. I don't get anything (no output) even when I attach to it and run the commands. It just stands still at

$ strace -p 3192
strace: Process 3192 attached
futex(0x1e67e50, FUTEX_WAIT_PRIVATE, 0, NULL
stgraber commented 3 years ago

Did you pass -f to strace?

epsilon-0 commented 3 years ago

:open_mouth: I forgot to do that!! Here is the full log with -f: https://bsd.ac/nfk4l80

stgraber commented 3 years ago

Hmm, it's odd that it's not showing any cpuset entry in there, you'd expect such an entry to show up when the corresponding log entry shows up.

stgraber commented 3 years ago

I figured it out (had to setup a Gentoo cgroup2 VM), fix on its way.

epsilon-0 commented 3 years ago

thanks!