Hide Forgot
Description of problem: zif-0.2.5-0.129.20110926git fails to update PackageKit from my zif-backport repository, triggering a GObject warning, an assertion failure (which is a g_return_if_fail assertion and doesn't abort the program outright) and a segmentation fault. Version-Release number of selected component (if applicable): zif-0.2.5-0.129.20110926git.fc15.x86_64 zif-tools-0.2.5-0.129.20110926git.fc15.x86_64 (Using the command line because the old PackageKit build doesn't run with the new zif, even though the soname hasn't been bumped…) How reproducible: Always Steps to Reproduce: 1. Enable the zif-backport repository on Fedora 15. 2. Update to zif-0.2.5-0.129.20110926git.fc15.x86_64 from the repository. (I also have PackageKit-0.6.17-1.fc15.libzif.so.3.x86_64 from the repo, but I guess it's not needed.) 3. su -c "zif update" Actual results: Calculating install[======= ] (15%) PackageKit-gstreamer-plugin-0.6.17-1.fc15.zifbackend.20110926git.x86_64 (fedora-zif-backport) (zif:1763): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `ZifPackage' (zif:1763): Zif-CRITICAL **: zif_package_get_name_arch: assertion `ZIF_IS_PACKAGE (package)' failed Program received signal SIGSEGV, Segmentation fault. Expected results: Successful update. Additional info: Backtrace of the GObject warning: #0 0x0000003e2a84a780 in g_log_default_handler () from /lib64/libglib-2.0.so.0 #1 0x0000003e2a84b2ca in g_logv () from /lib64/libglib-2.0.so.0 #2 0x0000003e2a84b682 in g_log () from /lib64/libglib-2.0.so.0 #3 0x0000003e2c0330e3 in g_type_check_instance_cast () from /lib64/libgobject-2.0.so.0 #4 0x00007ffff7d97cbf in zif_store_resolve_full (store=<optimized out>, search=<optimized out>, flags=<optimized out>, state=0x67e5b0, error=<optimized out>) at zif-store.c:1136 #5 0x00007ffff7da5e6b in zif_transaction_resolve_install_item (error= 0x7fffffffdef8, item=0x621df0, data=0xd2d8590) at zif-transaction.c:1938 #6 zif_transaction_resolve_loop (data=0xd2d8590, state=0x67e1b0, error= 0x7fffffffe490) at zif-transaction.c:3170 #7 0x00007ffff7da9ac7 in zif_transaction_resolve ( transaction=<optimized out>, state=0x67e1b0, error=0x7fffffffe490) at zif-transaction.c:3434 #8 0x000000000040e0a4 in zif_transaction_run (priv=0x618090, transaction= 0xd615af0, state=0x67e3b0, error=0x7fffffffe490) at zif-main.c:2363 #9 0x000000000040e6e5 in zif_cmd_update_all (priv=0x618090, values=<optimized out>, error=0x7fffffffe490) at zif-main.c:4253 #10 0x000000000040f4be in zif_cmd_update (priv=0x618090, values= 0x7fffffffe5e8, error=0x7fffffffe490) at zif-main.c:4365 #11 0x0000000000407762 in main (argc=2, argv=0x7fffffffe5d8) at zif-main.c:6490 Backtrace of the assertion failure: #0 0x0000003e2a84b840 in g_return_if_fail_warning () from /lib64/libglib-2.0.so.0 #1 0x00007ffff7d83451 in zif_package_get_name_arch (package=0x39f72e0) at zif-package.c:932 #2 0x00007ffff7d97d5d in zif_store_resolve_full (store=<optimized out>, search=<optimized out>, flags=<optimized out>, state=0x67e5b0, error=<optimized out>) at zif-store.c:1149 #3 0x00007ffff7da5e6b in zif_transaction_resolve_install_item (error= 0x7fffffffdef8, item=0xd619fa0, data=0xd61de70) at zif-transaction.c:1938 #4 zif_transaction_resolve_loop (data=0xd61de70, state=0x67e1b0, error= 0x7fffffffe490) at zif-transaction.c:3170 #5 0x00007ffff7da9ac7 in zif_transaction_resolve ( transaction=<optimized out>, state=0x67e1b0, error=0x7fffffffe490) at zif-transaction.c:3434 #6 0x000000000040e0a4 in zif_transaction_run (priv=0x618090, transaction= 0xd615af0, state=0x67e3b0, error=0x7fffffffe490) at zif-main.c:2363 #7 0x000000000040e6e5 in zif_cmd_update_all (priv=0x618090, values=<optimized out>, error=0x7fffffffe490) at zif-main.c:4253 #8 0x000000000040f4be in zif_cmd_update (priv=0x618090, values= 0x7fffffffe5e8, error=0x7fffffffe490) at zif-main.c:4365 #9 0x0000000000407762 in main (argc=2, argv=0x7fffffffe5d8) at zif-main.c:6490 Backtrace of the segfault: #0 0x0000003e28d2aa16 in __strcmp_ssse3 () from /lib64/libc.so.6 #1 0x00007ffff7db0029 in zif_str_compare_equal (a=<optimized out>, b=<optimized out>) at zif-utils.c:1420 #2 0x00007ffff7d97d97 in zif_store_resolve_full (store=<optimized out>, search=<optimized out>, flags=<optimized out>, state=0x67e5b0, error=<optimized out>) at zif-store.c:1151 #3 0x00007ffff7da5e6b in zif_transaction_resolve_install_item (error= 0x7fffffffdef8, item=0x172d7e0, data=0x684ec0) at zif-transaction.c:1938 #4 zif_transaction_resolve_loop (data=0x684ec0, state=0x67e1b0, error= 0x7fffffffe490) at zif-transaction.c:3170 #5 0x00007ffff7da9ac7 in zif_transaction_resolve ( transaction=<optimized out>, state=0x67e1b0, error=0x7fffffffe490) at zif-transaction.c:3434 #6 0x000000000040e0a4 in zif_transaction_run (priv=0x618090, transaction= 0xd6152f0, state=0x67e3b0, error=0x7fffffffe490) at zif-main.c:2363 #7 0x000000000040e6e5 in zif_cmd_update_all (priv=0x618090, values=<optimized out>, error=0x7fffffffe490) at zif-main.c:4253 #8 0x000000000040f4be in zif_cmd_update (priv=0x618090, values= 0x7fffffffe5e8, error=0x7fffffffe490) at zif-main.c:4365 #9 0x0000000000407762 in main (argc=2, argv=0x7fffffffe5d8) at zif-main.c:6490 Valgrind detects only the segfault (same backtrace as the last one from GDB) and nothing before.
yum has no problems performing the (straightforward) update: Loaded plugins: downloadonly, refresh-packagekit Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package PackageKit.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-glib.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-glib.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-gstreamer-plugin.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-gstreamer-plugin.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-gtk-module.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-gtk-module.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-qt.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-qt.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-yum-plugin.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-yum-plugin.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update ---> Package PackageKit-zif.x86_64 0:0.6.17-1.fc15.libzif.so.3 will be updated ---> Package PackageKit-zif.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: PackageKit x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 562 k PackageKit-glib x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 138 k PackageKit-gstreamer-plugin x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 35 k PackageKit-gtk-module x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 34 k PackageKit-qt x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 164 k PackageKit-yum-plugin x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 32 k PackageKit-zif x86_64 0.6.17-1.fc15.zifbackend.20110926git fedora-zif-backport 56 k Transaction Summary ================================================================================ Upgrade 7 Package(s) Total download size: 1.0 M Is this ok [y/N]: y Downloading Packages: (1/7): PackageKit-0.6.17-1.fc15.zifbackend.20110926git.x | 562 kB 00:00 (2/7): PackageKit-glib-0.6.17-1.fc15.zifbackend.20110926 | 138 kB 00:00 (3/7): PackageKit-gstreamer-plugin-0.6.17-1.fc15.zifback | 35 kB 00:00 (4/7): PackageKit-gtk-module-0.6.17-1.fc15.zifbackend.20 | 34 kB 00:00 (5/7): PackageKit-qt-0.6.17-1.fc15.zifbackend.20110926gi | 164 kB 00:00 (6/7): PackageKit-yum-plugin-0.6.17-1.fc15.zifbackend.20 | 32 kB 00:00 (7/7): PackageKit-zif-0.6.17-1.fc15.zifbackend.20110926g | 56 kB 00:00 -------------------------------------------------------------------------------- Total 129 kB/s | 1.0 MB 00:07 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Updating : PackageKit-glib-0.6.17-1.fc15.zifbackend.20110926git.x86 1/14 Updating : PackageKit-zif-0.6.17-1.fc15.zifbackend.20110926git.x86_ 2/14 Updating : PackageKit-0.6.17-1.fc15.zifbackend.20110926git.x86_64 3/14 Updating : PackageKit-yum-plugin-0.6.17-1.fc15.zifbackend.20110926g 4/14 Updating : PackageKit-qt-0.6.17-1.fc15.zifbackend.20110926git.x86_6 5/14 Updating : PackageKit-gtk-module-0.6.17-1.fc15.zifbackend.20110926g 6/14 Updating : PackageKit-gstreamer-plugin-0.6.17-1.fc15.zifbackend.201 7/14 Cleanup : PackageKit-yum-plugin-0.6.17-1.fc15.libzif.so.3.x86_64 8/14 Cleanup : PackageKit-gstreamer-plugin-0.6.17-1.fc15.libzif.so.3.x8 9/14 Cleanup : PackageKit-qt-0.6.17-1.fc15.libzif.so.3.x86_64 10/14 Cleanup : PackageKit-gtk-module-0.6.17-1.fc15.libzif.so.3.x86_64 11/14 Cleanup : PackageKit-zif-0.6.17-1.fc15.libzif.so.3.x86_64 12/14 Cleanup : PackageKit-glib-0.6.17-1.fc15.libzif.so.3.x86_64 13/14 Cleanup : PackageKit-0.6.17-1.fc15.libzif.so.3.x86_64 14/14 Updated: PackageKit.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-glib.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-gstreamer-plugin.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-gtk-module.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-qt.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-yum-plugin.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git PackageKit-zif.x86_64 0:0.6.17-1.fc15.zifbackend.20110926git Complete! So what is zif choking on here?
I wonder if the metadata it downloaded is corrupt… (But if so, it failed to notice it and asserted instead.)
Hmm, that looks pretty bad. I think something in my last few zif commits has broken things? Could you try bisecting git master (on the last 10 commits or so should be required) and tell me when things broke? Thanks dude.
Actually, can you try with git master first, I think your snapshot might have missed some important commits I did yesterday.
Looks like my snapshot did indeed miss: https://github.com/hughsie/zif/commit/c8ec2218ce2fdedda2178e2eecc32ba5eea9b982 which touches the offending line (zif-store.c:1136). I'm testing a new one now, but it's always a PITA to test these things on a semi-production machine. It's not a VM with snapshots, I can't just rollback, I have to manually downgrade the packages so I can retest upgrading.
Seems fixed in zif-0.2.5-0.131.20110927git, at least I cannot reproduce it anymore. (I downgraded PackageKit* with rpm -Uvh --oldpackage and ran "zif update", works this time.) Closing.