Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286577 - gnome-base/gconf: programs using gconf fail if you start via "su"
Summary: gnome-base/gconf: programs using gconf fail if you start via "su"
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
: 289261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-26 21:58 UTC by Attila Stehr
Modified: 2010-10-12 15:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2009-09-26 21:58:06 UTC
meld can only be started as root when calling "su -" earlier

http://forums.gentoo.org/viewtopic-t-753713-highlight-meld+glib+gerror.html

Reproducible: Always

Steps to Reproduce:
1. run meld as root

Actual Results:  
magic linux # meld
Traceback (most recent call last):
  File "/usr/bin/meld", line 90, in <module>
    meldapp.main()
  File "/usr/lib64/meld/meldapp.py", line 982, in main
    app = MeldApp()
  File "/usr/lib64/meld/meldapp.py", line 562, in __init__
    self.prefs = MeldPreferences()
  File "/usr/lib64/meld/meldapp.py", line 435, in __init__
    super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
  File "/usr/lib64/meld/prefs.py", line 92, in __init__
    self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Der Konfigurationsserver konnte nicht kontaktiert werden; mögliche Fehlerquellen sind, dass TCP/IP für ORBit nicht aktiviert ist oder auf Grund eines Systemabsturzes alte NFS-Sperren gesetzt sind. Unter http://www.gnome.org/projects/gconf/ erhalten Sie weitere Informationen (Details -  1: Verbindung zur Sitzung konnte nicht abgerufen werden: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)


Expected Results:  
start of meld e.g. when updating config files by using cfg-update

Portage 12175-svn (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-1.12.11.1
Timestamp of tree: Sat, 26 Sep 2009 20:15:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict stricter test unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X acpi alsa amd64 applet archive bash-completion boundschecking bzip2 cairo cdinstall cdr clamav cracklib crypt cups cupsddk dbus dga directfb dri dvd dvdnav dvdr eds esd evo fam fbcon fontconfig fuse glitz gmp gnome gnutls gpm gstreamer gtk gzip hal hddtemp icu libnotify lm_sensors logitech-mouse lzma lzo md5sum memlimit mmx mmxext modules mp4 mudflap multilib nautilus networkmanager nls nocd nptl nptlonly offensive opengl openmp pam pda ppds pth rtc session smp spell sse sse2 ssl startup-notification symlink sysfs test threads threadsafe thunar truetype unicode usb videos xcb xml xorg xulrunner zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="radeon fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-27 09:00:18 UTC
failure to set or reset environment on sudo calls is an admin problem.
Comment 2 Attila Stehr 2009-09-27 16:55:21 UTC
I did not call cfg-update using sudo.

As you can see below meld is executed as root.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-27 23:06:04 UTC
the way you get root access counts, if you do sudo -s or su, you have to fix your environment before starting random apps. In this case, you have to unset DBUS_SESSION_BUS_ADDRESS.
Comment 4 Mart Raudsepp gentoo-dev 2009-09-28 22:57:22 UTC
I think instead of "su" you can use "su -" if you want this to work, that's what I'm always using without having any problems, as it makes it so as if you would have logged in as root
Comment 5 Attila Stehr 2009-09-29 08:48:57 UTC
(In reply to comment #4)
> I think instead of "su" you can use "su -" if you want this to work, that's
> what I'm always using without having any problems, as it makes it so as if you
> would have logged in as root
> 

Well, I thought all that should be done kind of automatically. Why can't the package be installed in a way that typing "su -" (which is tideous imo) is not  required.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-09-29 08:58:59 UTC
That's up to you to know the difference between "su -", "su" and "sudo". meld only does what it's told to do and it'd be a hell of a mess if every app had to have special code to figure out what do when root or not, or if the environment is different.

"su -" resets all your user environment, that's all you should be using anyway. I'm sure sudo has a similar option as well.

Thanks
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-10-16 21:58:25 UTC
*** Bug 289261 has been marked as a duplicate of this bug. ***
Comment 8 Robert Golding 2009-10-17 02:28:49 UTC
Obviously I haven't been paying attention, I have been using Linux exclusively since '97 and Gentoo in particular since '02/'03, yet this is the first time I have even heard of 'su -'.

Gotta love it, you learn something new every day when you use Linux :-)
Comment 9 Juergen Rose 2009-11-21 17:19:41 UTC
Since today I have the same error. I can't start meld as root after doing 'su -'.
What has changed?
If I start '/usr/libexec/gconfd-2' as root manually in a second window, then I also can run meld and other gnome applications (which interact with gconfd?).
Comment 10 Juergen Rose 2009-11-21 17:23:41 UTC
Please reopen this bug.
Comment 11 Juergen Rose 2009-11-21 17:37:24 UTC
I have to correct myself. This procedure to start manually gconfd-2 works only at one computer. At the second computer starting meld kills a running gconfd-2.

Any help appreciated.
Comment 12 Attila Stehr 2009-11-21 23:43:39 UTC
reopened on request
Comment 13 Juergen Rose 2009-11-22 14:18:05 UTC
Still a further correction, it seems me, that meld is not killing a running gconfd, but the gconfd is dying at the first computer after some minutes and at the second computer after some seconds.
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-11-22 21:08:11 UTC
Isn't gconf supposed to quite after the last application using it stopped ? Could you paste the output of meld when run as you use it ?
Comment 15 Juergen Rose 2009-11-22 21:24:48 UTC
I open an usual terminal window as user rose become root and try to start meld:

rose@condor:/home/rose(1)$ su -
Password: 
##############################################################
99servers.sh:  CUR_RUNLEVEL=|3| PREV_RUNLEVEL=|N|
##############################################################
==== Interface eth0 is OK! =====
---  i_f=eth   i_f_state=OK,  before 'route | grep eth'
.bash_profile:  ==  GLOBAL_CONF_DIR=|/home_tarantel/rose|  ==
== before '/bin/ps waux'  ==
.bash_profile: before 'compare_conf_files &' (RUNLEVEL=3)
# --- Comparing some configuration files: ---
#          pwd=/root/*   /home_tarantel/rose/*
                      file=.bashrc
after ''cat ~/sys_config/compare_conf_files_.out''
root@condor:/root(1)# # before ''compare_two_dirs  usr/share/pixmaps /'' (RUNLEVEL=3)
ps -ef | grep gconf | grep -v grep
rose      6823     1  0 Nov16 ?        00:00:11 /usr/libexec/gconfd-2
rose      7400  7346  0 Nov16 ?        00:00:00 /usr/libexec/pulse/gconf-helper
root@condor:/root(2)# meld /root/.bash_profile ~rose/.bash_profile
Traceback (most recent call last):
  File "/usr/bin/meld", line 102, in <module>
    meldapp.main()
  File "/usr/lib64/meld/meldapp.py", line 921, in main
    app = MeldApp()
  File "/usr/lib64/meld/meldapp.py", line 425, in __init__
    self.prefs = MeldPreferences()
  File "/usr/lib64/meld/meldapp.py", line 366, in __init__
    super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
  File "/usr/lib64/meld/prefs.py", line 92, in __init__
    self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Could not send message to GConf daemon: Process /usr/libexec/gconfd-2 received signal 6)
