GNOME Bugzilla – Bug 770072
gnome-logs crashes with SIGSEGV when run as non root user
Last modified: 2016-09-13 11:32:31 UTC
dev@unstable:~$ gnome-logs (gnome-logs:17245): Gtk-WARNING **: GtkListBox with a model will ignore sort and filter functions Segmentation fault (core dumped) Crash backtrace: Core was generated by `gnome-logs'. Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 236557
Thanks for taking the time to report this. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information on how to do so and reopen this bug report. Thanks in advance!
(gdb) thread apply all bt
+ Trace 236561
Thread 1 (Thread 0x7f7753d87a00 (LWP 16573))
Also, please specify which version of gnome-logs you are using.
dev@unstable:~$ gnome-logs --version gnome-logs - Version 3.20.1 -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gnome-logs depends on: ii dconf-gsettings-backend [gsettings-backend] 0.26.0-1 ii gsettings-desktop-schemas 3.20.0-3 ii libatk1.0-0 2.20.0-1 ii libc6 2.23-4 ii libcairo-gobject2 1.14.6-1+b1 ii libcairo2 1.14.6-1+b1 ii libgdk-pixbuf2.0-0 2.34.0-1 ii libglib2.0-0 2.48.1-3 ii libgtk-3-0 3.20.7-1 ii libpango-1.0-0 1.40.1-1 ii libpangocairo-1.0-0 1.40.1-1 ii libsystemd0 231-1 gnome-logs recommends no packages. gnome-logs suggests no packages. -- no debconf information
Created attachment 333904 [details] [review] quick and dirty patch to avoid crash on start Not sure all in the condition block should go inside it. Comments welcome.
fwiw, This bug also reported in Debian as http://bugs.debian.org/802334
Removing NEEDINFO status and setting it to NEW as hopefully the required information should now have been provided. For completeness, I'm reproducing the issue both on gnome 3.20.1 and 3.21.90. For me just doing "sudo chmod o= /var/log/journal" causes the issue (which makes the permission match what my newly installed Debian computer has, following the recommended procedure in https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/README.Debian#n1 ). If not already obvious the problem comes from boot_ids->len being 0. This obviously results in g_array_index being called with argument -1 at https://git.gnome.org/browse/gnome-logs/tree/src/gl-window.c#n438 and gdb told me this sets boot_id to a "random" address. Once boot_id gets dereferenced on the next line it goes boom.
(In reply to Andreas Henriksson from comment #7) > Removing NEEDINFO status and setting it to NEW as hopefully the required > information should now have been provided. > > For completeness, I'm reproducing the issue both on gnome 3.20.1 and 3.21.90. > For me just doing "sudo chmod o= /var/log/journal" causes the issue (which > makes the permission match what my newly installed Debian computer has, > following the recommended procedure in > https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/README. > Debian#n1 ). > If not already obvious the problem comes from boot_ids->len being 0. This > obviously results in g_array_index being called with argument -1 at > https://git.gnome.org/browse/gnome-logs/tree/src/gl-window.c#n438 and gdb > told me this sets boot_id to a "random" address. Once boot_id gets > dereferenced on the next line it goes boom. I think you can't even see any log entry using "journalctl". I tested it and that's the case. So the fix in Comment 5 is only a hack, I must say. But there is definitely something Logs needs to do, that is to show a proper warning in this situation.
(In reply to Jonathan Kang from comment #8) > I think you can't even see any log entry using "journalctl". I tested it and > that's the case. So the fix in Comment 5 is only a hack, I must say. > > But there is definitely something Logs needs to do, that is to show a proper > warning in this situation. It's already showing "Unable to read system logs" in this case (after being fixed to not crash)... what more warning do you need?
*** Bug 770947 has been marked as a duplicate of this bug. ***
I get other BT in Debian Stretch (gdb) thread apply all bt
+ Trace 236638
Thread 1 (Thread 0x7ffff7f27a40 (LWP 24023))
(In reply to Andreas Henriksson from comment #9) > (In reply to Jonathan Kang from comment #8) > > I think you can't even see any log entry using "journalctl". I tested it and > > that's the case. So the fix in Comment 5 is only a hack, I must say. > > > > But there is definitely something Logs needs to do, that is to show a proper > > warning in this situation. > > It's already showing "Unable to read system logs" in this case (after being > fixed to not crash)... what more warning do you need? Is there still any log entry shown in Logs?
Should be fixed in master with commit cde50ce4631030fa3c46d5b6e26d2eaa3b78508b.