update-manager fails to bring up the password prompt for root privileges

Bug #187982 reported by Matthias Andersson
38
Affects Status Importance Assigned to Milestone
gksu (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Hardy by youleeann

Bug Description

I've noticed that around a third of the times there's an update available update-manager informs about it, when I click on the icon in the tray it opens up the program which fetches the list of available updates but when I press "install updates" the update-manager fails to bring up the password prompt and the only way to get rid of the instance is by going through the terminal, ps-ef |grep update manager and kill the pid. So far it has always worked on the second try.

If the prompt for the password manages to launch as it should then the rest of the installation works just fine.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

What version of ubuntu do you use? This sounds like a bug in gksu (that applicaton used to get root priviledges). What locale do you use?

Thanks,
 Michael

Changed in update-manager:
status: New → Incomplete
Revision history for this message
Matthias Andersson (matthias-andersson) wrote : Re: [Bug 187982] Re: update-manager fails to bring up the password prompt for root privileges

I use Ubuntu 7.10 and UTF-8.

//Matthias Andersson

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this additional information.

Could you please run:
$ ps afx
when this hang appears and copy the part of the output where update-manager is in into this bugreport?
Could you also please run
$ strace -p $pid_nr
where $pid_nr is the ID of either synaptic or gksu and paste the output to this report?

Thanks,
 Michael

Revision history for this message
Matthias Andersson (matthias-andersson) wrote :

Hi!

Here is the requested information:

ps afx:
 6455 ? Sl 0:04 /usr/bin/python2.5 /usr/bin/update-manager
 6483 ? S 0:00 \_ gksu --desktop
/usr/share/applications/update-manager.desktop -- /usr/sbin/synaptic
--hide-main-window --non-interactive --par
 6488 ? Ss 0:00 \_ /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u
root -- /usr/sbin/synaptic --hide-main-window --non-interactive
--parent-window-

strace -p 6483:

waitpid(6488, 0xbfa70b3c, WNOHANG) = 0
stat64("/proc/6488", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/6488/stat", O_RDONLY) = 23
read(23, "6488 (sudo) S 6483 6488 6488 0 -"..., 8191) = 199
close(23) = 0

(this apperas over and over again)

Cheers,
Matthias

Revision history for this message
crf (chrisfahlman) wrote :

I frequently have this problem too. Update Manager will work until I choose to click "install the updates". Then there will usually be a window that appears briefly in the panel "starting administrative application". Sometimes a window will appear on the desktop and ask for my password, and when that happens the update Manager continues to work properly and downloads and installs the updates. However, sometimes the "starting administrative application" window in the panel disappears straight away, no password prompt appears, and when that happens Update Manager hangs (the little spinner icon spins endlessly), and must be force quit.

the whole ps afx is attached in the file psoutput

here is the parts requested:
////////
 8047 ? S 0:12 gksu --desktop /usr/share/applications/update-manager.desktop -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 44040195 -o Synaptic::closeZvt=true --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /tmp/tmpY0aVPy
 8048 ? Ss 0:00 \_ /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 44040195 -o Synaptic::closeZvt=true --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /tmp/tmpY0aVPy
 8144 ? Sl 0:30 /usr/bin/python2.5 /usr/bin/update-manager
 8158 ? S 0:03 \_ gksu --desktop /usr/share/applications/update-manager.desktop -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 44040195 -o Synaptic::closeZvt=true --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /tmp/tmpdf2ypM
 8159 ? Ss 0:00 \_ /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 44040195 -o Synaptic::closeZvt=true --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /tmp/tmpdf2ypM
/////////

here is straces:

/////////
root@paqsaq:~/Desktop# strace -p 8048

Process 8048 attached - interrupt to quit
read(0,
\\\\\\\\

/////////
strace -p 8047 > strace8047

{see attachment strace8047}
\\\\\\\\\

////////
strace -p 8144 > strace8144

{I manually stopped this trace. See attachment strace8144}
\\\\\\\\

////////
strace -p 8158 > strace8158

{see attachment strace8158}
\\\\\\\\\

/////////
strace -p 8159 > strace8159

Process 8159 attached - interrupt to quit
read(0,
\\\\\\\\\

Revision history for this message
crf (chrisfahlman) wrote :

oops. All those attachments were empty, so I didn't bother.

Revision history for this message
crf (chrisfahlman) wrote :

I figured it out. strace -o filename -p pid

Revision history for this message
crf (chrisfahlman) wrote :
Revision history for this message
crf (chrisfahlman) wrote :
Revision history for this message
crf (chrisfahlman) wrote :
Revision history for this message
Henning Moll (drscott) wrote :

I can confirm that problem in hardy.

I encounter that problem only on an "Toshiba Satellite Pro 4300", a slow system compared to nowadays systems, so it may be a timing problem?

Changed in gksu:
status: Incomplete → Confirmed
Revision history for this message
RobertGemmell (rgbassoon) wrote :

I also have this problem in Hardy. It happens everytime Update Manager has a new list of updates to process. If I kill it and retry, it works just fine.

Revision history for this message
Brian Railey (brianscruisin) wrote :

Ditto above (Robert & Henning.) Didn't have the problem in Gutsy on the same machine, a slow PII. I kill the process via the System Monitor which indicates, like most everything else listed, Update Manager is sleeping. Second attempt to update works as it should.

Revision history for this message
quixote (commer-greenglim) wrote :

I have this problem on Hardy Heron with all updates installed as of Apr 18, 11 am Los Angeles time. I have a relatively old Sharp MP30 laptop. After I kill the process and retry update-manager, it just hangs before the password window appears, so retry does not work in my case.

I get the same issue when I try to start synaptic via the menu (start-system-admin-synaptic).

Starting synaptic via the terminal (sudo synaptic) works fine. That's how I've been getting my updates.

Unless I'm the only person left with this problem ( I do have an odd laptop ;) ) it seems pretty important to get this fixed before the 24th.

Revision history for this message
crf (chrisfahlman) wrote :

I have an old laptop as well, running hardy, and I see this problem still.

Sometimes it will stall while trying to update. Often it will successfully update, but then stall, for example, after clicking to redownload an updated package list.

Also it always works by doing sudo update-manager, or sudo apt-get. But that's cheating ;-)

 I can see very briefly in the bottom panel of gnome "starting administrative application". But then, no password prompt will come and update manager will hang with the spinner.

Revision history for this message
Doug Anson (doug-anson) wrote :

I can confirm this issue in hardy as well - Running release hardy on a D630.

Revision history for this message
John (john-m-lang) wrote :

I've had this problem with the last few Ubuntu releases. However with Hardy it's gotten worse. Before killing gksu and restarting the update-manager would allow me to install updates. Now I have to sudo update-manager to get updates to install.

Revision history for this message
Bernard Hill (berni-zionundy) wrote :

Update to 8.04 successful. Early updates worked OK. I notice update manager has been updated more than once. Now when I click on the update icon the list of updates is presented but clicking on install sends the computer into an endless loop. My only solution is Ctrl, Alt, Backspace and relogin. I have been able to update using KPackage, but would much prefer to use the presented Desktop method.

I get the message cannot locate <linpc> when attempting to sudo Update Manager.

When the machine did a drive check the other day, the drive was listed as sdb not hdb. Is this important?

Revision history for this message
javiespa (javiespa) wrote :

A simple workaround that works in my case (while the bug is fixed):
1. When you get updates notified, open the update manager as usual
2. Instead of installing the existing updates (this will produce the problem we all have), pres Check for new updates. This will ask for the admin password and will work correctly. You will obtain the same list of updates.
3. Press Install the updates. Since the admin password was entered in previous step, it will not be asked for again
Voila!

PS: My system is quite up to date hardware wise, I don't think it's because of it being slow (Core 2 duo extreme, 8 Gigs of ram ...) running Hardy. Previous version (Gutsy?) worked fine

Revision history for this message
Bernard Hill (berni-zionundy) wrote : Re: [Bug 187982] Re: update-manager fails to bring up the password prompt for root privileges

On Wed, 2008-05-14 at 10:27 +0000, javiespa wrote:
> A simple workaround that works in my case (while the bug is fixed):
> 1. When you get updates notified, open the update manager as usual
> 2. Instead of installing the existing updates (this will produce the problem we all have), pres Check for new updates. This will ask for the admin password and will work correctly. You will obtain the same list of updates.
> 3. Press Install the updates. Since the admin password was entered in previous step, it will not be asked for again
> Voila!
>
> PS: My system is quite up to date hardware wise, I don't think it's
> because of it being slow (Core 2 duo extreme, 8 Gigs of ram ...) running
> Hardy. Previous version (Gutsy?) worked fine
>

Many thanks. Will give that a try at the next update.

Berni.

Revision history for this message
NoOp (glgxg) wrote :

@javiespa: That workaround does work for me.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the additional comments/information.

What locale do you use? Does:
$ gksu id
print anything on the terminal? Does that command work or hang too?

Thanks,
 Michael

Revision history for this message
NoOp (glgxg) wrote : Re: [Bug 187982] Re: update-manager fails to bring up the password prompt for root privileges

Locale: en_US.UTF-8

$gksu id
briefly shows a "Starting Administrativ..." tab on the bottom panel the
first time. If I repeat the command immediately, the password prompt
comes up. I see that there are updates available today - this is a
laptop (A21 Thinkpad, 800Mhz, 128MB of RAM) that I generally only use on
occassion, or for testing. So, if you'd like me to test something
before, or during, installing the updates let me know. I'll wait until I
hear back.

Revision history for this message
crf (chrisfahlman) wrote :

If I run in the terminal
$ gksu id
it briefly shows "Starting Administrative Application" in the bottom panel, and then hangs, printing nothing in the terminal.

Revision history for this message
quixote (commer-greenglim) wrote :

$gksu id does not work for me either. Same thing: "starting administrative" tab visible on the bottom panel, and then it disappears. This is after I installed all updates as of this morning (May 28), including a big set with new linux headers etc etc.

Revision history for this message
NoOp (glgxg) wrote :

On 05/28/2008 07:03 PM, quixote wrote:
> $gksu id does not work for me either. Same thing: "starting
> administrative" tab visible on the bottom panel, and then it disappears.
> This is after I installed all updates as of this morning (May 28),
> including a big set with new linux headers etc etc.
>

And if you do a ctrl-c exit then immediately issue another gksu id does
it then work? That's what happened in my case. I've also found that
sometimes 'gksu id' works, other times not.

I'm still waiting for a response back from Michael; I have not updated
the laptop since my last comments & I'm quite willing to provide/test
whatever is necessary on that machine to assist. But I'm traveling this
weekend so the laptop will be updated on Friday (US time) regardless.

Revision history for this message
quixote (commer-greenglim) wrote :

NoOp: $gksu id doesn't work doing anything I've tried, including ctrl-c followed by another gksu id. I've also tried opening another terminal window just for the hell of it. I haven't tried doing it outside the GUI altogether.

(What does work, just to reiterate, is $sudo synaptic and then using "mark all upgrades".)

Revision history for this message
Brain Cell (bsill) wrote :

quixote: Thank you for the tip on $sudo synaptic. I've been wondering for 2 days now how I was going to get gksu corrected. I'm running Edubuntu 8.04 (upgraded from 7.10 a while back), and everything was running beautifully until about 2 days ago when I ran the updates, and then gksu wouldn't present the password prompt.

Revision history for this message
Florian Wallner (fwallner) wrote :

I have the impression, that this problem is somehow related to sudos or gksus ability to resolve its own hostname. This Bug appeared for me after a fresh hardy install. I discovered that my Notebook was not able to resolve it's own hostname (somehow /etc/hosts got messed up) after fixing that gksu worked flawlessly again.

cheers,
  --Florian

Revision history for this message
Brain Cell (bsill) wrote :

Florian,
  You are wonderful! I went into my hosts file, and sure enough there was no listing for my hostname (I entered a bogus domain about a month ago, and then decided to remove it the same day, and the hosts file still contained the bogus domain!). After correcting the 127.0.0.1 hostname line, gksu worked fine!
Sincerely,
Brain Cell

Revision history for this message
Bernard Hill (berni-zionundy) wrote : sudo password

Exactly how should the 127.0.0.1 hostname read?

Berni

Revision history for this message
Florian Wallner (fwallner) wrote :

The hostname for 127.0.0.1 should be 'localhost'. It should do no harm however to add another line like this:
'127.0.1.1 <Your hostname here>' It should be the hostname as defined in /etc/hostname , I think

cheers,
    --Florian

Revision history for this message
Brain Cell (bsill) wrote :

  Thank you for clarifying that Florian. My hosts file doesn't contain a line for localhost, but if I ping localhost, it replies from 127.0.0.1 just as it would if it were listed in the hosts file. In Windows, the hosts file explicitly lists localhost, so for my curiosity does anyone know where localhost is defined in Ubuntu?
Sincerely,
Brain Cell

Revision history for this message
quixote (commer-greenglim) wrote :

I hate to keep being the wet blanket here, but . . . my /etc/hosts file looks okay (127.0.0.1 localhost, 127.0.1.1 <my hostname>). But I continue to have the gksu problem. It affects not just the upgrade manager. Anything accessed via the GUI that normally asks for a password hangs up at that point. If I really need the utility, I have to figure out which command calls it up, and then try $sudo <command>. The problem started with Hardy. I've been using Ubuntu since Dapper.

Revision history for this message
Bernard Hill (berni-zionundy) wrote : Re: [Bug 187982] Re: update-manager fails to bring up the password prompt for root privileges

On Fri, 2008-05-30 at 18:18 +0000, Florian Wallner wrote:
> The hostname for 127.0.0.1 should be 'localhost'. It should do no harm however to add another line like this:
> '127.0.1.1 <Your hostname here>' It should be the hostname as defined in /etc/hostname , I think
>
> cheers,
> --Florian
>

Many thanks. I have altered the /etc/hosts file to include the
line '127.0.1.1 <Your hostname here>' with the hostname the same
as in the hosts file, as you suggested, and the command <$ gksu id>
behaves itself and no longer hangs the computer. I shall have to see
what happens at the next update.

As others have said, this problem started after updates after upgrading
to Hardy, so as is often said, 'there is something rotten in the state
of Denmark'. I trust that brains better than mine will be able to solve
the problem in time for the next upgrade.

Berni.

Revision history for this message
NoOp (glgxg) wrote : Re: [Bug 187982] Re: update-manager fails to bring up the password prompt for root privileges

On 05/30/2008 01:01 PM, quixote wrote:
> I hate to keep being the wet blanket here, but . . . my /etc/hosts file
> looks okay (127.0.0.1 localhost, 127.0.1.1 <my hostname>). But I
> continue to have the gksu problem. It affects not just the upgrade
> manager. Anything accessed via the GUI that normally asks for a
> password hangs up at that point. If I really need the utility, I have
> to figure out which command calls it up, and then try $sudo <command>.
> The problem started with Hardy. I've been using Ubuntu since Dapper.
>

I also have 127.0.0.1 & 127.0.1.1 configured properly & all of my
hostnames etc., are working just fine.

This is starting ot sound similar to:
https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/91151
[gksu doesn't always pop up a dialog]

You might try the

sudo -K; gksudo -d echo Test

Mine passes just fine, as does

sudo -K; gksu -d echo Test

Multiple other bugs seeming to point to this/similar issues:
https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/55172
[gksu dies on first run]
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/231565
[[hardy] update-manager freezes after clicking on install updates]
https://bugs.launchpad.net/ubuntu/+source/policykit/+bug/210897
[sudo *something which uses poliykit?* doesn't work]
https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/234402
[update manager doesn't work in Hardy]

https://bugs.launchpad.net/ubuntu/+source/sudo
https://bugs.launchpad.net/ubuntu/+source/gksu

Revision history for this message
Kevin (sciprok) wrote :

I have just edited my hosts file to change my 127.0.1.1 from <pcname>.<domain> to just <pcname> without the domain and it now works.

Revision history for this message
youleeann (write2iuli) wrote :

hello,
i had the same problem in hardy but i solved it from this link
http://ubuntuforums.org/showthread.php?s=e0cafa9e0ceb48eaf29cae2a4edcc855&t=723361

Revision history for this message
javiespa (javiespa) wrote :

Removing the domain name from /etc/hosts works for me too!

Revision history for this message
tc7 (tc7) wrote :

I had the same issue loading synaptic although sometimes it worked and sometimes not.
If I launched from a terminal using: "sudo synaptic" it worked every time.

Adding: 127.0.1.1 <my hostname>
to /etc/hosts worked wonders.

many thanks!

Revision history for this message
quixote (commer-greenglim) wrote :

Just in case anyone reads these things (yes, I know, I'm feeling snarky), I wanted to mention that the last set of updates fixed the problem for me. They included some files related to update-manager, and they showed up on August 12, 2008, plus or minus a day.

Nice to finally have that annoyance fixed!

Revision history for this message
quixote (commer-greenglim) wrote :

(Erm, so nobody has to plow through the entire comment thread, I run Hardy, 8.04, on a Sharp Actius MP30 that dates to May 2005.)

Revision history for this message
Andreas Moog (ampelbein) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

Changed in gksu:
status: Confirmed → Invalid
Revision history for this message
NoOp (glgxg) wrote :

And just how do you reach that conclusion, particularly without any verification of what may, or may not, have fixed it? I see nothing in the gksu or update-manager change logs related to this bug:

https://launchpad.net/ubuntu/+source/gksu
https://launchpad.net/ubuntu/+source/update-manager

====
https://wiki.ubuntu.com/Bugs/Status
#Invalid:

* This status should be used when the bug report does not contain adequate information to determine whether or not it is a bug even if it is resolved for the reporter
* It should be used conservatively as bugs marked as closed bugs no longer show up in default searches
* Be sure to triple-check a bug before you invalidate it
====

There is, as of Aug 13, an ongoing issue on the Ubuntu users list with this problem:
https://lists.ubuntu.com/archives/ubuntu-users/2008-August/156469.html

Revision history for this message
Andreas Moog (ampelbein) wrote :

See Bug #237325, https://bugs.launchpad.net/ubuntu/+source/libgksu/+bug/237325, along with the changes made in version 2.0.5-1ubuntu5.2 of libgksu.

Revision history for this message
Andreas Moog (ampelbein) wrote :

But you are right, Fix Released may be the better status-change. I forgot to set status correctly. My apologies.

Changed in gksu:
status: Invalid → Fix Released
Revision history for this message
NoOp (glgxg) wrote :

Thanks! (For both pointing to the resolution and amending the status change).

FWIW: the fellow that had this problem on the users list just reported his issue as resolved; he managed to get to a wired connection, did 106 updates & now reports that all is working. I reckon that the libgksu patch was part of those 106.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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