My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3571: Internal server error when using 'author' search on android-review
1 person starred this issue and may be notified of changes. Back to list
Status:  Submitted
Owner:  sop@google.com
Closed:  Sep 18
Cc:  dborowitz@google.com


Sign in to add a comment
 
Project Member Reported by david.pu...@sonymobile.com, Sep 18, 2015
*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.11.3-1337-gecbaf10

What steps will reproduce the problem?
1. Use the author search, for example "author:sonymobile+status:open"
2.
3.

What is the expected output? What do you see instead?

It works OK on gerrit-review [1] but on android-review [2] it intermittently results in a 500 internal server error.

Please provide any additional information below.

[1] https://gerrit-review.googlesource.com/#/q/author:sonymobile+status:open
[2] https://android-review.googlesource.com/#/q/author:sonymobile+status:open
Sep 18, 2015
Project Member #1 david.pu...@sonymobile.com
Are there any hints in the server logs for android-review?

If this is a problem with my implementation of the author search I'll try to fix it next week (but will be out of the office Mon-Wed).

Cc: sop@google.com dborowitz@google.com
Sep 18, 2015
#2 sop@google.com
Yup, something is wrong. This is version 2.11.3-1337-gecbaf10:

java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:418)
	at java.util.ArrayList.get(ArrayList.java:431)
	at com.google.gerrit.server.change.ChangeJson.formatQueryResults(ChangeJson.java:298)
	at com.google.gerrit.server.query.change.QueryChanges.query0(QueryChanges.java:145)
	at com.google.gerrit.server.query.change.QueryChanges.query(QueryChanges.java:132)
	at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:99)
	at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:40)
	at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:322)

Sep 18, 2015
#3 sop@google.com
This may be related to starred changes failing to load from our database.

https://gerrit-review.googlesource.com/71030 IdentifiedUser: Gracefully ignore failed starred changes

may be a bandaid.
Sep 18, 2015
#4 sop@google.com
Our server couldn't query starred changes, leading to this kind of crash during JSON formatting:

  ChangeJson.toChangeInfo Omitting corrupt change 116499 from results
  java.lang.RuntimeException: cannot query starred changes
        ...
	at com.google.common.collect.AbstractIterator.tryToComputeNext
	at com.google.common.collect.AbstractIterator.hasNext
	at com.google.common.collect.TransformedIterator.hasNext
	at com.google.common.collect.TransformedIterator.hasNext
	at com.google.common.collect.ImmutableSet.copyOf
	at com.google.common.collect.ImmutableSet.copyOf
	at com.google.common.collect.FluentIterable.toSet
	at com.google.gerrit.server.IdentifiedUser.starredChangeIds(IdentifiedUser.java:391)
	at com.google.gerrit.server.IdentifiedUser.getStarredChanges(IdentifiedUser.java:335)
	at com.google.gerrit.server.change.ChangeJson.toChangeInfo(ChangeJson.java:401)
	at com.google.gerrit.server.change.ChangeJson.toChangeInfo(ChangeJson.java:317)
	at com.google.gerrit.server.change.ChangeJson.formatQueryResults(ChangeJson.java:296)
	at com.google.gerrit.server.query.change.QueryChanges.query0(QueryChanges.java:145)
	at com.google.gerrit.server.query.change.QueryChanges.query(QueryChanges.java:132)
	at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:99)
	at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:40)
	at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:322)

I think that happened to all matching changes in the query. Which later leads to ChangeJson being confused about its result list size, as all records disappeared.

https://gerrit-review.googlesource.com/71031 ChangeJson: Do not try to set _moreChanges on empty results 
Status: Accepted
Owner: sop@google.com
Cc: -sop@google.com
Sep 18, 2015
#5 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Sign in to add a comment

Powered by Google Project Hosting