root@condor:/root(3)# 

I can't start meld. Then I start gconfd-2 maually and then I can start meld.

root@condor:/root(3)# /usr/libexec/gconfd-2 &
[2] 21082
You have new mail in /var/mail/root
[1]   Done                    compare_conf_files 2> /dev/null
root@condor:/root(4)# meld /root/.bash_profile ~rose/.bash_profile
root@condor:/root(5)# 


After some time gconfd-2 is dying:

root@condor:/root(5)# psgrep gconfd
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rose      6823  0.0  0.1  49220  8416 ?        S    Nov16   0:11 /usr/libexec/gconfd-2
[2]+  Done                    /usr/libexec/gconfd-2
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-11-22 21:38:42 UTC
So your gconf is actually crashing in the first case, the second being the normal exit I described in comment #14. Could you start gconfd-2 in gdb as your "rose" user, try to run meld as root and attach a backtrace when it gets a sigbus ? Also please print the output of:
# env |egrep DBUS_SESSION_BUS_ADDRESS
in your root environment.
Comment 17 Juergen Rose 2009-11-22 21:49:46 UTC
root@condor:/root(5)# psgrep gconfd
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rose      6823  0.0  0.1  49220  8416 ?        S    Nov16   0:11 /usr/libexec/gconfd-2
[2]+  Done                    /usr/libexec/gconfd-2
root@condor:/root(6)# env |egrep DBUS_SESSION_BUS_ADDRESS
root@condor:/root(7)# exit
logout
rose@condor:/home/rose(2)$ env |egrep DBUS_SESSION_BUS_ADDRESS
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-sLq6NMhqOb,guid=2911d3dab83d4c4573a4898b4b0161e7
rose@condor:/home/rose(3)$ kill 6823
rose@condor:/home/rose(4)$ ps -ef | grep gconfd-2 | grep -v grep
rose@condor:/home/rose(5)$ gdb /usr/libexec/gconfd-2
GNU gdb (Gentoo 7.0 p1) 7.0
Copyright (C) 2009 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".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/libexec/gconfd-2...(no debugging symbols found)...done.
(gdb) run 
Starting program: /usr/libexec/gconfd-2 
[Thread debugging using libthread_db enabled]
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.2-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace


