account-polld tries hard to open a trust session and fails repeatedly
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
Bill Filler | ||
| | account-polld (Ubuntu) |
High
|
Niklas Wenzel | ||
Bug Description
Affects <= OTA7
Reproduce:
1. Add a google account and allow gmail
2. Make sure it works, (account n has 0 new updates etc…)
3. Change the account's password
Expected:
By looking at the logs, I'd expect the output to say something along the lines of "authentication failed, stopping poll"
Actual:
You'll see an endless repetition of:
2015/10/13 13:39:13 Polling account 7
2015/10/13 13:39:14 Error while polling 7: Token expired
2015/10/13 13:39:14 Poll for account 7 has failed: Token expired
2015/10/13 13:39:14 Ending poll for account 7
2015/10/13 13:39:14 New account data for existing account with id 7
2015/10/13 13:39:14 Starting poll for account 7
2015/10/13 13:39:14 Polling account 7
Memory on device is at a minimum too. As can be seen here http://
Logs: I have included the entire .cache/upstart folder and syslog.
Related branches
- Jonas G. Drange (community): Approve on 2015-10-16
- PS Jenkins bot: Pending (continuous-integration) requested 2015-09-28
- Alberto Mardegan: Pending requested 2015-09-24
-
Diff: 147 lines (+48/-35)2 files modifiedcmd/account-polld/account_manager.go (+47/-24)
cmd/account-polld/main.go (+1/-11)
- Jonas G. Drange (community): Approve on 2015-10-12
- Alberto Mardegan (community): Approve on 2015-09-25
- PS Jenkins bot: Pending (continuous-integration) requested 2015-09-28
-
Diff: 22 lines (+9/-1)1 file modifiedaccounts/account-watcher.c (+9/-1)
- Niklas Wenzel (community): Needs Fixing on 2015-10-15
- PS Jenkins bot: Approve (continuous-integration) on 2015-10-13
- John Lenton: Approve on 2015-10-13
-
Diff: 40 lines (+11/-0)1 file modifiedcmd/account-polld/account_manager.go (+11/-0)
| Dave Morley (davmor2) wrote : | #1 |
| Jean-Baptiste Lallement (jibel) wrote : | #2 |
| Jean-Baptiste Lallement (jibel) wrote : | #3 |
From unity8.log online-
qtmir.mir: SessionListener
qtmir.sessions: SessionManager:
qtmir.sessions: Session::Session() "online-
qtmir.mir: SessionListener
qtmir.sessions: SessionManager:
qtmir.sessions: Session::release "online-
qtmir.sessions: Session::~Session() "online-
| affects: | dbus (Ubuntu) → ubuntu-system-settings-online-accounts (Ubuntu) |
| Alberto Mardegan (mardy) wrote : | #4 |
There is a process continuosly invoking online accounts, presumably with wrong parameters. Unfortunately I cannot tell which process it is from the logs.
Dave, can you still reproduce it? Next time it happens, please run:
OAU_
and attach the output here.
Looking at top, I suspect that sync-monitor could be the client continuously invoking Online Accounts. I'm adding sync-monitor to the bug, just to have some people confirm whether it's possible that a failed invocation to online accounts results in a loop.
| Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
| status: | New → Triaged |
| kevin gunn (kgunn72) wrote : | #5 |
what's interesting is going back to the previous unity8.log (unity8.log7) in the zip. at the end of it is the beginning of that spew pattern listed in the previous comment.
| Dave Morley (davmor2) wrote : | #6 |
davmor2@stryder:~$ adb shell
ounts-serviceu-
signonui-
utils.cpp 49 apparmorProfile
request-manager.cpp 113 runQueue Head: OnlineAccountsU
Invalid prompt session: /build/
Dynamic exception type: N5boost16except
std::exception:
Couldn't setup prompt session
UiProxy initialization failed!
signonui-
| Alberto Mardegan (mardy) wrote : | #7 |
Thanks Dave for this info. Also, I checked with Dave on IRC that PID 2522 (from which the request starts) is account-polld:
phablet 2522 0.0 1.4 934112 14176 ? Ssl Sep09 9:38 /usr/bin/
online-
I think there are two problems here:
1) when talking to signond, account-polld should set the "UiPolicy" parameter to 2 (aka NoUserInteracti
2) account-polld should not continuosly retry authenticating if the previous attempt just failed.
| no longer affects: | sync-monitor (Ubuntu) |
| no longer affects: | ubuntu-system-settings-online-accounts (Ubuntu) |
| summary: |
- Dbus-daemon-system-fork on ota6 is using large amounts of CPU + account-polld tries hard open a trust session and fails repeatedly |
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| Changed in account-polld (Ubuntu): | |
| importance: | Undecided → High |
| status: | New → Triaged |
| summary: |
- account-polld tries hard open a trust session and fails repeatedly + account-polld tries hard to open a trust session and fails repeatedly |
| Changed in canonical-devices-system-image: | |
| status: | New → Confirmed |
| assignee: | nobody → Bill Filler (bfiller) |
| Changed in canonical-devices-system-image: | |
| milestone: | none → ww46-2015 |
| tags: | added: push |
| Niklas Wenzel (nikwen) wrote : | #8 |
One can also find the following line in the account-polld log:
2015/09/17 09:29:13 Account 2 failed to authenticate: GDBus.Error:
> 2) account-polld should not continuosly retry authenticating if
> the previous attempt just failed.
Agreed, but I still think that it should try at least a few times, otherwise we get LP: #1405649 again. To me it happens very often that after rebooting the first authentication cycle fails because the phone has not established a network connection yet.
| Niklas Wenzel (nikwen) wrote : | #9 |
I tried to fix #2 in https:/
| Niklas Wenzel (nikwen) wrote : | #10 |
Had a typo in the branch name. Here is the updated one. ;)
https:/
| Niklas Wenzel (nikwen) wrote : | #11 |
I also tried to fix #1 but I couldn't find out how to get libsignon-glib to pass that parameter. Alberto, do you have any ideas here?
| Alberto Mardegan (mardy) wrote : | #12 |
Thanks Niklas for looking into this!
In accounts/
You can see a similar example here:
https:/
The only difference is that instead of SIGNON_
| Niklas Wenzel (nikwen) wrote : | #13 |
Alberto, thank you for the example!
I had already suspected that we needed to pass a GVariant to ag_auth_
I implemented this in https:/
| Changed in account-polld (Ubuntu): | |
| assignee: | nobody → Niklas Wenzel (nikwen) |
| status: | Triaged → In Progress |
| Niklas Wenzel (nikwen) wrote : | #14 |
Both MPs should be ready for review now. :)
| description: | updated |
| Changed in account-polld (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → Fix Committed |
| Jean-Baptiste Lallement (jibel) wrote : | #15 |
account-polld (0.1+15.
.
[ Alberto Mardegan ]
* Remove non-working facebook integration. (LP: #1493733)
* debian/control, debian/
Remove mentions of Facebook from the descriptions.
.
[ Niklas Wenzel ]
* Tell libsignon-glib not to open a trust session by passing
SIGNON_
SIGNON_
in LP: #1496773) (LP: #1496773)
* When authentification of an account fails continuously, we should
wait a bit before trying again (part of the issue experienced in LP:
#1496773) (LP: #1496773)
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Fix Released |

This message is printed in a loop in dbus.log
Activating service name='com. google. code.AccountsSS O.SingleSignOn' code.AccountsSS O.SingleSignOn' nokia.singlesig nonui' singlesignonui' mir-xon0uu/ mir-0.14. 1+15.04. 20150821/ src/server/ scene/prompt_ session_ manager_ impl.cpp( 137): Throw in function virtual std::shared_ ptr<mir: :scene: :PromptSession> mir::scene: :PromptSessionM anagerImpl: :start_ prompt_ session_ for(const std::shared_ ptr<mir: :scene: :Session> &, const mir::scene: :PromptSessionC reationParamete rs&) const ion_detail10clo ne_implINS0_ 19error_ info_injectorIS t13runtime_ errorEEEE :what: Could not identify application session
Successfully activated service 'com.google.
Activating service name='com.
Successfully activated service 'com.nokia.
Invalid prompt session: /build/
Dynamic exception type: N5boost16except
std::exception:
Couldn't setup prompt session
UiProxy initialization failed!