Lxc ls hangs forever, Error getting disk usage

Using LXD version:
lxc --version
5.9

On Ubuntu 20.04.5

lxd was initialized with:

ubuntu@g7-8:~$ lxd init --dump
config: {}
networks:
- config:
    ipv4.address: 10.4.76.1/24
    ipv4.nat: "true"
    ipv6.address: none
  description: ""
  name: lxdbr0
  type: bridge
  project: default
storage_pools:
- config:
    size: 1200GiB
    source: /var/lib/lxd/disks/default.img
    zfs.pool_name: default
  description: ""
  name: default
  driver: zfs
profiles:
- config: {}
  description: Default LXD profile
  devices:
    eth0:
      name: eth0
      network: lxdbr0
      type: nic
    root:
      path: /
      pool: default
      type: disk
  name: default
projects:
- config:
    features.images: "true"
    features.networks: "true"
    features.networks.zones: "true"
    features.profiles: "true"
    features.storage.buckets: "true"
    features.storage.volumes: "true"
  description: Default LXD project
  name: default
ubuntu@g7-8:~$ lxc ls # hangs forever
^C
ubuntu@g7-8:~$ journalctl -u lxd --since "1 minute ago" --no-pager 
-- Logs begin at Wed 2022-12-07 11:06:31 UTC, end at Wed 2023-03-01 14:03:43 UTC. --
Mar 01 14:03:39 g7-8 lxd[3531858]: time="2023-03-01T14:03:39Z" level=warning msg="Error getting disk usage" err="Failed to run: zfs get -H -p -o value used default/virtual-machines/runner-3538-project-30273-concurrent-0-19475137.block: exit status 1 (cannot open 'default/virtual-machines/runner-3538-project-30273-concurrent-0-19475137.block': dataset does not exist)" instance=runner-3538-project-30273-concurrent-0-19475137 instanceType=virtual-machine project=default

I am still able to access the instance with lxd sql query:

ubuntu@g7-8:~$ lxd sql global 'select * from instances;'
+------+---------+--------------------------------------------------+--------------+------+-----------+--------------------------------+----------+--------------------------------+-------------+------------+----------------------+
|  id  | node_id |                       name                       | architecture | type | ephemeral |         creation_date          | stateful |         last_use_date          | description | project_id |     expiry_date      |
+------+---------+--------------------------------------------------+--------------+------+-----------+--------------------------------+----------+--------------------------------+-------------+------------+----------------------+
...
| 8188 | 1       | runner-3538-project-30273-concurrent-0-19475137  | 2            | 1    | 0         | 2023-03-01T09:18:32.180765758Z | 0        | 2023-03-01T09:18:56.496777053Z |             | 1          | 0001-01-01T00:00:00Z |
...

How can I debug this issue?

1 Like

Can you confirm whether this occurs with LXD 5.11, as LXD 5.9 is no longer supported.

Thanks

Will try to do it before end of week and communicate if something was already fixed.

2 Likes

did re-install the latest stable package (5.11/stable) over snap and could not reproduce the issue anymore. I guess will comeback if this happens again.

1 Like