FS#61499 - [btrfs-progs] libbtrfs.so broken ABI

Attached to Project: Arch Linux
Opened by Jose Ramirez (JRamirez) - Tuesday, 22 January 2019, 08:39 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 21 March 2019, 04:08 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: btrfs-progs 4.20-1 from testing breaks snapper

Since btrfs-progs 4.20-1 snapper gives:
snapper: symbol lookup error: /usr/lib/libbtrfs.so.0: undefined symbol: btrfs_alloc_path

btrfs-progs4.19.1-1 works

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

snapper list
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Thursday, 21 March 2019, 04:08 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Tuesday, 22 January 2019, 16:34 GMT
With what kernel?

Can you run btrfs fi df?
Comment by Eli Schwartz (eschwartz) - Tuesday, 22 January 2019, 18:33 GMT
  • Field changed: Attached to Project (Arch Linux → Community Packages)
  • Field changed: Summary ([btrfs-progs] → [btrfs-progs] [snapper] API/ABI changes in btrfs-progs break snapper)
Snapper is not even able to be rebuilt at the source level when using texting-x86_64-build:

[...]
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -DCONFDIR=\"/etc/conf.d\" -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=c++11 -Wall -Wextra -Wformat -Wnon-virtual-dtor -Wno-unused-parameter -MT Btrfs.lo -MD -MP -MF .deps/Btrfs.Tpo -c Btrfs.cc -fPIC -DPIC -o .libs/Btrfs.o
Btrfs.cc: In member function ‘virtual void snapper::Btrfs::deleteSnapshot(unsigned int) const’:
Btrfs.cc:422:53: error: ‘subvolid’ was not declared in this scope
qgroup_destroy(subvolume_dir.fd(), calc_qgroup(0, subvolid));
^~~~~~~~
Btrfs.cc:422:53: note: suggested alternative: ‘subvolume’
qgroup_destroy(subvolume_dir.fd(), calc_qgroup(0, subvolid));
^~~~~~~~
subvolume
In file included from ../snapper/Snapshot.h:33,
from ../snapper/Snapper.h:32,
from Btrfs.cc:53:
Btrfs.cc: In member function ‘virtual void snapper::Btrfs::createConfig() const’:
../snapper/Exception.h:84:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
_SN_THROW((EXCEPTION), SN_EXCEPTION_CODE_LOCATION)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Btrfs.cc:131:7: note: in expansion of macro ‘SN_THROW’
SN_THROW(CreateConfigFailedException("creating btrfs subvolume .snapshots failed "
^~~~~~~~
Btrfs.cc:134:3: note: here
default:
^~~~~~~
make[2]: *** [Makefile:579: Btrfs.lo] Error 1
make[2]: Leaving directory '/build/snapper/src/snapper-0.8.1/snapper'
make[1]: *** [Makefile:547: all-recursive] Error 1
make[1]: Leaving directory '/build/snapper/src/snapper-0.8.1'
make: *** [Makefile:452: all] Error 2
==> ERROR: A failure occurred in build().
Comment by Eli Schwartz (eschwartz) - Tuesday, 22 January 2019, 19:01 GMT
  • Field changed: Attached to Project (Community Packages → Arch Linux)
  • Field changed: Summary ([btrfs-progs] [snapper] API/ABI changes in btrfs-progs break snapper → [btrfs-progs] libbtrfs.so broken ABI)
  • Task reassigned to Sébastien Luttringer (seblu)
Never mind, apparently snapper does not use those symbols, but it is definitely in libbtrfs.so

nm -D /usr/lib/libbtrfs.so.0.1
reports several btrfs symbols as "U" (undefined), in contrast with the previous version which did not list those symbols at all but the btrfs binaries in /usr/bin did.

libbtrfs.so does not appear to be used by any part of the actual btrfs-progs, did this version not get tested? Apparently it is only used by snapper... :/
Comment by Eli Schwartz (eschwartz) - Tuesday, 22 January 2019, 19:11 GMT
Symbol changes in libbtrfs.so between the old and new version:

--- /tmp/libbtrfs-old 2019-01-22 14:07:48.175020617 -0500
+++ /tmp/libbtrfs-new 2019-01-22 14:07:50.481706117 -0500
@@ -2,10 +2,14 @@
T arg_strtou64
U backtrace
U backtrace_symbols_fd
+U btrfs_alloc_path
T __btrfs_error
T __btrfs_error_on
+U btrfs_extend_item
+U btrfs_free_path
T btrfs_get_subvol
T btrfs_get_toplevel_subvol
+U btrfs_insert_empty_items
T btrfs_list_alloc_comparer_set
T btrfs_list_alloc_filter_set
T btrfs_list_find_updated_files
@@ -19,8 +23,11 @@
T btrfs_list_subvols_print
T btrfs_lookup_uuid_received_subvol_item
T btrfs_lookup_uuid_subvol_item
+U btrfs_mark_buffer_dirty
T btrfs_read_and_process_send_stream
+U btrfs_search_slot
T btrfs_subvolid_resolve
+T btrfs_uuid_tree_add
T __btrfs_warning
T __btrfs_warning_on
U calloc
@@ -66,6 +73,7 @@
T rb_replace_node
T rb_search
U read
+U read_extent_buffer
U realloc
U sprintf
U __stack_chk_fail
@@ -91,3 +99,4 @@
U uuid_is_null
U uuid_unparse
U vfprintf
+U write_extent_buffer


All these new U symbols are T in for example /usr/bin/mkfs.btrfs
Comment by Massimiliano Torromeo (mtorromeo) - Wednesday, 23 January 2019, 10:05 GMT Comment by Massimiliano Torromeo (mtorromeo) - Wednesday, 23 January 2019, 13:10 GMT Comment by Sébastien Luttringer (seblu) - Wednesday, 23 January 2019, 14:30 GMT
4.20.1 is in testing. Let me know if it's ok with snapper now.
Comment by Massimiliano Torromeo (mtorromeo) - Wednesday, 23 January 2019, 16:56 GMT
It seems to work fine but I don't have a system with btrfs available at the moment. At least it doesn't complain about missing symbols.
No rebuild needed.

Loading...