-
Bug
-
Resolution: Fixed
-
High
-
7.6.9, 7.13.8, 8.18.2, 8.19.0, 8.5.19, 8.13.15
-
7.06
-
49
-
Severity 2 - Major
-
1,509
-
Issue Summary
Certain functionalities in Jira, such as trying to mention users or otherwise typing usernames into user fields, allow Jira to return user suggestions as usernames are being typed out.
As the searching user types, Jira will use a thread to perform a search against what they've typed and return possible results back to the user. In instances with many users, directories, or nested groups, these searches may be computationally expensive and may run for several seconds in order to return results.
It is possible for the searching user to continue typing and end up making multiple user search requests before the previous requests ever complete and return. Jira will not cancel or otherwise terminate previously ongoing search threads in this case.
The instance may experience high CPU load and thread utilization if too many of these threads are working on these searches concurrently.
Steps to Reproduce
- Have many users, groups/nested groups, and directories.
- Attempt to search for a user (i.e. by mentioning or perhaps trying to assign an issue), by typing a character out at a pace of 2-3 characters/second.
Expected Results
Suggested users will be returned, and no other behaviors (high CPU/thread usage) are observed.
Actual Results
Suggested users may be returned, but CPU and thread usage run high. Excessive usage may cause the system to become unresponsive.
Thread Dumps show many threads like the following, which showcase a user mention being searched against nested groups in this particular example:
"http-nio-8080-exec-20 url:/rest/internal/2/user/mention/search username:" #49 daemon prio=5 os_prio=0 tid=0x00007f8210b43000 nid=0x5d85 runnable [0x00007f810e1e1000] java.lang.Thread.State: RUNNABLE ... at com.atlassian.crowd.search.EntityDescriptor.toString(EntityDescriptor.java:103) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at com.atlassian.crowd.search.query.membership.MembershipQuery.(MembershipQuery.java:60) at com.atlassian.crowd.search.query.membership.GroupMembershipQuery.(GroupMembershipQuery.java:19) at com.atlassian.crowd.search.builder.QueryBuilder.createMembershipQuery(QueryBuilder.java:177) at com.atlassian.crowd.search.builder.QueryBuilder$PartialMembershipQueryWithNameToMatch.returningAtMost(QueryBuilder.java:285) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.findNestedGroupMembershipsIncludingGroups(RemoteDirectorySearcher.java:278) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.findNestedGroupMembershipsOfUser(RemoteDirectorySearcher.java:300) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.getParentDirectoryEntities(RemoteDirectorySearcher.java:203) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.getRelatedDirectoryEntities(RemoteDirectorySearcher.java:191) at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.searchNestedGroupRelationships(RemoteDirectorySearcher.java:170) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.searchNestedGroupRelationships(DirectoryManagerGeneric.java:750) at com.atlassian.crowd.manager.application.SingleDirectorySearchStrategy.searchNestedGroupRelationships(SingleDirectorySearchStrategy.java:71)
Access Logs show individual HTTP requests being made for each character typed:
/rest/api/latest/user/assignable/search?username=j /rest/api/latest/user/assignable/search?username=ji /rest/api/latest/user/assignable/search?username=jir /rest/api/latest/user/assignable/search?username=jira /rest/api/latest/user/assignable/search?username=jiraa
Workaround
Reducing the complexity and dataset of users, groups, nested groups, and directories may help reduce the calculation cost and time of these searches.
Suggested Solution
Allow administrators to configure the frequency at which the browser may submit search requests.
- has a regression in
-
JRASERVER-72966 Searching for assignable user by email doesn't work
- Gathering Impact
- is related to
-
JRASERVER-74911 User/group cache not fully replicated on node start.
- Closed
-
JSWSERVER-20272 JQL autocomplete suggestions on Epic field may cause performance issues
- Closed
-
JRASERVER-67502 RequestCachingGroupManager may accumulate too many objects in RequestCache during processing large user sets
- Closed
-
JSDSERVER-6808 Slowly typing query into JSD Project Workload search causes service unavailability
- Closed
- relates to
-
JRASERVER-72101 Performance regression in user lookup
- Closed
-
JRASERVER-72581 User Picker Dropdown takes an excessive amount of time to load when there are thousands of users in Jira and up to 49 users in the Assignable User permission
- Closed
-
JSWSERVER-20844 Severe performance degradation for user mentions and user login action due to contention in IndexedUserDao
- Closed
-
JRASERVER-70934 Requests to `/jira/rest/internal/2/user/mention/search` where the parameters do NOT include a query are very slow
- Closed
-
JSWSERVER-21200 Permission filtering in mentions/assignees suggestions are based only on permission schemes
- Gathering Interest
-
UCACHE-16 Loading...
- Mentioned in
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...