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 692340 - Run nautilus as root cause gnome-shell to hang when trying to open activities
Run nautilus as root cause gnome-shell to hang when trying to open activities
Status: RESOLVED WONTFIX
Product: gnome-shell
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-22 22:59 UTC by Faizal Luthfi
Modified: 2017-04-22 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session.log (755.74 KB, application/octet-stream)
2013-01-24 10:27 UTC, Faizal Luthfi
Details
Log viewer that run automatically requested to be run as root that is showing common gnome-shell "authentication required" dialog (469.99 KB, image/png)
2013-01-29 02:25 UTC, Faizal Luthfi
Details

Description Faizal Luthfi 2013-01-22 22:59:22 UTC
Run nautilus as root cause gnome-shell to hang when trying to open activities
Comment 1 André Klapper 2013-01-23 12:06:07 UTC
Thanks for taking the time to report this bug.
Please see https://live.gnome.org/GnomeShell/Debugging how to provide debug information, and please mention your exact nautilus and gnome-shell versions.

For general information on how to file good bug reports with enough information, see http://bugzilla.gnome.org/bug-HOWTO.html
Comment 2 Faizal Luthfi 2013-01-23 13:17:21 UTC
Gnome-shell and nautilus versions are 3.6
Comment 3 Faizal Luthfi 2013-01-23 13:23:20 UTC
Beside causing gnome-shell to hang when opening activities, the running nautilus does not have app menu.
Comment 4 Milan Bouchet-Valat 2013-01-23 17:11:38 UTC
Please attach the contents of ~/.cache/gdm/session.log after the hang, and ideally please also attach gdb to the gnome-shell process and get a backtrace using the command "t a a bt". And what's your distribution? Thanks!

(In reply to comment #3)
> Beside causing gnome-shell to hang when opening activities, the running
> nautilus does not have app menu.
Yeah, this is bug 692339.
Comment 5 Faizal Luthfi 2013-01-24 10:27:41 UTC
Created attachment 234290 [details]
session.log
Comment 6 Faizal Luthfi 2013-01-24 10:29:50 UTC
Above is my session.log file, but I don't know how to attach gdb to gnome-shell, my distribution is fedora 18.
Comment 7 Milan Bouchet-Valat 2013-01-25 08:12:05 UTC
(In reply to comment #5)
> Created an attachment (id=234290) [details]
> session.log
You have tons of
Window manager warning: Log level 8: unable to create file '/run/user/1000/dconf/user': Permission denied.  dconf will not work properly.

in the logs. This may create unexpected bugs as this scenario has probably not been tested much. Do you still get these messages about  /run/user/1000/dconf/user after a reboot? Can you run:
ls --lcontext /run/user/1000/dconf/user
and paste the result here?

(In reply to comment #6)
> Above is my session.log file, but I don't know how to attach gdb to
> gnome-shell, my distribution is fedora 18.
You could do
gdb -ex "attach `pidof gnome-shell`"

But I guess you'd better sort out the dconf issue first.
Comment 8 eagleton 2013-01-25 08:28:09 UTC
I'm having the same problem with Fedora 18, and my system is flooded with this dconf warning:
gnome-session[988]: CRITICAL: unable to create file '/run/user/1000/dconf/user': Permission denied.  dconf will not work properly.

 It not only happens with nautilus, but also with gedit run as root, causing a hard freeze only resolvable by a reset. Ubuntu Gnome Remix 12.10 does not have this problem.

In Fedora, it seems to happen when I try to change files, like their names or content, as root.

ls --lcontext /run/user/1000/dconf/user 
-rw-------. 1 unconfined_u:object_r:config_home_t:s0 volker volker 2 25. Jan 09:17 /run/user/1000/dconf/user
Comment 9 Milan Bouchet-Valat 2013-01-25 08:35:16 UTC
Do you mean the messages only appear when running nautilus/gedit as root? Then it's probably SELinux blocking for some reason. Does that work after running
sudo setenforce 0
(do not forget to re-enable SELinux with sudo setenforce 1 afterwards)
Comment 10 eagleton 2013-01-25 09:13:28 UTC
Seems you're right! I could only reproduce the freeze after setting SELinux back to enforcing mode.
Comment 11 Milan Bouchet-Valat 2013-01-25 09:54:53 UTC
OK, so this is a Fedora bug, please report it there.

It may still be interesting to find out why the Shell crashes, to make it more robust. Could you install the needed debugging symbols with
sudo debuginfo-install

and then, after reproducing the hang, attach gnome-shell to a gdb process from a console (not gnome-terminal!) using:
gdb attach $(pidof gnome-shell)

then you can get a backtrace using
set logging on
thread apply all bt

You will find the output in the gdb.txt file in the directory you started gdb from. Thanks!
Comment 12 eagleton 2013-01-25 18:59:57 UTC
Hm, as it causes a total freeze, I cannot attach anything until I reset my PC - would the procedure you described still work?
Comment 13 Faizal Luthfi 2013-01-25 22:52:09 UTC
The problem still happens when I have disabled selinux. Below is my gdb.txt content


	Inferior 1 [process 1321] will be detached.

Quit anyway? (y or n) Detaching from program: /usr/bin/gnome-shell, process 1321
Comment 14 Faizal Luthfi 2013-01-29 02:25:09 UTC
Created attachment 234686 [details]
Log viewer that run automatically requested to be run as root that is showing common gnome-shell "authentication required" dialog

Log viewer that run automatically requested to be run as root that is showing common gnome-shell "authentication required" dialog does not cause gnome-shell activities to hang, is that different case? Because running log viewer with beesu does not cause gnome-shell activities to hang to..

Thanks.
Comment 15 mako 2014-09-10 02:27:45 UTC
I can corroborate this, getting a lot of
>'/run/user/1000/dconf/user': Permission denied.  dconf will not work properly.
gnome-shell hangs in debian testing. It's not just nautilus, happens for me with root_terminal most of the time.

This thread may prove enlightening https://bbs.archlinux.org/viewtopic.php?id=151788
Comment 16 Christian Stadelmann 2015-11-18 21:53:58 UTC
Please, don't run gedit or nautilus or any other gtk application as root. Most graphical applications and most of Gtk+ are not designed for being run as root.
Comment 17 Alexandre Franke 2017-04-22 11:58:22 UTC
Running applications as root (which was a bad idea) doesn’t work in Wayland. Nautilus now has a way to access files as root when needed while still running as non root user.