gksu doesn't always pop up a dialog

Bug #91151 reported by Brian J. Murrell
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gksu (Ubuntu)
Fix Released
High
Michael Vogt
Hardy
Fix Released
High
Michael Vogt

Bug Description

Binary package hint: gksu

Probably, half the times I run update-manger, I spend 20-30 minutes going through package selections only to have gksu not prompt me for a password and update-manger sits there waiting. i.e.:

16542 ? Sl 2:34 /usr/bin/python /usr/bin/update-manager
20716 ? S 0:00 \_ gksu --desktop /usr/share/applications/update-manager.desktop -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 127926276 --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /home/brian/tmp/tmpu06MAC
20717 ? 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 127926276 --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /home/brian/tmp/tmpu06MAC

Now I have no choice but to kill off the sudo, and throw away that time I spent, and have to spend another 20-30 minutes making the selections again, and hoping that gksu won't screw me over again.

Is there any way I can avoid having to kill sudo and wasting that time?

Of course, fixing gksu is the ultimate solution but a workaround in the meanwhile would be appreciated.

Thanx!

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 91151] gksu doesn't always pop up a dialog

On Sat, 2007-03-10 at 15:17 +0000, Brian J. Murrell wrote:
>
> Is there any way I can avoid having to kill sudo and wasting that time?

As for this part, nm. I spent a few minutes looking at what was going
on a just ran:

$ sudo -H -u root -- /usr/sbin/synaptic --hide-main-window --non-interactive --parent-window-id 127926276 --progress-str Please wait, this can take some time. --finish-str Update is complete --set-selections-file /home/brian/tmp/tmpu06MAC

Which of course does the installation I wanted. I will kill off the
blocked sudo/gksu processes when this synaptic is done.

> Of course, fixing gksu is the ultimate solution but a workaround in the
> meanwhile would be appreciated.

This part, of course, is still relevant.

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Skipping updates should only be done if you need to separate the download or in some rare cases.

There has been a problem with gksu lately. Please update your system using the commands "sudo apt-get update" and "sudo apt-get -u dist-upgrade".

Cheers,

Sebastian

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 91151] Re: gksu doesn't always pop up a dialog

On Sun, 2007-03-11 at 22:27 +0000, Sebastian Heinlein wrote:
> Skipping updates should only be done if you need to separate the
> download or in some rare cases.

The current case is that my machine is a regular old 32-bit Athlon. I
don't see the need to update the 200-some-odd packages that were updated
because: "Rebuild for changes in the amd64 toolchain."

Presumably those changes are not going to affect the i{3,4,5,6}86
packages, yes? Why bother to download and update 200 packages when the
result is a no-op (in fact, I would argue that i{3,4,5,6}86 packages
should not have even been rebuilt -- but that is probably a somewhat
complicated problem with generic build systems)? I will install any of
those packages when something meaningful is done to them.

That said, I agree, and generally do install all updates.

> There has been a problem with gksu lately. Please update your system
> using the commands "sudo apt-get update" and "sudo apt-get -u dist-
> upgrade".

Why dist-upgrade? I don't see anything in the update list in
update-manager reflecting gksu. In fact at the moment the only in I
have outstanding in update-manager are those almost-200 packages that
were rebuilt due to the amd64 toolchain changes.

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

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

Thanks for your bugreport.

If it hangs again for you, can you please run:
$ sudo strace -p `pidof gksu`

and attach the output to this bugreport (or a shorter version of the output as it maybe rather long).

Thanks,
 Michael

Changed in gksu:
status: Unconfirmed → Needs Info
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
Download full text (11.3 KiB)

On Mon, 2007-03-12 at 15:37 +0000, Michael Vogt wrote:
>
> If it hangs again for you, can you please run:
> $ sudo strace -p `pidof gksu`

