After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770072 - gnome-logs crashes with SIGSEGV when run as non root user
gnome-logs crashes with SIGSEGV when run as non root user
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
3.20.x
Other Linux
: High critical
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
: 770947 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-08-18 07:56 UTC by gnome.vrb
Modified: 2016-09-13 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
quick and dirty patch to avoid crash on start (994 bytes, patch)
2016-08-22 13:24 UTC, Andreas Henriksson
none Details | Review

Description gnome.vrb 2016-08-18 07:56:08 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.
  • #0 ??
  • #0 0x000000000040dcec in
  • #1 g_type_create_instance
    at ././gobject/gtype.c line 1875
  • #2 g_object_new_internal
    at ././gobject/gobject.c line 1781
  • #3 g_object_new_valist
    at ././gobject/gobject.c line 2040
  • #4 g_object_new
    at ././gobject/gobject.c line 1624
  • #5 0x0000000000406e57 in
  • #6 _g_closure_invoke_va
    at ././gobject/gclosure.c line 867
  • #7 g_signal_emit_valist
    at ././gobject/gsignal.c line 3294
  • #8 g_signal_emit
    at ././gobject/gsignal.c line 3441
  • #9 g_application_activate
    at ././gio/gapplication.c line 2148
  • #10 g_application_real_local_command_line
    at ././gio/gapplication.c line 1045
  • #11 g_application_run
    at ././gio/gapplication.c line 2350
  • #12 0x0000000000406720 in
  • #13 __libc_start_main
    at ../csu/libc-start.c line 291
  • #14 0x0000000000406779 in
  • #1 g_type_create_instance
    at ././gobject/gtype.c line 1875

Comment 1 David King 2016-08-18 16:15:00 UTC
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!
Comment 2 gnome.vrb 2016-08-18 16:20:17 UTC
(gdb) thread apply all bt   

Thread 1 (Thread 0x7f7753d87a00 (LWP 16573))

  • #0 gl_window_init
    at src/gl-window.c line 438
  • #1 g_type_create_instance
    at ././gobject/gtype.c line 1875
  • #2 g_object_new_internal
    at ././gobject/gobject.c line 1781
  • #3 g_object_new_valist
    at ././gobject/gobject.c line 2040
  • #4 g_object_new
    at ././gobject/gobject.c line 1624
  • #5 gl_window_new
    at src/gl-window.c line 498
  • #6 gl_application_activate
    at src/gl-application.c line 223
  • #7 _g_closure_invoke_va
    at ././gobject/gclosure.c line 867
  • #8 g_signal_emit_valist
    at ././gobject/gsignal.c line 3294
  • #9 g_signal_emit
    at ././gobject/gsignal.c line 3441
  • #10 g_application_activate
    at ././gio/gapplication.c line 2148
  • #11 g_application_real_local_command_line
    at ././gio/gapplication.c line 1045
  • #12 g_application_run
    at ././gio/gapplication.c line 2350
  • #13 main
    at src/gl-main.c line 39

Comment 3 David King 2016-08-18 16:22:45 UTC
Also, please specify which version of gnome-logs you are using.
Comment 4 gnome.vrb 2016-08-18 16:35:30 UTC
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
Comment 5 Andreas Henriksson 2016-08-22 13:24:27 UTC
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.
Comment 6 Andreas Henriksson 2016-08-22 13:25:10 UTC
fwiw, This bug also reported in Debian as http://bugs.debian.org/802334
Comment 7 Andreas Henriksson 2016-08-22 13:31:04 UTC
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.
Comment 8 Jonathan Kang 2016-09-06 09:27:09 UTC
(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.
Comment 9 Andreas Henriksson 2016-09-06 11:06:42 UTC
(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?
Comment 10 Fabio Durán Verdugo 2016-09-06 11:56:31 UTC
*** Bug 770947 has been marked as a duplicate of this bug. ***
Comment 11 Fabio Durán Verdugo 2016-09-06 11:58:07 UTC
I get other BT in Debian Stretch


(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7f27a40 (LWP 24023))

  • #0 gl_window_init
    at src/gl-window.c line 439
  • #1 g_type_create_instance
    at ././gobject/gtype.c line 1866
  • #2 g_object_new_internal
    at ././gobject/gobject.c line 1783
  • #3 g_object_new_valist
    at ././gobject/gobject.c line 2042
  • #4 g_object_new
    at ././gobject/gobject.c line 1626
  • #5 gl_window_new
    at src/gl-window.c line 541
  • #6 gl_application_activate
    at src/gl-application.c line 223
  • #10 <emit signal ??? on instance 0x555555786100 [GlApplication]>
    at ././gobject/gsignal.c line 3447
  • #11 g_application_activate
    at ././gio/gapplication.c line 2148
  • #12 g_application_real_local_command_line
    at ././gio/gapplication.c line 1045
  • #13 g_application_run
    at ././gio/gapplication.c line 2350
  • #14 main
    at src/gl-main.c line 39

Comment 12 Jonathan Kang 2016-09-12 08:36:05 UTC
(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?
Comment 13 David King 2016-09-13 11:32:16 UTC
Should be fixed in master with commit cde50ce4631030fa3c46d5b6e26d2eaa3b78508b.