[lxc-devel] ABI breakage
Stéphane Graber
stgraber at ubuntu.com
Fri May 29 15:31:10 UTC 2015
Hi,
Thanks for reporting this.
It was clearly not intentional, LXC's policy with regard to liblxc is
that we will add new symbols and append struct members but we will not
modify or remove symbols nor add stuff in the middle of existing
structs.
Clearly we failed with regard to the lxc_container struct. Fixing the
ordering in there will also unfortunately cause some additional breakage
for people using LXC 1.1 but given it's still a reasonably recent
release it's probably the least damaging solution.
I'll send a patch to the list to fix lxc_container and add sufficiently
clear comments in there that this hopefully won't happen again.
As for downgrades, we don't really support those. Our intent is that
something built against 1.0 will keep on working until 2.0 but if you're
building on 1.1, then you're getting the new symbols from that release
and the code won't work on 1.0 anymore. Linking against liblxc.so.1.1.0
specifically in that case is preferred.
On Fri, May 29, 2015 at 04:34:18PM +0200, Lukasz Pawelczyk wrote:
> Hi,
>
> We're using LXC in some of our projects and we've found that ABI gets
> broken without soname changes. And I don't mean extended (where
> versioning would be enough), I mean broken.
>
> Eg. this commit:
>
> 18aa217bb187b551206fe66075229ba382a1dbe4
>
> It adds destroy_with_snapshots() function pointer inside a lxc_container
> struct effectively breaking every application that's been linked with a
> previous version and use pointers below that function.
>
> A quick diff between 1.0.0 and 1.1.2 shows that 2 functions in total has
> been added in the middle of a struct:
> destroy_with_snapshots()
> snapshot_destroy_all()
>
> and 4 others at the end (that will cause problems in case of downgrades
> without ABI versioning).
>
> The soname between 1.0 and 1.1 has not changed as far as I can see.
>
> Does this mean that LXC ABI is unreliable and can't be trusted?
>
>
> --
> Lukasz Pawelczyk
> Samsung R&D Institute Poland
> Samsung Electronics
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20150529/9f3de7cf/attachment.sig>
More information about the lxc-devel
mailing list