waitpid(14979, 0xbf7fb7bc, WNOHANG) = 0
stat64("/proc/14979", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/14979/stat", O_RDONLY) = 24
read(24, "14979 (sudo) S 14956 14979 14979"..., 8191) = 207
close(24) = 0
nanosleep({0, 1000000}, NULL) = 0
read(23, 0xb7402000, 1024) = -1 EAGAIN (Resource temporarily unavailable)
waitpid(14979, 0xbf7fb7bc, WNOHANG) = 0
stat64("/proc/14979", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/14979/stat", O_RDONLY) = 24
read(24, "14979 (sudo) S 14956 14979 14979"..., 8191) = 207
close(24) = 0
nanosleep({0, 1000000}, NULL) = 0
read(23, 0xb7402000, 1024) = -1 EAGAIN (Resource temporarily unavailable)
waitpid(14979, 0xbf7fb7bc, WNOHANG) = 0
stat64("/proc/14979", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/14979/stat", O_RDONLY) = 24
read(24, "14979 (sudo) S 14956 14979 14979"..., 8191) = 207
close(24) = 0
nanosleep({0, 1000000}, <unfinished ...>
...

Some additional information:

11348 ? Sl 0:50 /usr/bin/python2.5 /usr/bin/update-manager
14956 ? S 0:02 \_ gksu --desktop /usr/share/applications/update-man
14979 ? Ss 0:00 \_ /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u roo

$ lsof -p 14956
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gksu 14956 brian cwd DIR 254,0 32768 180225 /home/brian
gksu 14956 brian rtd DIR 254,8 1024 2 /
gksu 14956 brian txt REG 254,2 23080 508120 /usr/bin/gksu
gksu 14956 brian mem REG 0,0 0 [heap] (stat: No such file or directory)
gksu 14956 brian mem REG 254,2 72492 311709 /usr/lib/gtk-2.0/2.10.0/engines/libubuntulooks.so
gksu 14956 brian mem REG 254,2 86888 278715 /usr/lib/libbonobo-activation.so.4.0.0
gksu 14956 brian mem REG 254,2 372328 278685 /usr/lib/libbonobo-2.so.0.0.0
gksu 14956 brian mem REG 254,2 328180 280385 /usr/lib/libspi.so.0.10.11
gksu 14956 brian mem REG 254,2 7732 480125 /usr/share/locale-langpack/en_CA/LC_MESSAGES/atk10.mo
gksu 14956 brian mem REG 254,2 5384 282129 /usr/lib/gconv/ISO8859-1.so
gksu 14956 brian mem REG 254,2 81120 280493 /usr/lib/libart_lgpl_2.so.2.3.17
gksu 14956 brian mem REG 254,2 172244 281558 /usr/lib/libgnomecanvas-2.so.0.1400.0
gksu 14956 brian mem REG 254,2 26728 280047 /usr/lib/libgailutil.so.18.0.1
gksu 14956 brian mem REG 254,2 319556 312128 /usr/lib/gtk-2.0/modules/libgail.so
gksu 14956 brian mem REG 254,2 109708 480122 /usr/share/locale-langpack/en_CA/LC_MESSAGES/gtk20-properties.mo
gksu 14956 brian mem REG 254,8 38416 34953 /lib/tls/i686/cmov/libnss_files-2.5.so
gksu 14956 brian mem REG 254,8 34352 34955 /lib/tls/i686/cmov/libnss_nis-2.5.so
gksu 14956 brian mem REG 254,8 79596 ...

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

Again, this has happened. The strace of gksu is the same as I previously posted as well, this time update-manager was run in a terminal and prior to this problem it reported:

...
/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py:561: Warning: gsignal.c:1741: instance `0x9b34c50' has no handler with id `287'
  button.disconnect(id);
/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py:561: Warning: gsignal.c:1741: instance `0x8733b40' has no handler with id `286'
  button.disconnect(id);
/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py:561: Warning: gsignal.c:1741: instance `0x8733ad0' has no handler with id `285'
  button.disconnect(id);
/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py:561: Warning: gsignal.c:1741: instance `0x8733a60' has no handler with id `283'
  button.disconnect(id);
GNOME_SUDO_PASS

and that's where gksu and sudo are sitting, but no dialog to enter the password.

Michael Vogt (mvo)
Changed in gksu:
importance: Undecided → High
status: Needs Info → Confirmed
Revision history for this message
brainstorm (brainstorm) wrote :

Same problem here trying to change system time using gnome panel (right click on clock -> Adjust date & time):

17144 ? S 0:00 gksu time-admin
17145 ? Ss 0:00 /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- time-admin

waitpid(17145, 0xbffb694c, WNOHANG) = 0
stat64("/proc/17145", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/17145/stat", O_RDONLY) = 16
read(16, "17145 (sudo) S 17144 17145 17145"..., 8191) = 204
close(16) = 0
nanosleep({0, 1000000}, <unfinished ...>
(...)

In my case, a dialog *never* shows up, not sometimes.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

This still happens on up-to-date gutsy.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

And this *still* happens on up-to-date gutsy.

I'm wondering how a bug with High importance can be ignored for so long. What is the point of an importance setting if it's simply ignored?

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

If you enforce answers to bug reports the time will be missing to actually fix the bug.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Mon, 2007-07-30 at 18:13 +0000, Sebastian Heinlein wrote:
> If you enforce answers to bug reports the time will be missing to
> actually fix the bug.

Well, that is true, if I felt any confidence in that the bug was
actually being worked but it has been 3 and a half months since the last
comment was made on that bug by anyone appearing to be trying to work it
despite 2 followups by me with additional information and another two
followups by me just looking for status and a followup by another person
experiencing the same problem.

Could you honestly tell me that you would feel confident that a bug of
High Importance is being worked on with that kind of track record?
--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Justin Dugger (jldugger) wrote :

I can't seem to replicate this bug. One very good way to get developers to look at your bug is a reproducible set of steps to invoke the bug. I should note that I don't have a 64bit install, so it might be a 64bit related problem.

Also, I'd be very careful in asking people to attach a strace of authentication tools -- it's pretty easy to pick out passwords such things!

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Fri, 2007-09-07 at 02:57 +0000, Justin Dugger wrote:
> I can't seem to replicate this bug.

Yes, it only happens every once in a while. Not in a while lately
though.

> One very good way to get developers
> to look at your bug is a reproducible set of steps to invoke the bug.

Indeed. I provide that when there are some. In this case there are
not. I believe I did provide information from a running process though
as you requested. Since the process is still running when this happens
perhaps you can a) think of some information to gather when it happens
and add it to this bug and/or b) instrument gksu with some hooks/tests
that can be invoked when it does happen.

> I
> should note that I don't have a 64bit install, so it might be a 64bit
> related problem.

Nope. Only 32-bit here.

> Also, I'd be very careful in asking people to attach a strace of
> authentication tools -- it's pretty easy to pick out passwords such
> things!

Indeed. Apport is in fact very good at making people's passwords pretty
public. I've griped about that before though.

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Justin Dugger (jldugger) wrote :

Try running "sudo -K; gksudo -d echo Test" from a terminal. That might give us a clue as to why it
nanosleep({0, 1000000}, <unfinished ...> was called.

If it hangs, try the same strace approach again, please.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

I cannot seem to make it hang any more. I have not even seen it hang with update-manager in quite a while either. Maybe this bug has magically vanished. :-)

Revision history for this message
Ryan Lines (hardran3) wrote :

This happens to my up to date Gutsy install sometimes. It happens with App Install, Synaptic and Update app, Wiil put up some more info when it happens again.

Revision history for this message
Ryan Lines (hardran3) wrote :

Output from sudo strace -p `pidof gksu`

nanosleep({0, 100000000}, NULL) = 0
waitpid(6187, 0xbf9bd08c, WNOHANG) = 0
stat64("/proc/6187", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/6187/stat", O_RDONLY) = 23
read(23, "6187 (sudo) S 6185 6187 6187 0 -"..., 8191) = 200
close(23) = 0

This happens I would say roughly 1 of every three times I try to install or update.

Revision history for this message
Tobias McNulty (tmcnulty1982) wrote :

This happened to me because I had enabled an alternative authentication mechanism in PAM (fingerprint reader). As soon as I disabled that, gksu started working again. The lines in /etc/pam.d/common-auth look(ed) like this:

auth sufficient pam_bioapi.so {<snip>} /etc/bioapi/pam/
password sufficient pam_bioapi.so {<snip>} /etc/bioapi/pam/

This works fine for GDM; as soon as I enter my username at the initial login screen, I get a prompt to swipe my finger. gksu never shows anything, however. It just hangs there indefinitely. strace output is (over and over):

nanosleep({0, 1000000}, NULL) = 0
read(15, 0xb7fa2000, 1024) = -1 EAGAIN (Resource temporarily unavailable)
waitpid(13318, 0xbfaca18c, WNOHANG) = 0
stat64("/proc/13318", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/13318/stat", O_RDONLY) = 16
read(16, "13318 (sudo) S 13317 13318 13318"..., 8191) = 189
close(16) = 0

Revision history for this message
alex (alexanderask2) wrote :

This is happening to me to and I am ruinning the latest version of ubuntu 8.04.

Revision history for this message
spinstartshere (spinstartshere) wrote :

Dunno if this will be of any help, but I am also experiencing this problem; have been since I started using Ubuntu 5.10. On typing 'sudo -K; gksudo -d echo Test' into a terminal, I get this:

sudo: unable to resolve host JDAF2
No ask_pass set, using default!
xauth: /tmp/libgksu-HrI0p8/.Xauthority
STARTUP_ID: gksudo/echo 'Test'/7747-0-JDAF2_TIME604613
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: echo
cmd[9]: Test
buffer: -sudo: unable to resolve host JDAF2-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: -UDO_PASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
brute force GNOME_SUDO_PASS ended...
No password prompt found; we'll assume we don't need a password.

It would be great if this problem could be fixed soon, because it now happens every single time I try to do something on my system. I cannot update it through the update manager, I cannot install new applications with Add/Remove, Synaptic doesn't even appear unless I use gksudo...

Revision history for this message
Robert Xu (bravoall1552) wrote :

same here... Look at the bug report I did on the same thing if you want to know what i did... and still after I did this, I don't know what's happening... Maybe downgrade to 2.0.0-5ubuntu2?

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

I think I was able to reproduce this bug now and may have a fix. Could you please install "libgksu2-0" from

deb http://ppa.launchpad.net/mvo/ubuntu hardy main

and tell me if it fixes the issue?

(The debs are also available on https://edge.launchpad.net/~mvo/+archive e.g.:
http://launchpadlibrarian.net/14986896/libgksu2-0_2.0.5-1ubuntu5.1_i386.deb
)

thanks,
 Michael

Revision history for this message
Ted Cook (teodoro-cook) wrote :
Download full text (3.5 KiB)

I was also able to reproduce the problem. The package provided by Michael seems to correct the situation.

ERROR:
carlosgo@zeus:~$ gksu --debug synaptic
No ask_pass set, using default!
xauth: /tmp/libgksu-R1bYrA/.Xauthority
STARTUP_ID: gksu/synaptic/14331-0-zeus_TIME15257747
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: synaptic
buffer: -sudo: unable to resolve host zeus-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: -_PASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
brute force GNOME_SUDO_PASS ended...
No password prompt found; we'll assume we don't need a password.

... and Synaptic never appears on screen, the command does not return unless interrupted

FIX PROVIDED BY MICHAEL:
carlosgo@zeus:~/Desktop$ sudo dpkg -i libgksu2-0_2.0.5-1ubuntu5.1_i386.deb
sudo: unable to resolve host zeus
[sudo] password for carlosgo:
(Reading database ... 238294 files and directories currently installed.)
Preparing to replace libgksu2-0 2.0.5-1ubuntu5 (using libgksu2-0_2.0.5-1ubuntu5.1_i386.deb) ...
Unpacking replacement libgksu2-0 ...
Setting up libgksu2-0 (2.0.5-1ubuntu5.1) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

FIXED:
carlosgo@zeus:~/Desktop$ gksu --debug synaptic
No ask_pass set, using default!
xauth: /tmp/libgksu-AQABZk/.Xauthority
STARTUP_ID: gksu/synaptic/15001-0-zeus_TIME16402815
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: synaptic
buffer: -sudo: unable to resolve host zeus-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
brute force GNOME_SUDO_PASS ended...
No password prompt found; we'll assume we don't need a password.

... and Synaptic runs as intended

Other relevant info:
carlosgo@zeus:~/Desktop$ uname -a
Linux zeus 2.6.24-17-generic #1 SMP Thu May 1 14:31:33 UTC 2008 i686 GNU/Linux
carlosgo@zeus:~/Desktop$ dpkg -l libgksu2-0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/...

Read more...

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

Thanks Ted for the verification.

I set this to "Fix Commited" because the updated libgksu2-0 is now part of hardy-proposed and should soon make it to hardy-updates (default is 7 days until it can enter hardy-updates).

Changed in gksu:
assignee: nobody → mvo
status: Confirmed → Fix Committed
assignee: nobody → mvo
importance: Undecided → High
status: New → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Robert Xu (bravoall1552) wrote :

this is fix commited? I tried, and installed the update, and gksu only pops up for SYNAPTIC PACKAGE MANAGER now. WHAT IS GOING ON? I have an operating system to fix for my friend? and me!

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

rmadison tells me that this is part of hardy-updates now:

libgksu2-0 | 2.0.5-1ubuntu5.2 | hardy-updates | amd64, i386

Changed in gksu (Ubuntu Hardy):
status: Fix Committed → Fix Released
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.