authentication popup does nothing when installating new software

Bug #649939 reported by Jean-Baptiste Lallement on 2010-09-28
284
This bug affects 60 people
Affects Status Importance Assigned to Milestone
policykit-1 (Ubuntu)
High
Unassigned
Maverick
High
Unassigned

Bug Description

Binary package hint: software-center

maverick desktop amd64 - Fresh wubi installation from ISO (md5sum 0a3536058f65fdcb753cb1ca53a70d55)

1. Launch software-center (Applications ->Software-Center)
2. On the right pane Stellarium was displayed as a featured app, I clicked on it
3. The detail view is displayed, I clicked on 'Install'
4. The authentication popup is displayed
5. I entered my password (without error) and "Enter"
6. Then nothing happens. The buttons "Cancel" and "Authenticate" are enabled but does nothing.
7. If I close the popup by clicking on the close icon then the installation starts.

The following errors/warning are displayed on the terminal (or .xsession-errors)
INFO:softwarecenter.app:software-center-agent finished with status 1
WARNING:softwarecenter.fixme:logs to the root logger: '('/usr/lib/pymodules/python2.6/dbus/proxies.py', 400, '_introspect_error_handler')'
ERROR:dbus.proxies:Introspect error on :1.58:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.63" (uid=1000 pid=2513 comm="/usr/bin/python) interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply=0 destination=":1.58" (uid=0 pid=2376 comm="/usr/bin/python))
WARNING:softwarecenter.backend:_on_trans_error: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

This is reproducible, maybe once every 3 tries. To reproduce, click on the "key icon" in the notification area and select "forget privileges" (or whatever it is labelled in english) and start from step 1

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: software-center 3.0.2
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Tue Sep 28 17:47:09 2010
EcryptfsInUse: Yes
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: software-center

Related branches

Jean-Baptiste Lallement (jibel) wrote :
Michael Vogt (mvo) on 2010-09-28
Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → High
milestone: none → ubuntu-10.10
tags: added: iso-testing
James Westby (james-w) wrote :

I just pushed a policykit-1 package to

 https://edge.launchpad.net/~james-w/+archive/polkit/+packages

if people experiencing the problem can install those and test that would be great.

After installing it you need to kill polkit-gnome-authentication-agent-1

If you can still reproduce then please kill polkit-gnome-authentication-agent-1 again, and strace it as you
reproduce. In order to strace it properly you will temporarily make strace setuid.

Thanks,

James

Jean-Baptiste Lallement (jibel) wrote :

Same problem with the version from your ppa (I killed polkit-gnome-authentication-agent-1
). strace log attached.

Jean-Baptiste Lallement (jibel) wrote :

Same problem after a fresh installation of Wubi maverick-desktop-i386 without network.

I installed wubi i386 desktop without network after reboot and a network connection enabled, it asked me to install my language, I answered "run this action now", the authentication popup is displayed and then nothing
If I wait a few minutes, a dialog appears saying "org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)"

Everything calling org.debian.apt.install-or-remove-packages is affected (note that this is on i386 and previous error was on amd64)

James Westby (james-w) wrote :
Download full text (3.9 KiB)

Ok, that strace was useful, thanks.

Here's a trimmed annotated version in the interesting section:

5362 is the helper process that talks to PAM, and 5307 is the supervisor process.

I think this is the end of the pam interaction that authorizes the users (either this or
something earlier, but you can definitely see it happen):

5362 open("/etc/shadow", O_RDONLY|O_CLOEXEC) = 3
5362 lseek(3, 0, SEEK_CUR) = 0
5362 fstat(3, {st_mode=S_IFREG|0640, st_size=948, ...}) = 0
5362 mmap(NULL, 948, PROT_READ, MAP_SHARED, 3, 0) = 0x7fb26452e000
5362 lseek(3, 948, SEEK_SET) = 948
5362 munmap(0x7fb26452e000, 948) = 0
5362 close(3) = 0

After it has done that the code is:

  /* now send a D-Bus message to the PolicyKit daemon that
   * includes a) the cookie; and b) the user we authenticated
   */
  if (!send_dbus_message (cookie, user_to_auth))
    {
#ifdef PAH_DEBUG
      fprintf (stderr, "polkit-agent-helper-1: error sending D-Bus message to PolicyKit daemon\n");
#endif /* PAH_DEBUG */
      goto error;
    }

Which we can see as:

5362 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
5362 connect(3, {sa_family=AF_FILE, path="/var/run/dbus/system_bus_socket"}, 33 <unfinished ...>
5362 <... connect resumed> ) = 0
...
5362 sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1c\0\0\0\2\0\0\0o\0\0\0\1\1o\0\1\0\0\0/\0\0\0\0\0\0\0"..., 128}, {"^\0\0\0type='signal',sender='org.fr"..., 99}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>

It then moves on to:

  fprintf (stdout, "SUCCESS\n");
  fflush (stdout);
  fflush (stderr);
  usleep (10 * 1000); /* since fflush(3) seems buggy */
  return 0;

Which we can see as:

5362 write(1, "SUCCESS\n", 8) = 8
5362 nanosleep({0, 10000000}, <unfinished ...>
5362 <... nanosleep resumed> NULL) = 0
5362 exit_group(0) = ?

So the PAM process works fine, and the helper tells the supervisor that it worked.

The exit triggers the SIGCHLD handler that is the g_child_watch added by the supervisor
on it:

5307 --- SIGCHLD (Child exited) @ 0 (0) ---
5307 write(10, "B", 1) = 1
5307 rt_sigreturn(0x2) = 0
5307 read(9, "B", 20) = 1
5307 read(9, <unfinished ...>

And that's the last we ever hear from the supervisor in that strace.

Therefore I think we have to look at the communication between the helper and the supevisor
as the origin of the problem.

I'm a bit confused by the glib code in this area, as the "B" is written to wake everything up,
but the wakeup thread attempts to read 20 characters from the pipe before it will do
anything, and I don't see why that makes sense. The write side of the pipe is set non-blocking,
but the read isn't.

Just looking at the policykit code for a second, we see the following:

  * It adds a watch on the child pid, and it's stdout
  * If the child exits, it removes the watch on stdout, and does not a lot else.
  * If there is data on the stdout, it will complete the session, m...

Read more...

Jean-Baptiste Lallement (jibel) wrote :

The situation is worse with the fix (0.9662ubuntu1.1) The authentication is systematically refused, at third try, the authentication dialog is closed, and the installation starts.

Jean-Baptiste Lallement (jibel) wrote :

I confirm that the latest version of policykit in James's PPAS fixes the issue and I'm unable to reproduce the original behaviour.
Many thanks James.

Changed in software-center (Ubuntu Maverick):
status: New → Triaged
importance: Undecided → High
Jean-Baptiste Lallement (jibel) wrote :

James can you SRU your fix to Maverick ?

I think it's worth SRUing it to lucid too.

ValiSystem (vali-system) wrote :

I don't know if it's another bug or not, but i've got an error with the same symptoms as described here, but an error dialogs shows afterward that `polkit-gnome-authentication-agent-1` crashed. That would explained that the authentication success is not forwarded to the update manager, while authentication was successful and update works perfectly when closing the authenticate window.

The bug might be related to policykit-1-gnome.

Changed in software-center (Ubuntu Maverick):
milestone: none → maverick-updates
Changed in software-center (Ubuntu):
milestone: ubuntu-10.10 → none

Fixed in policykit-1 (0.96-2ubuntu2)
debian/patches/03_complete_session.patch
Fix the race that leads to the password box disappearing, but the dialog remaining. (LP: #649939, #445303)

affects: software-center (Ubuntu) → policykit-1 (Ubuntu)
Changed in policykit-1 (Ubuntu):
status: Confirmed → Fix Released
Sebastian Klus (klus-spam) wrote :

Well, maybe the fix was committed, but at least it has not reached my Maverick 10.10 64bit yet.
If I try to update the policykit-1 through apt, I am informed that the newest version is alread installed, but the installed version is policykit-1 (0.96-2ubuntu1). So I am still struggeling with the same problem.

Cas (calumlind) wrote :

I was actually going to post the same comment about it not being fixed in Maverick.

I have however found a PPA that has an updated policykit for Maverick (policykit-1 0.96-2ubuntu1.2) from reading the comments on #445303. I am have only just installed it but seems to fix the issue.

https://launchpad.net/~james-w/+archive/polkit

John Winterton (jwinterton) wrote :

I am no longer having this problem, although I did on some of the betas. I am on:
Linux john-GA-M-A78LM-S2H 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.10

I find this bug is no longer relevant to me.

Sebastian Klus (klus-spam) wrote :

Hey Cas,

Excellent hint - this updated version of policykit solved my problem. Thanks for that.

Contrary to John, this bug was relevant for me after updating from 10.04 to 10.10.

ValiSystem (vali-system) wrote :

Thanks Cas for poiting out the ppa with polkit update (#14), works perfectly here.

ValiSystem (vali-system) wrote :

Hum, i retract my comment, the bug is less systematic, but still occurs.

Paulus (donmatteo) wrote :

In a fresh WUBI-based maverick install, all updates installed, this problem still occurs. james-w's PPA package resolves this problem. Why not add this to maverick's updates?

madtom1999 (tompotts) wrote :

I am on the latest Ubuntu 64 bit and 32 bit Ubuntu with regular updates and this occurs on my 64 bit AMD and a 32 bit atom but not on a couple of 32 bit athlons

FernanAguero (fernan-ciudad) wrote :

Hey,

I've been having this issue ever since I upgraded to Maverick.

Not only in upgrade-manager, but also when using the nvidia X Server Settings, and trying to 'Save to X configuration file' (see attached screenshot).

I've read the whole bug report, and seems like there is a fix, but no more comments after Jan 31st ... ValiSystem said confirmed on Dec 2010 that the polkit update from PPA works ... I've just upgraded my policykit to 0.96-2ubuntu1.2 (and some other related dependencies), from said PPA and the problem persists (the authentication window won't go away when I click on 'Authenticate')

Let me know if I can help debug this (what additional files should I look into?)

--
fernan

ValiSystem (vali-system) wrote :

Sadly, i had to retract (#18) my comment. It changed from occurring systematically to erratically :(

Daniel Asarnow (dasarnow) wrote :

Is this or is this not the same as the policy kit bug, below? My Maverick desktop picked up this bug /today/.

https://bugs.launchpad.net/ubuntu/+source/policykit-1-gnome/+bug/445303

JC Hulce (soaringsky) wrote :

This bug affects Ubuntu 10.10, Maverick Meerkat. Maverick has reached end-of-life and is no longer supported, so I am closing the bugtask for Maverick. Please upgrade to a newer version of Ubuntu.
More information here: https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html

Changed in policykit-1 (Ubuntu Maverick):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions