[Bug 981011] New: PackageKit dumps core during offline update
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011 Bug ID: 981011 Summary: PackageKit dumps core during offline update Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Upgrade Problems Assignee: bnc-team-screening@forge.provo.novell.com Reporter: badshah400@gmail.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- Created attachment 677842 --> http://bugzilla.opensuse.org/attachment.cgi?id=677842&action=edit journalctl log for the update session I tried to update my TW system from 20160505 to current using the PK offline upgrades method and after rebooting into the update mode it dumped core and hung. After manually rebooting, it booted into my old 20160505 desktop state. Couldn't install the exact versioned debuginfos because TW rpms have moved on since then, but both the journalctl and gdb bt from the coredump are attached here. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c1
--- Comment #1 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c2
Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
Bjørn Lie
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c3
--- Comment #3 from Bjørn Lie
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c4
--- Comment #4 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c5
Dominique Leuenberger
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c6
Dominique Leuenberger
pkcon get-updates -d
already makes packagekitd segfault, rendering PK pretty useless at the moment -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c7
Michael Andres
That sseems PK passing the objects from libzypp over an iterrator - as there was no change just recently in PK I have to assume a change in libzypp might cause this.
@Michael: can you recall a change that might cause this?
No. But if I look at the PK backend code and the BT location is correct:
#5 backend_get_update_detail_thread (...) at pk-backend-zypp.cpp:2454
2454: make<ResObject>(solvable)->description().c_str (), // update-text
The surrounding for-loop creates 'sat::Solvable solvable' from package_ids which seem to have been determined and stored before:
2406 sat::Solvable solvable = zypp_get_package_by_id (package_ids[i]); 2407 MIL << package_ids[i] << " " << solvable << endl;
There's no check whether the sat::Solvable returned by get_package_by_id is actually valid:
if ( ! solvable ) { // Previously stored package_id no longer matches any solvable. // May happen e.g. if repos meanwhile changed (add/remove/refresh) }
In this case ' make<ResObject>(solvable)' in line 2454 is a nullptr. If the backend logging is on, the log line written @2407 (MIL <<...) should tell whether this is what happened. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c8
--- Comment #8 from Michael Andres
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c9
--- Comment #9 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c10
--- Comment #10 from Michael Andres
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c11
--- Comment #11 from Atri Bhattacharya
From a different machine, which shows on its journal:
May 23 11:12:27 mal systemd-coredump[10518]: Process 10496 (packagekitd) of user 0 dumped core. May 23 11:12:32 mal PackageKit[10520]: daemon quit May 23 11:12:32 mal packagekitd[10520]: (packagekitd:10520): GLib-CRITICAL **: Source ID 10 was not found when attempting to remove it The log covers this time frame, luckily. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c12
--- Comment #12 from Michael Andres
2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(zypp_get_package_by_id):884 bundle-lang-common-en;13.2-21.4;noarch;repo-oss 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_get_update_detail_thread):2407 bundle-lang-common-en;13.2-21.4;noarch;repo-oss noSolvable ---------------------------(10520)--------------------------- ... 2016-05-23 11:11:52 <1> mal(10520) [zypp] ZYppFactory.cc(readLockFile):221 read: Lockfile /var/run/zypp.pid has pid 10496 (our pid: 10520) 2016-05-23 11:11:52 <1> mal(10520) [zypp] ZYppFactory.cc(isProcessRunning):193 Checking /proc/10496{[2-No such file or directory]} 2016-05-23 11:11:52 <1> mal(10520) [zypp] ZYppFactory.cc(zyppLocked):273 10496 is dead. Taking the lock file.
The log ends after 'pk-backend-zypp.cpp(backend_get_update_detail_thread):2407' reported it found 'noSolvable' for 'bundle-lang-common-en;13.2-21.4;noarch;repo-oss'. The backend crashed and the next PID 10520 finds the orphaned lock file of 10496. The backend must check for zypp_get_package_by_id returning 'noSolvable' and do whatever is appropriate in this situation. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c13
--- Comment #13 from Michael Andres
2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2702 bundle-lang-common-en newest;arch 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2730 found (155)bundle-lang-common-en-13.2-21.3.noarch(@System) 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2741 emit (155)bundle-lang-common-en-13.2-21.3.noarch(@System) 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2730 found (22482)bundle-lang-common-en-13.2-23.1.noarch(repo-oss) 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2741 emit (22482)bundle-lang-common-en-13.2-23.1.noarch(repo-oss) 2016-05-23 11:11:52 <1> mal(10496) [packagekit] pk-backend-zypp.cpp(backend_resolve_thread):2750 emit just newest (22482)bundle-lang-common-en-13.2-23.1.noarch(repo-oss)
But '13.2-21.4' isn't mentioned anywhere else in the log. Old data? -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c14
--- Comment #14 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c15
--- Comment #15 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c16
--- Comment #16 from Michael Andres
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c17
--- Comment #17 from Michael Andres
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c18
--- Comment #18 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c19
--- Comment #19 from Michael Andres
Also obs://home:mlandres:branches:GNOME:Factory/PackageKit but obs refuses to submitt
Today it worked: https://build.opensuse.org/request/show/414965 -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c20
--- Comment #20 from Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c21
Michael Andres
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c22
Atri Bhattacharya
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c23
--- Comment #23 from Atri Bhattacharya
Created attachment 733877 [details] tarball contains /var/log/pk_backend_zypp
Please note that, I did manually execute "zypper dup" and upgrade to TW VERSION_ID="20170724" after PK failed. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c24
--- Comment #24 from Michael Andres
sat::Solvable solvable = zypp_get_package_by_id( package_id ); if ( ! solvable ) { // Previously stored package_id no longer matches any solvable. // May happen e.g. if repos meanwhile changed (add/remove/refresh) } else { // found matching solvable }
Construncting pointer types like a ui::Selectable::Ptr from a sat::Solvable::noSolvable will result in a nullptr and leads to crashes like the above. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
Dominique Leuenberger
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=981011
http://bugzilla.opensuse.org/show_bug.cgi?id=981011#c33
Dominique Leuenberger
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com