Unknown error trying to validate diff

16 views
Skip to first unread message

Ken Rachynski

unread,
Apr 2, 2020, 1:56:10 PM4/2/20
to Review Board Community
I'm trying to troubleshoot an issue with my Review Board setup. We're running 3.0.17 with RBTools 1.0.2 and I've gotten this error both with RBTools and creating a review in my browser. With the browser, when I add my patch to the review, I just get "Unknown error". Using RBTools gives a little more detail but not enough to figure out why this is failing.

>>> RBTools 1.0.2
>>> Python 3.7.7 (default, Mar 10 2020, 15:43:33)
[Clang 11.0.0 (clang-1100.0.33.17)]
>>> Running on Darwin-19.4.0-x86_64-i386-64bit
>>> Home = /Users/krachynski
>>> Current directory = /Users/krachynski/projects/reviews/star
>>> Command line: rbt post -d
>>> Running: tf vc help
>>> Checking for a Bazaar repository...
>>> Unable to execute "bzr help": skipping Bazaar
>>> Checking for a ClearCase repository...
>>> Unable to execute "cleartool help": skipping ClearCase
>>> Checking for a CVS repository...
>>> Unable to execute "cvs": skipping CVS
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git config --get remote.origin.url
>>> Repository info: Path: git@sserver:star, Base path: , Supports changesets: False
>>> Checking for a Mercurial repository...
>>> Running: hg root
>>> Command exited with rc 255: ['hg', 'root']
abort
: no repository found in '/Users/krachynski/projects/reviews/star' (.hg not found)!
---
>>> Checking for a Perforce repository...
>>> Unable to execute "p4 help": skipping Perforce
>>> Checking for a Plastic repository...
>>> Unable to execute "cm version": skipping Plastic
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Command exited with rc 1: ['svn', '--non-interactive', 'info']
>>> Checking for a Team Foundation Server repository...
>>> Unable to execute "tf help": skipping TFS
>>> Making HTTP GET request to http://reviewboard/api/
>>> Running: git rev-parse refs/heads/master
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git branch --remotes
>>> Running: git rev-parse origin/master
>>> Running: git rev-list 725fb19d6180553cd8a51c03f90a533552a95b17 --not --remotes=origin
>>> Running: git status --porcelain --untracked-files=no --ignore-submodules=dirty
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 725fb19d6180553cd8a51c03f90a533552a95b17..616a00c9dc63f88dc848e2c1269a4c77175fa6f8
>>> Generated diff size: 65949 bytes
>>> Making HTTP GET request to http://reviewboard/api/validation/diffs/
>>> Cached response for HTTP GET http://reviewboard/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://reviewboard/api/validation/diffs/
Traceback (most recent call last):
 
File "/Users/krachynski/bin/rbtool", line 8, in <module>
    sys
.exit(main())
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/commands/main.py", line 120, in main
    command
.run_from_argv([RB_MAIN, command_name] + args)
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/commands/__init__.py", line 725, in run_from_argv
    exit_code
= self.main(*args) or 0
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/commands/post.py", line 867, in main
   
**validate_kwargs)
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/api/decorators.py", line 27, in request_method
   
*args, **kwargs)
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/api/transport/sync.py", line 77, in execute_request_method
   
return self._execute_request(request)
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/api/transport/sync.py", line 86, in _execute_request
    rsp
= self.server.make_request(request)
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/api/request.py", line 685, in make_request
    request
.url, body, headers, request.method))
 
File "/Users/krachynski/Library/Python/3.7/lib/python/site-packages/rbtools/api/cache.py", line 209, in make_request
   
return self.urlopen(request)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
   
return opener.open(url, data, timeout)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
    response
= self._open(req, data)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
   
'_open', req)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result
= func(*args)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1347, in http_open
   
return self.do_open(http.client.HTTPConnection, req)
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1322, in do_open
    r
= h.getresponse()
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1344, in getresponse
    response
.begin()
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 306, in begin
    version
, status, reason = self._read_status()
 
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 275, in _read_status
   
