sudo needs a long time to determine the host name

Bug #21859 reported by Dani Alonso
4
Affects Status Importance Assigned to Milestone
sudo (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Whenever I try to run a graphical app (such as boot-admin, network-admin,
gnome-cups-manager) that need to be invoked trough sudo they suffer a great
delay before their window is showed in the desktop, though a "ps -A" in a
terminal shows that they are executing.

I've discovered that this problem is someway related to dhcp, because manually
running dhclient3 fixes the delay problems. But internet is already working
from the beginning so the network interface already has an ip assigned.

Revision history for this message
Matt Zimmerman (mdz) wrote :

sudo needs to lookup your hostname in order to process its configuration file.
If your DNS server is slow or unreachable, this will cause delays.

Revision history for this message
Dani Alonso (dalonso) wrote :

But the DNS server is ok because all other network related tasks (firefox,
evolution) have no problems.

Revision history for this message
nszabolcs (nszabolcs) wrote :

i have a fresh breezy install
for me "sudo nautilus" takes 3 min to start
"sudo gedit" doesn't start at all.
i don't know much about dhcp / dhclient3 so i didn't tried that way.
hope this helps.

nsz@ubuntu:~$ time sudo gedit

** (gedit:7927): CRITICAL **: gedit_prefs_manager_get_int: assertion
`gedit_prefs_manager->gconf_client != NULL' failed

** (gedit:7927): CRITICAL **: gedit_prefs_manager_get_bool: assertion
`gedit_prefs_manager->gconf_client != NULL' failed

** (gedit:7927): CRITICAL **: gedit_prefs_manager_get_bool: assertion
`gedit_prefs_manager->gconf_client != NULL' failed

** (gedit:7927): CRITICAL **: gedit_prefs_manager_get_int: assertion
`gedit_prefs_manager->gconf_client != NULL' failed

(gedit:7927): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>'
in cast to `GObject'

(gedit:7927): GLib-GObject-WARNING **: instance of invalid non-instantiatable
type `<invalid>'

(gedit:7927): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(gedit:7927): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>'
in cast to `BonoboMDI'

** (gedit:7927): CRITICAL **: bonobo_mdi_add_child: assertion `BONOBO_IS_MDI
(mdi)' failed

** (gedit:7927): CRITICAL **: gedit_file_new: assertion `ret != FALSE' failed

real 3m9.576s
user 0m0.372s
sys 0m0.032s

Revision history for this message
nszabolcs (nszabolcs) wrote :

(In reply to comment #3)
> i have a fresh breezy install
> for me "sudo nautilus" takes 3 min to start

sorry, my installation was broken
(i stepped throught some important network config durig the installation: after
dhcp failed i selected 'go back' and skipped few install options, which caused a
totally broken system)

nsz

Revision history for this message
Martin Pitt (pitti) wrote :

It works fine for me without any noticeable delay. Maybe your /etc/hosts doesn't contain a line for 'localhost'?

Changed in sudo:
status: Unconfirmed → Needs Info
Revision history for this message
Martin Pitt (pitti) wrote :

No answer for a long time, and if the reason is really the missing localhost line in /etc/hosts, then this is already covered by bug 32906.

Changed in sudo:
status: Needs Info → Rejected
Revision history for this message
jido (jido) wrote :

i have the same problem.

- it takes a long time (> 3min) to start nautilus with sudo or gksudo
- sudo gedit does not start at all

i guess more programs are affected.

any clue, how to solve this problem?

thanks,
jido

Revision history for this message
jido (jido) wrote :

forgot to mention that /etc/hosts contains a localhost line.

jido

Revision history for this message
jido (jido) wrote :

by removing the package GNOME-PPP the problem solved.

i don't know why, but it seems, that gnome-ppp is blocking sudo.

can someone reproduce this bug.

thank you,
jido

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.