Queries to remote scopes time out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Unassigned | ||
net-cpp (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned | ||
unity-scopes-api (Ubuntu) |
Fix Released
|
Critical
|
Marcus Tomlinson | ||
unity-scopes-api (Ubuntu RTM) |
Fix Released
|
Undecided
|
Marcus Tomlinson |
Bug Description
I'm seeing this on Mako, image #63, devel-proposed.
Periodically, the music scope fails to return any results, leaving a blank screen.
Looking through the log files, I'm seeing tons of messages such as this:
[2015-01-13 01:33:27.056262] INFO: SSRegistry: SmartScopesClie
[2015-01-13 01:33:27.057239] ERROR: SSRegistry: SmartScopesClie
[2015-01-13 01:33:46.996259] ERROR: SSRegistry: SmartScopesClie
The request times out even though the remote end works fine. (Easy to confirm by pasting the same URL into the browser.)
As an aside, the error about /custom/partner-id isn't an error: if the file doesn't exist (errno = 2), we should say nothing. That'll get rid of a lot of noise.
In addition, when I run a query, I see all queries to remote scopes fail (see attached trace).
I'm not familiar with the code. Looking through, I noticed this:
HttpResponseHan
}, headers);
Following this through, it appears that response_str is being appended to from a different thread without any lock. That looks like it's wrong to me. But that doesn't explain the timeout exception that is thrown from response->get().
I suspect a race condition somewhere because, occasionally, I get a query that works.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Michi Henning: Pending requested
-
Diff: 1370 lines (+357/-698)19 files modifiedCMakeLists.txt (+27/-47)
debian/control (+1/-1)
include/unity/scopes/OnlineAccountClient.h (+1/-1)
include/unity/scopes/internal/smartscopes/HttpClientInterface.h (+1/-1)
include/unity/scopes/internal/smartscopes/HttpClientNetCpp.h (+78/-0)
include/unity/scopes/internal/smartscopes/HttpClientQt.h (+0/-91)
include/unity/scopes/internal/smartscopes/HttpClientQtThread.h (+0/-100)
src/scopes/internal/JsonCppNode.cpp (+4/-4)
src/scopes/internal/RegistryObject.cpp (+1/-1)
src/scopes/internal/smartscopes/CMakeLists.txt (+2/-31)
src/scopes/internal/smartscopes/HttpClientNetCpp.cpp (+189/-0)
src/scopes/internal/smartscopes/HttpClientQt.cpp (+0/-151)
src/scopes/internal/smartscopes/HttpClientQtThread.cpp (+0/-186)
src/scopes/internal/smartscopes/SSRegistryObject.cpp (+2/-2)
src/scopes/internal/smartscopes/SmartScopesClient.cpp (+41/-30)
test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp (+3/-3)
test/gtest/scopes/internal/smartscopes/SmartScopesClient/FakeSss.py (+4/-1)
test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp (+3/-2)
valgrind-suppress (+0/-46)
- Thomas Voß: Pending requested
-
Diff: 16 lines (+5/-1)1 file modifiedsrc/core/net/http/impl/curl/request.h (+5/-1)
- Michi Henning (community): Approve
-
Diff: 1357 lines (+356/-694)19 files modifiedCMakeLists.txt (+28/-45)
debian/control (+1/-1)
include/unity/scopes/OnlineAccountClient.h (+1/-1)
include/unity/scopes/internal/smartscopes/HttpClientInterface.h (+1/-1)
include/unity/scopes/internal/smartscopes/HttpClientNetCpp.h (+78/-0)
include/unity/scopes/internal/smartscopes/HttpClientQt.h (+0/-94)
include/unity/scopes/internal/smartscopes/HttpClientQtThread.h (+0/-103)
src/scopes/internal/JsonCppNode.cpp (+4/-4)
src/scopes/internal/RegistryObject.cpp (+1/-1)
src/scopes/internal/smartscopes/CMakeLists.txt (+2/-31)
src/scopes/internal/smartscopes/HttpClientNetCpp.cpp (+189/-0)
src/scopes/internal/smartscopes/HttpClientQt.cpp (+0/-147)
src/scopes/internal/smartscopes/HttpClientQtThread.cpp (+0/-180)
src/scopes/internal/smartscopes/SSRegistryObject.cpp (+2/-2)
src/scopes/internal/smartscopes/SmartScopesClient.cpp (+39/-31)
test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp (+3/-3)
test/gtest/scopes/internal/smartscopes/SmartScopesClient/FakeSss.py (+4/-1)
test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp (+3/-3)
valgrind-suppress (+0/-46)
Changed in unity-scopes-api (Ubuntu): | |
assignee: | nobody → Marcus Tomlinson (marcustomlinson) |
status: | New → In Progress |
Changed in unity-scopes-api (Ubuntu RTM): | |
status: | New → In Progress |
assignee: | nobody → Marcus Tomlinson (marcustomlinson) |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Released |
I just got the bug with image 161 from ubuntu- touch/ubuntu- rtm/14. 09-proposed, so it's definitely not limited to devel only.