raise RemoteDisconnected("Remote end closed connection without"
http
.client.RemoteDisconnected: Remote end closed connection without response

Trying on a Windows system with Python2 gives a slightly different response.

>>> RBTools 1.0.2
>>> Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-10-10.0.17134
>>> Home = C:\Users\krachynski
>>> Current directory = C:\code\star
>>> Command line: rbt post -d
>>> Running: tf vc help
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git config --get remote.origin.url
>>> Repository info: Path: git@server:star, Base path: , Supports changesets: False
>>> Checking for a Mercurial repository...
>>> Unable to execute "hg --help": skipping Mercurial
>>> Checking for a CVS repository...
>>> Unable to execute "cvs": skipping CVS
>>> Checking for a Perforce repository...
>>> Unable to execute "p4 help": skipping Perforce
>>> Checking for a Plastic repository...
>>> Unable to execute "cm version": skipping Plastic
>>> Checking for a ClearCase repository...
>>> Unable to execute "cleartool help": skipping ClearCase
>>> Checking for a Bazaar repository...
>>> Unable to execute "bzr help": skipping Bazaar
>>> Checking for a Team Foundation Server repository...
>>> Unable to execute "tf help": skipping TFS
>>> Making HTTP GET request to http://reviewboard/api/
>>> Running: git rev-parse refs/heads/master
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git branch --remotes
>>> Running: git rev-parse origin/master
>>> Running: git rev-list 725fb19d6180553cd8a51c03f90a533552a95b17 --not --remotes=origin
>>> Running: git status --porcelain --untracked-files=no --ignore-submodules=dirty
WARNING
: Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request.
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 725fb19d6180553cd8a51c03f90a533552a95b17..51ed64600660992c291307ee5c4d88cc49a53aa6
>>> Generated diff size: 65949 bytes
>>> Making HTTP GET request to http://reviewboard/api/validation/diffs/
>>> Cached response for HTTP GET http://reviewboard/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://reviewboard/api/validation/diffs/
Traceback (most recent call last):
 
File "C:/Program Files (x86)/RBTools/bin/../Python27/Scripts/rbt-script.py", line 11, in <module>
    load_entry_point
('RBTools==1.0.2', 'console_scripts', 'rbt')()
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\commands\main.py", line 120, in main
    command
.run_from_argv([RB_MAIN, command_name] + args)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\commands\__init__.py", line 725, in run_from_argv
    exit_code
= self.main(*args) or 0
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\commands\post.py", line 867, in main
   
**validate_kwargs)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\api\decorators.py", line 27, in request_method
   
*args, **kwargs)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\api\transport\sync.py", line 77, in execute_request_method
   
return self._execute_request(request)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\api\transport\sync.py", line 86, in _execute_request
    rsp
= self.server.make_request(request)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\api\request.py", line 685, in make_request
    request
.url, body, headers, request.method))
 
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-1.0.2-py2.7.egg\rbtools\api\cache.py", line 209, in make_request
   
return self.urlopen(request)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 154, in urlopen
   
return opener.open(url, data, timeout)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 429, in open
    response
= self._open(req, data)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 447, in _open
   
'_open', req)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 407, in _call_chain
    result
= func(*args)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 1228, in http_open
   
return self.do_open(httplib.HTTPConnection, req)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\urllib2.py", line 1201, in do_open
    r
= h.getresponse(buffering=True)
 
File "C:\Program Files (x86)\RBTools\Python27\lib\httplib.py", line 1121, in getresponse
    response
.begin()
 
File "C:\Program Files (x86)\RBTools\Python27\lib\httplib.py", line 438, in begin
    version
, status, reason = self._read_status()
 
File "C:\Program Files (x86)\RBTools\Python27\lib\httplib.py", line 402, in _read_status
   
raise BadStatusLine(line)
httplib
.BadStatusLine: ''

This is one commit among several thousand across hundreds of repos. This is a sporadic issue and what I'm looking for is better tools to figure out why Review Board is failing to process some diffs. If both python versions are actually getting a timeout, where is the timeout happening? between rbtools and review board or between review board and my git server? The response is actually pretty quick (about 5 seconds to my timeout message).

The commit itself appears to be fine, I can make a clone of the repo and apply the diff that was generated successfully.

Ken Rachynski

unread,
Apr 3, 2020, 1:39:46 PM4/3/20
to Review Board Community
A new day, a new repo exhibiting this same issue; reported by a different user. Near as I can tell, the change we've made is moving from a dummy account used with --submit-as to API_TOKEN access.
Reply all
Reply to author
Forward
0 new messages