You are not logged in.

#1 2016-10-13 17:10:30

anark10n
Member
Registered: 2012-10-13
Posts: 212

[RESOLVED] gnome-disks segmentation when executed as root

Hey there. So, just like the title reads, gnome-disks will seg fault if I try running it as root. Instantly without any useful errors. However, it executes fine if I run it as normal user. Any help with this is much appreciated.

Last edited by anark10n (2016-10-15 08:42:53)

Offline

#2 2016-10-13 17:26:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: [RESOLVED] gnome-disks segmentation when executed as root

If it segfaults, you should run it through gdb.
I'd also likely important *how* you run it "as root" (and "why" itfp)

Online

#3 2016-10-13 19:20:58

anark10n
Member
Registered: 2012-10-13
Posts: 212

Re: [RESOLVED] gnome-disks segmentation when executed as root

seth wrote:

If it segfaults, you should run it through gdb.
I'd also likely important *how* you run it "as root" (and "why" itfp)

I don't quite get what you mean by run it through gdb. Any resource on how to do this?
I run it as root using the sudo command from the terminal. What is itfp?

Offline

#4 2016-10-13 19:29:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: [RESOLVED] gnome-disks segmentation when executed as root

"In The First Place" - welcome to the internet ;-)

Running an X11 client with a "naive" sudo call won't work and should not be necessary (it should elevate through polkit actions) - you could use gksu instead.

Are you sure it really segfaults like in exiting with SIGSEGV?
If so, run "sudo gdb gnome-disks", this will start gdb and have it load gnome-disks.
You'll then have to "run" the debugged process, wait until it segfaults and "thread apply all bt" to fetch a backtrace for all threads.

Online

#5 2016-10-14 18:33:58

anark10n
Member
Registered: 2012-10-13
Posts: 212

Re: [RESOLVED] gnome-disks segmentation when executed as root

I get the segmentation fault error when I run it from a terminal. Running it in the terminal, it outputs a line Segmentation fault and nothing else. I tried it that way to see what error it returned after nothing happened when using gksu. Not sure this is the same as the SIGSEGV you're asking for.

This is what I get when I try sudo gdb gnome-disks:

NU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnome-disks...(no debugging symbols found)...done.

Offline

#6 2016-10-14 21:48:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: [RESOLVED] gnome-disks segmentation when executed as root

you need enter "run" and (after the segfault) "thread apply all bt" - otherwise gdb won't do anything ;-)

Online

#7 2016-10-15 04:05:27

anark10n
Member
Registered: 2012-10-13
Posts: 212

Re: [RESOLVED] gnome-disks segmentation when executed as root

Right, sorry. First time using gdb. Here's the output:

Starting program: /usr/bin/gnome-disks 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffec38a700 (LWP 4278)]
[New Thread 0x7fffebb89700 (LWP 4279)]

Thread 1 "gnome-disks" received signal SIGSEGV, Segmentation fault.
0x00007ffff6974c97 in gtk_menu_button_set_menu_model () from /usr/lib/libgtk-3.so.0
(gdb) thread apply all bt

Thread 3 (Thread 0x7fffebb89700 (LWP 4279)):
#0  0x00007ffff467748d in poll () from /usr/lib/libc.so.6
#1  0x00007ffff4da3066 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007ffff4da33f2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff539e7c6 in ?? () from /usr/lib/libgio-2.0.so.0
#4  0x00007ffff4dc9345 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff493d454 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007ffff46807df in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffec38a700 (LWP 4278)):
#0  0x00007ffff467748d in poll () from /usr/lib/libc.so.6
#1  0x00007ffff4da3066 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007ffff4da317c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff4da31c1 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff4dc9345 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff493d454 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007ffff46807df in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7f1c900 (LWP 4273)):
#0  0x00007ffff6974c97 in gtk_menu_button_set_menu_model () from /usr/lib/libgtk-3.so.0
#1  0x00007ffff69224a0 in ?? () from /usr/lib/libgtk-3.so.0
#2  0x00007ffff50781b4 in ?? () from /usr/lib/libgobject-2.0.so.0
#3  0x00007ffff50928ed in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#4  0x00007ffff5092fdf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff6ab087e in gtk_widget_realize () from /usr/lib/libgtk-3.so.0
#6  0x00007ffff6ab0af8 in gtk_widget_map () from /usr/lib/libgtk-3.so.0
#7  0x00007ffff6ac61d0 in ?? () from /usr/lib/libgtk-3.so.0
#8  0x00007ffff50781b4 in ?? () from /usr/lib/libgobject-2.0.so.0
#9  0x00007ffff50928ed in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff5092fdf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff6ab0ab0 in gtk_widget_map () from /usr/lib/libgtk-3.so.0
#12 0x00007ffff6abdccb in ?? () from /usr/lib/libgtk-3.so.0
#13 0x00007ffff5077f85 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff508996b in ?? () from /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff5092bfc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff5092fdf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff6aaa602 in gtk_widget_show () from /usr/lib/libgtk-3.so.0
#18 0x00007ffff50781b4 in ?? () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff50928ed in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff5092fdf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#21 0x0000000000415968 in ?? ()
#22 0x00007fffef6011c8 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#23 0x00007fffef600c2a in ffi_call () from /usr/lib/libffi.so.6
#24 0x00007ffff5078c9a in g_cclosure_marshal_generic_va () from /usr/lib/libgobject-2.0.so.0
#25 0x00007ffff50781b4 in ?? () from /usr/lib/libgobject-2.0.so.0
#26 0x00007ffff50923c1 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#27 0x00007ffff5092fdf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#28 0x00007ffff5365ae3 in ?? () from /usr/lib/libgio-2.0.so.0
#29 0x00007ffff5367b34 in ?? () from /usr/lib/libgio-2.0.so.0
#30 0x00007ffff5367d02 in g_application_run () from /usr/lib/libgio-2.0.so.0
#31 0x0000000000415176 in main ()

Offline

#8 2016-10-15 06:39:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: [RESOLVED] gnome-disks segmentation when executed as root

https://bugs.archlinux.org/task/42815
It's your gtk3 (and/or the root users) theme (and according to the bug won't happen with adwaita)

As mentioned in the bug as well: running gnome-disks as root is pointless and disapproved.

Online

#9 2016-10-15 08:41:58

anark10n
Member
Registered: 2012-10-13
Posts: 212

Re: [RESOLVED] gnome-disks segmentation when executed as root

Ah, I see. Kind of strange though, seeing as ll the programs open with the default gnome theme when I run them as root and not the theme I use as normal user. I was just trying to run it as root seeing as I couldn't format an internal disk when i run it as a normal user, got it done anyway. Will mark the thread as resolved. Thanks for the help.

Offline

Board footer

Powered by FluxBB