In a second window I start meld as root:
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(39)# meld /root/.bashrc  ~rose/.bashrc
Traceback (most recent call last):
  File "/usr/bin/meld", line 102, in <module>
    meldapp.main()
  File "/usr/lib64/meld/meldapp.py", line 921, in main
    app = MeldApp()
  File "/usr/lib64/meld/meldapp.py", line 425, in __init__
    self.prefs = MeldPreferences()
  File "/usr/lib64/meld/meldapp.py", line 366, in __init__
    super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
  File "/usr/lib64/meld/prefs.py", line 92, in __init__
    self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Could not send message to GConf daemon: Process /usr/libexec/gconfd-2 received signal 6)
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(41)# ps -ef | grep gconfd | grep -v grep
rose     24973 19890  0 22:43 pts/13   00:00:00 gdb /usr/libexec/gconfd-2
rose     24975 24973  0 22:43 pts/13   00:00:00 /usr/libexec/gconfd-2

In the window where I started gconfd-2 under gdb I do not get additional information. I assume that I have to compile gconf with debugging flags. I will try this next.
Comment 18 Juergen Rose 2009-11-22 22:11:20 UTC
I set the debugging options in /etc/make.conf and reemerge gconfd:

root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(49)# grep "^CFLAGS" /etc/make.conf
CFLAGS="-march=nocona -O2 -ggdb -pipe"
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(50)# grep "debug" /etc/make.conf
FEATURES="fixpackages splitdebug"
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(51)# emerge -v1 gconf

These are the packages that would be merged, in order:
...
>>> Installing (1 of 1) gnome-base/gconf-2.28.0-r1
 * checking 77 files for package collisions
...
 * GNU info directory index is up-to-date.
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(52)# 

Then I start again gconfd-2 under gdb as user rose:
 rose@condor:/home/rose(13)$ ps -ef | grep gconfd
rose     29766 19890  0 23:07 pts/13   00:00:00 grep --colour=auto gconfd
rose@condor:/home/rose(14)$ gdb /usr/libexec/gconfd-2
GNU gdb (Gentoo 7.0 p1) 7.0
Copyright (C) 2009 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".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/libexec/gconfd-2...Reading symbols from /usr/lib64/debug/usr/libexec/gconfd-2.debug...done.
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/libexec/gconfd-2 
[Thread debugging using libthread_db enabled]
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.2-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace

Program exited with code 01.
(gdb) 


Nevertheless I see in the root window a running gconfd-2 owned by rose and I try to start meld there:
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(52)# psgrep gconfd
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rose     29767  0.0  0.1  40508 13452 pts/13   S+   23:07   0:00 gdb /usr/libexec/gconfd-2
rose     29777  0.1  0.1  48888  8172 ?        S    23:07   0:00 /usr/libexec/gconfd-2
root@condor:/home/rose/Txt_grizzly/Pictures/Travelling(53)# meld
Traceback (most recent call last):
  File "/usr/bin/meld", line 102, in <module>
    meldapp.main()
  File "/usr/lib64/meld/meldapp.py", line 921, in main
    app = MeldApp()
  File "/usr/lib64/meld/meldapp.py", line 425, in __init__
    self.prefs = MeldPreferences()
  File "/usr/lib64/meld/meldapp.py", line 366, in __init__
    super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
  File "/usr/lib64/meld/prefs.py", line 92, in __init__
    self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Could not send message to GConf daemon: Process /usr/libexec/gconfd-2 received signal 6)

But it failes.
Comment 19 Pacho Ramos gentoo-dev 2010-04-14 16:26:58 UTC
This is an upstream problem (and I doubt we will be able to fix it downstream, maybe this should be closed as UPSTREAM)

https://bugzilla.gnome.org/show_bug.cgi?id=555745
Comment 20 Pacho Ramos gentoo-dev 2010-10-12 15:25:46 UTC
(In reply to comment #19)
> This is an upstream problem (and I doubt we will be able to fix it downstream,
> maybe this should be closed as UPSTREAM)
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=555745
> 

Closing, we will track it upstream