FS#64789 - [libvirt] Version 5.9 can't start lxc containers

Attached to Project: Community Packages
Opened by Darrell (denns) - Tuesday, 10 December 2019, 07:03 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 04 May 2023, 01:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
freswa (frederik)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

With libvirt 5.9.0-1, LXC containers are not able to start. It fails with the following error:

> virsh -c lxc:/// start myguest
error: Failed to start domain myguest
error: internal error: guest failed to start: free(): invalid size

If I downgrade to libvirt 5.8.0-1, it works fine:
> virsh -c lxc:/// start myguest
Domain myguest started

In case the container config is relevent - it's an Arch container, unprivileged (idmap), using systemd init.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 04 May 2023, 01:48 GMT
Reason for closing:  No response
Additional comments about closing:  Closing this as assumed fixed for now.
Comment by Darrell (denns) - Tuesday, 04 February 2020, 06:14 GMT
I can confirm it's still broken on libvirt 5.10. The error message has just changed slightly (it now says "double free or corruption").
Comment by loqs (loqs) - Monday, 30 March 2020, 15:16 GMT
Is the issue present with version 6.1.0? See https://bugs.archlinux.org/task/63152#comment187885 for source bundle.
Comment by Darrell (denns) - Sunday, 19 April 2020, 18:16 GMT
Same issue here with 6.1.0-2:

virsh -c lxc:/// start mycontainer
error: Failed to start domain mycontainer
error: internal error: guest failed to start: free(): invalid size
Comment by Darrell (denns) - Sunday, 19 April 2020, 18:36 GMT
Hrm, I wonder if this fixes it:
https://libvirt.org/git/?p=libvirt.git;a=commit;h=140c756f5ca598b5640d3a5342e8914e7f88bc9b

I will try and do some further testing when I have some time.
Comment by loqs (loqs) - Sunday, 19 April 2020, 18:57 GMT
6.2.0 contains that commit. If the issue is still present do the libvirt log files contain more information?
Comment by Darrell (denns) - Sunday, 19 April 2020, 18:59 GMT
Just tested with libvirt 6.2.0 - issue still present.
Comment by loqs (loqs) - Sunday, 19 April 2020, 23:30 GMT
Are there any additional messages in libvirt's log [1] files when the container fails to start?
Try increasing the logging for the lxc category.

[1] https://libvirt.org/logging.html
Comment by Robin Broda (coderobe) - Wednesday, 06 May 2020, 21:14 GMT
Is this still an issue in 6.3.0-2?
Comment by Darrell (denns) - Sunday, 24 May 2020, 18:40 GMT
still broken on 6.3.0.3:

# virsh -c lxc:/// start mycontainer
error: Failed to start domain mycontainer
error: internal error: guest failed to start: double free or corruption (out)
Comment by Toolybird (Toolybird) - Sunday, 24 May 2020, 22:59 GMT
I cannot reproduce with a simple helloworld container. Please post your mycontainer.xml after running:

virsh -c lxc:/// dumpxml mycontainer > mycontainer.xml
Comment by Robin Broda (coderobe) - Sunday, 21 March 2021, 05:32 GMT
Is this still an issue in 1:7.0.0-2 or higher?
Comment by Darrell (denns) - Monday, 22 March 2021, 22:30 GMT
Issue still seems to be present in libvirt 7.1.0-1, but the error message has changed. It now shows the following error when trying to start the container:
error from service: GDBus.Error:org.freedesktop.machine1.NoMachineForPID: PID 623 does not belong to any known machine

I think it may only affect containers that use user namespaces (<idmap> section in guest xml).
Comment by David Mehren (davebloggt) - Thursday, 25 March 2021, 11:54 GMT
I started to experience the NoMachineForPID-error with libvirt 7.1, but for a privileged container (no idmap). A downgrade to libvirt-1:7.0.0-3 allows my container to start again.

While googling the error, I found https://bugzilla.opensuse.org/show_bug.cgi?id=1183247 which contains more details.
Comment by Toolybird (Toolybird) - Thursday, 27 April 2023, 06:36 GMT
Is this still an issue with latest pkgs?

Loading...