GNOME Bugzilla – Bug 692340
Run nautilus as root cause gnome-shell to hang when trying to open activities
Last modified: 2017-04-22 11:58:22 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
Gnome-shell and nautilus versions are 3.6
Beside causing gnome-shell to hang when opening activities, the running nautilus does not have app menu.
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.
Created attachment 234290 [details] session.log
Above is my session.log file, but I don't know how to attach gdb to gnome-shell, my distribution is fedora 18.
(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.
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
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)
Seems you're right! I could only reproduce the freeze after setting SELinux back to enforcing mode.
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!
Hm, as it causes a total freeze, I cannot attach anything until I reset my PC - would the procedure you described still work?
The problem still happens when I have disabled selinux. Below is my gdb.txt content
+ Trace 231444
Inferior 1 [process 1321] will be detached. Quit anyway? (y or n) Detaching from program: /usr/bin/gnome-shell, process 1321
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.
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
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.
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.