Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packagekitd crashes when GNOME Software is launching on debian buster #314

Closed
ahayzen opened this issue Feb 14, 2019 · 15 comments

Comments

Projects
None yet
8 participants
@ahayzen
Copy link

commented Feb 14, 2019

What happened

When launching GNOME Software it hangs at "Software catalog is being loaded", upon investigation we found that packagekitd is crashing (previous discussions here https://gitlab.gnome.org/GNOME/gnome-software/issues/589 ).

Logs

Journalctl shows the following information when this occurs

Feb 13 21:57:26 andrew-pc dbus-daemon[378]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.105' (uid=1000 pid=1572 comm="gnome-software --verbose ")
Feb 13 21:57:26 andrew-pc systemd[1]: Starting PackageKit Daemon...
Feb 13 21:57:26 andrew-pc PackageKit[1578]: daemon start
Feb 13 21:57:26 andrew-pc dbus-daemon[378]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Feb 13 21:57:26 andrew-pc systemd[1]: Started PackageKit Daemon.
Feb 13 21:57:26 andrew-pc PackageKit[1578]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Feb 13 21:57:26 andrew-pc PackageKit[1578]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Feb 13 21:57:26 andrew-pc gnome-shell[865]: clutter_input_focus_set_cursor_location: assertion 'clutter_input_focus_is_focused (focus)' failed
Feb 13 21:57:27 andrew-pc packagekitd[1578]: terminate called after throwing an instance of 'std::length_error'
Feb 13 21:57:27 andrew-pc packagekitd[1578]:   what():  basic_string::_M_replace
Feb 13 21:57:27 andrew-pc systemd[1]: packagekit.service: Main process exited, code=killed, status=6/ABRT
Feb 13 21:57:27 andrew-pc systemd[1]: packagekit.service: Failed with result 'signal'.

Running packagekitd under gdb gives the following backtrace https://pastebin.ubuntu.com/p/zd4YRfgzZn/

Versions

$ lsb_release -rd
Description:	Debian GNU/Linux buster/sid
Release:	testing
$ apt-cache policy gnome-software
gnome-software:
  Installed: 3.30.6-4
  Candidate: 3.30.6-4
  Version table:
 *** 3.30.6-4 500
        500 http://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy packagekit
packagekit:
  Installed: 1.1.12-1
  Candidate: 1.1.12-1
  Version table:
 *** 1.1.12-1 500
        500 http://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
@hughsie

This comment has been minimized.

Copy link
Owner

commented Feb 14, 2019

@dantti -- do you know the point of contact for the aptcc backend is now? Thanks.

@dantti

This comment has been minimized.

Copy link
Collaborator

commented Feb 15, 2019

Well it's me, @ximion and @julian-klode . Regarding this crash I could not see the issue by the BT besides PK having a bunch of threads which is a bit suspect...

@julian-klode

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2019

Well, um, the backtrace is from an entirely different thing - a signal Thread 4 "pool" received signal SIG33, Real-time event 33.

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 18, 2019

Ah I didn't spot this trace was different, sorry.

Hmm, is anyone else able to reproduce this issue ? It happens on Debian Buster sometimes at startup you can see the packagekitd crash in journalctl, and then gnome-software will hang on launch. If it doesn't happen, stopping gnome-software and trying to start your own instance will usually cause it. I spoke with folks on #debian-gnome and they said they had seen gnome-software sometimes hanging as well.

Or does anyone have any suggestions how to catch a correct trace? I tried installing systemd-coredumpctl but that doesn't seem to capture anything (maybe it isn't configured correctly), and as shown above manually starting packagekitd seems to result in a different trace :-/

@attuska attuska referenced this issue Feb 20, 2019

Closed

gnome-software #41

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 22, 2019

FWIW this does seem to be happening for multiple people in Debian Buster, I have found some Debian bugs https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917812 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922236 which are describing this issue.

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 22, 2019

So running packagekitd directly (not with gdb) fails with the throwing an instance of 'std::length_error' when I start gnome-software, this is packagekitd --verbose https://pastebin.ubuntu.com/p/n3s9N4w88z/ and this is strace packagekitd --verbose https://pastebin.ubuntu.com/p/bGJTyyfVs7/ not sure if they help narrow what it might be doing around the time of the crash.

@nroach44

This comment has been minimized.

Copy link

commented Feb 22, 2019

I thought I'd jump on here too - apt-get remove --purge packagekit && apt-get install gnome-software will fix the issue temporarily

@nroach44

This comment has been minimized.

Copy link

commented Feb 23, 2019

I have strace logs of the crashes:
https://nroach44.id.au/917812_pkit_strace.txt
https://nroach44.id.au/917812_gsoft_strace.txt

PKit trace should show GS accessing it normally twice, and then I killed GS, and started the GS trace, where PK crashes. I then kill GS before the log gets too much larger. From what I can tell, unlike the GDB logs, this crashes in the same fashion.

Hopefully this helps.

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 24, 2019

An interesting further data point is that building packagekit with aptcc with master I can not make it crash, but using https://github.com/hughsie/PackageKit/releases/tag/PACKAGEKIT_1_1_12 (which is what I believe Debian is using) I can.

Stepping through the commits I have found that if I apply d49e789 on top of 1.1.12 then it fixes the issue :-)

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 24, 2019

FYI I've submitted this https://salsa.debian.org/pkgutopia-team/packagekit/merge_requests/1 is anyone else able to confirm that this change fixes the issue for them ?

@Yvan-Masson

This comment has been minimized.

Copy link

commented Feb 26, 2019

@ahayzen Thanks for the patch, I confirm that it solved the issue for me.

Regards,
Yvan

@ahayzen

This comment has been minimized.

Copy link
Author

commented Feb 26, 2019

Thanks for confirming! Is anyone able to help get https://salsa.debian.org/pkgutopia-team/packagekit/merge_requests/1 into the buster release ?

@hughsie

This comment has been minimized.

Copy link
Owner

commented Feb 26, 2019

I can do a new upstream tarball release if it makes the process easier...

@jbicha

This comment has been minimized.

Copy link

commented Feb 27, 2019

Debian has accepted that patch into Unstable (it should land in Buster automatically after the minimum aging period.)

@ahayzen

This comment has been minimized.

Copy link
Author

commented Mar 23, 2019

This has landed in Debian Buster, therefore I am going to close this issue.

@ahayzen ahayzen closed this Mar 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.