Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951352 - app-containers/incus: service crash -- Error: Failed to create dqlite server: raft_init(): io: probe Async I/O: io_setup: function not implemented
Summary: app-containers/incus: service crash -- Error: Failed to create dqlite server:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-03-14 17:54 UTC by Thibaud CANALE
Modified: 2025-03-28 06:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info app-containers/incus dev-libs/raft dev-libs/libaio app-emulation/qemu (file_951352.txt,11.89 KB, text/plain)
2025-03-14 17:54 UTC, Thibaud CANALE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud CANALE 2025-03-14 17:54:05 UTC
Created attachment 920809 [details]
emerge --info app-containers/incus dev-libs/raft dev-libs/libaio app-emulation/qemu

Following Gentoo’s wiki[0] for installation and usage of app-containers/incus, this last crashes when starting through OpenRC:
```
# rc-service incus start 
 * Starting incus daemon service ...  [ ok ]
# rc-service incus status
 * status: crashed
zsh: exit 32
```

I found no error reporting in dmesg or in syslog for facility daemon, neither under /var/log/incus/.

Thanks to debug option of rc-service, I got the command use to run the service, from which I removed the `--background` option:
```
# start-stop-daemon --start --pidfile /run/incus.pid --exec /usr/sbin/incusd --make-pidfile -- --group incus-admin                      
WARNING[2025-03-14T18:12:54+01:00]  - Couldn't find the CGroup memory swap accounting, swap limits will be ignored                      
ERROR  [2025-03-14T18:12:54+01:00] Failed to start the daemon                    err="Failed to create dqlite server: raft_init(): io: p
robe Async I/O: io_setup: function not implemented"                                                                                     
Error: Failed to create dqlite server: raft_init(): io: probe Async I/O: io_setup: function not implemented                             
 * start-stop-daemon: failed to start `/usr/sbin/incusd'                                                                                
zsh: exit 1
```

Note: same message when running `/usr/sbin/incusd --group incus-admin`.

I (re)checked kernel configuration for app-containers/incus, app-emulation/qemu, and app-containers/lxc (thanks to `ebuild /path/to/<pkg_ebuild> setup`), no missing configuration.

Because of the error message, I also checked dev-libs/raft and dev-libs/libaio (because of prototype of `io_setup` in /usr/include/libaio.h), no issue found.

0: https://wiki.gentoo.org/wiki/Incus
Comment 1 Thibaud CANALE 2025-03-14 22:57:20 UTC
Same with app-containers/incus-6.10.1.
Comment 2 zyxhere 2025-03-15 09:53:19 UTC
Possible duplicate of https://bugs.gentoo.org/946953 ?
Comment 3 Thibaud CANALE 2025-03-15 14:58:17 UTC
(In reply to zyxhere from comment #2)
> Possible duplicate of bugs 946953 ?

I don’t think so, I saw it before I created this report, I noticed the user was able to run the main service, just the incus-user service was failing, and in conditions like the main service was missing and resuming for suspend.
Comment 4 Joonas Niilola gentoo-dev 2025-03-17 14:47:06 UTC
https://linuxcontainers.org/incus/docs/main/requirements/
"Native Linux AIO (io_setup(2), etc.)"

I don't know enough hardened, but I guess incus won't work on hardened with libaio? At least incus-user - which in principle I understand.
Comment 5 Thibaud CANALE 2025-03-27 18:12:32 UTC
(In reply to Joonas Niilola from comment #4)
> https://linuxcontainers.org/incus/docs/main/requirements/
> "Native Linux AIO (io_setup(2), etc.)"
> 
> I don't know enough hardened, but I guess incus won't work on hardened with
> libaio? At least incus-user - which in principle I understand.

Hello Joonas, sorry I missed your reply,

Thanks for the link, I didn’t think it was a kernel syscall, which was in fact "obvious" as `io_setup` is in the `system call` (2) man category.

Meanwhile I am rebuilding my kernel with this option newly enabled, I provided a PR which might fix the issue.
I will test ASAP once done compiling.
Comment 6 Thibaud CANALE 2025-03-27 18:36:53 UTC
(In reply to Thibaud CANALE from comment #5)
> Meanwhile I am rebuilding my kernel with this option newly enabled, I
> provided a PR which might fix the issue.
> I will test ASAP once done compiling.

Test successful, service is starting (`rc-service incus start` & `rc-service incus-user start`)
Comment 7 Larry the Git Cow gentoo-dev 2025-03-28 06:22:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2c9b64e08506efe6c3ce20966b74a72f2f6cc6e

commit f2c9b64e08506efe6c3ce20966b74a72f2f6cc6e
Author:     Thibaud CANALE <thican@thican.net>
AuthorDate: 2025-03-27 17:59:14 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2025-03-28 06:06:18 +0000

    app-containers/incus: ensure kernel AIO support
    
    Required as mentioned in documentation.
    https://github.com/lxc/incus/commit/414ad2c9f5997faa875046aa0d76ace059faf969
    
    Closes: https://bugs.gentoo.org/951352
    Signed-off-by: Thibaud CANALE <thican@thican.net>
    Closes: https://github.com/gentoo/gentoo/pull/41325
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/incus/incus-6.0.2-r1.ebuild  | 217 ++++++++++++++++++++++++++
 app-containers/incus/incus-6.0.3-r1.ebuild  | 228 +++++++++++++++++++++++++++
 app-containers/incus/incus-6.10.1-r1.ebuild | 225 +++++++++++++++++++++++++++
 app-containers/incus/incus-6.8-r1.ebuild    | 230 ++++++++++++++++++++++++++++
 app-containers/incus/incus-6.9-r3.ebuild    | 228 +++++++++++++++++++++++++++
 5 files changed, 1128 insertions(+)