New issue
Advanced search Search tips

Issue 912298 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

`git cl upload` hangs and fails after entering patch set comment

Project Member Reported by carl...@google.com, Dec 5

Issue description

When I execute `git cl upload` and finish entering the patch set comment, it hangs in place for a while apparently connecting to the server. But about once per week, instead of moving forward normally, I get a very long delay (in the order of minutes) and the following error message:

```
(...)
Title for patchset [Fixed test; minor changes]:

saving CL description to /usr/local/google/home/carlosk/.git_cl_description_backup

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Bad Gateway
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

saving CL description to /usr/local/google/home/carlosk/.git_cl_description_backup

Failed to create a change. Please examine output above for the reason of the failure.
Hint: run command below to diagnose common Git/Gerrit credential problems:
  git cl creds-check

```

Just retrying the command again generally works as expected.

Note that during this waiting time hitting CTRL+C does nothing, which is quite annoying by itself as it's clear after ~20 seconds that something is off and I'd prefer interrupting and retrying. 


 
Cc: ehmaldonado@chromium.org tandrii@chromium.org
Edward & Andrii - Based on this output any thoughts on what's going wrong here / what request in git cl upload is failing?
This 
  > and finish entering the patch set comment
implies that it's not the first patchset. Thus, presumably, there is already a change number associated with the branch. In this case, git cl checks the chagne status. Maybe that's what hangs.

Btw, we've increased # of retries and the duration of sleep in-between by a lot recently. Maybe it's time to bring it back to something saner.
According to the metrics, the query that's hanging is 

https://cs.chromium.org/chromium/tools/depot_tools/git_cl.py?l=1981
Yay, thanks for corroborating my memory of the code with real data!
So, i stand by that the best we can do on git cl side is decrease timeout for such requests to Gerrit.
Cc: -ehmaldonado@chromium.org
Components: -Infra>Git Infra>SDK
Owner: ehmaldonado@chromium.org
Status: Assigned (was: Untriaged)
Will we retry a 502?

But agreed failing faster, and potentially retrying if we're not seems like the right move.


Any way to improve on the lack of responsiveness while waiting? Even if it's doing something it doesn't show any notion of progress. The impossibility of CTRL+C added to the apparent freeze makes it an annoying experience.
New data point: I just had it happen to me again but this time while I was trying to create a new CL. See log below.

Also I guess my "once per week" estimate was on the low side as it did happen an extra time yesterday too.

$ git cl upload
Running presubmit upload checks ...

** Presubmit Messages **
Missing OWNER reviewers for these files:
    components/neterror/resources/neterror.css

Suggested OWNERS: (Use "git-cl owners" to interactively select owners.)
    chili@chromium.org is commented as:
      Offline owners. (at components/neterror)

Presubmit checks took 1.2s to calculate.

Presubmit checks passed.
 components/neterror/resources/neterror.css | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

saving CL description to /usr/local/google/home/carlosk/.git_cl_description_backup

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Bad Gateway
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

saving CL description to /usr/local/google/home/carlosk/.git_cl_description_backup

Failed to create a change. Please examine output above for the reason of the failure.
Hint: run command below to diagnose common Git/Gerrit credential problems:
  git cl creds-check


Comment 8 Deleted

I have the similar issue. `git cl upload` hangs every time. Sometimes it uploads successfully after a long wait while sometimes it's failed.

Sign in to add a comment