Summary: | Infinite loop due to KWallet usage | ||
---|---|---|---|
Product: | [Plasma] plasma-nm | Reporter: | Peter Wu <peter> |
Component: | general | Assignee: | Lukáš Tinkl <lukas> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jgrulich |
Priority: | NOR | ||
Version: | 0.9.3.4 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-nm/634738b27ed14508d17e9a99ebd8760d8c9edb01 | Version Fixed In: | |
Sentry Crash Report: |
Description
Peter Wu
2014-09-20 10:02:50 UTC
The backtrace for the first call (break on SecretAgent::useWallet): #0 0x00007fef66c796c0 in SecretAgent::useWallet() const@plt () from kded_networkmanagement.so #1 0x00007fef66c812c8 in SecretAgent::processGetSecrets (this=0xbd5330, request=...) at plasma-nm-0.9.3.4/kded/secretagent.cpp:310 #2 0x00007fef66c83388 in SecretAgent::processNext (this=this@entry=0xbd5330) at plasma-nm-0.9.3.4/kded/secretagent.cpp:272 #3 0x00007fef66c83eb6 in SecretAgent::GetSecrets (this=0xbd5330, connection=..., connection_path=..., setting_name=..., hints=..., flags=1) at plasma-nm-0.9.3.4/kded/secretagent.cpp:86 #4 0x00007fef664d91a3 in SecretAgentAdaptor::GetSecrets(QMap<QString, QMap<QString, QVariant> > const&, QDBusObjectPath const&, QString const&, QStringList const&, unsigned int) () from /usr/lib/libNetworkManagerQt.so.1 #5 0x00007fef664d9302 in ?? () from /usr/lib/libNetworkManagerQt.so.1 #6 0x00007fef664d95e3 in SecretAgentAdaptor::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libNetworkManagerQt.so.1 That's really strange. When processGetSecrets() is called after KWallet is opened, then the pointer to m_wallet shouldn't be definitely NULL, unless it failed to open it. Hmm, as I see it will keep trying to open it again and again. We will have to probably add there a flag that indicates that it previously failed to open it and prevent from opening it again. Git commit 6d2593bc09cd39a33b3ac2cd33f9248790d01da3 by Jan Grulich. Committed on 22/09/2014 at 11:38. Pushed by grulich into branch 'master'. Do not keep trying to open KWallet if we failed before REVIEW:120313 M +16 -4 kded/secretagent.cpp M +1 -0 kded/secretagent.h http://commits.kde.org/plasma-nm/6d2593bc09cd39a33b3ac2cd33f9248790d01da3 Git commit 634738b27ed14508d17e9a99ebd8760d8c9edb01 by Jan Grulich. Committed on 22/09/2014 at 11:38. Pushed by grulich into branch '0.9.3'. Do not keep trying to open KWallet if we failed before REVIEW:120313 M +16 -4 kded/secretagent.cpp M +1 -0 kded/secretagent.h http://commits.kde.org/plasma-nm/634738b27ed14508d17e9a99ebd8760d8c9edb01 If the wallet failed to open, shouldn't a message be logged? It is also not clear why the wallet failed to open, the daemon is certainly running and openWallet succeeded. I think this is hiding a real bug? Does the "0" parameter to openWallet have something to do with this? Can you please try to compile plasma-nm from git (0.9.3 branch) and try it? If openWallet succeeds, then m_wallet shouldn't be NULL, in that case it could be a problem in KWallet maybe? Nope, the "0" parameter is for a window ID. I discovered why KWallet was inaccessible. Apparently I accidentally clicked "Deny Forever" when requested to the "KDE Daemon" requested KWallet access. This is now reverted and the old unpatched plasma-nm applet works again. The latest 0.9.3.4 tree (v0.9.3.4-15-g634738b) does not work for me. The SecretAgent::useWallet break point is never triggered and I can see the following message in my logs: <error> [1411488098.418893] [vpn-manager/nm-vpn-connection.c:1778] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request. (there is no other message near this) Where did you put the break point? Did you restart kded4 and plasma-desktop after you updated plasma-nm? I killed kded4 and started it after setting KDE_DIRS: KDEDIRS=/tmp/plasma-nm-prefix kded4 Then I attached a debugger to this: LD_LIBRARY_PATH=/tmp/plasma-nm-prefix/kde4/ gdb -ex break\ SecretAgent::useWallet -p `pgrep kded4` To trigger authentication, I clicked the Connect button in the applet. You also need to start plasma-desktop from your /tmp/plasma-nm-prefix, because there is a code initializing our secret agent. The infinite loop is gone, but it seems that the applet does not retry the wallet should it become available at a later point (the breakpoint is not triggered). Am I correct? The applet should request secrets from KWallet only in case you are trying to activate a connection or you are editing a connection from the connection editor. Git commit 800503fec7ec25e5ab21da4006655e30fe83c2ce by Jan Grulich. Committed on 24/09/2014 at 08:35. Pushed by grulich into branch '0.9.3'. Connect to the correct signal M +1 -1 kded/service.cpp http://commits.kde.org/plasma-nm/800503fec7ec25e5ab21da4006655e30fe83c2ce |