Closed Bug 1184602 Opened 9 years ago Closed 9 years ago

Autoland tests and test-repo-discovery.t are failing due to internal server error

Categories

(MozReview Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Unassigned)

Details

Not sure what's going on here.

--- /Users/gps/src/hgcustom/version-control-tools/hgext/reviewboard/tests/test-repo-discovery.t
+++ /Users/gps/src/hgcustom/version-control-tools/hgext/reviewboard/tests/test-repo-discovery.t.err
@@ -45,143 +45,8 @@
   $ mkdir repos
   $ cd repos
   $ hg -q clone ${MERCURIAL_URL}a
+  abort: HTTP Error 500: Internal Server Error
+  [255]
   $ cd a
+  $TESTTMP.sh: line 34: cd: a: No such file or directory
   $ echo foo > foo
-  $ hg -q commit -A -m 'Repo a initial'
-  $ hg phase --public -r .
-  $ hg push --noreview ${PUSHPREFIX}/a
-  pushing to ssh://*:$HGPORT6/a (glob)
-  searching for changes
-  remote: adding changesets
-  remote: adding manifests
-  remote: adding file changes
-  remote: added 1 changesets with 1 changes to 1 files
-  remote: Trying to insert into pushlog.
-  remote: Inserted into the pushlog db successfully.
Priority: -- → P1
From /var/log/httpd/localhost/error_log in the container:

[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3] mod_wsgi (pid=209): Exception occurred processing WSGI script '/repo/hg/webroot_wsgi/hgweb.wsgi'.
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3] Traceback (most recent call last):
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 537, in increasingchunks
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     for chunk in source:
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/templater.py", line 618, in _flatten
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     for j in _flatten(i):
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/templater.py", line 611, in _flatten
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     for i in thing:
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/templater.py", line 198, in runmap
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     for i in d:
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/hgweb/hgwebdir_mod.py", line 384, in entries
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     for row, parity in zip(rows, paritygen(self.stripecount)):
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/hgweb/hgwebdir_mod.py", line 345, in rawentries
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     r = hg.repository(self.ui, path)
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/hg.py", line 132, in repository
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     peer = _peerorrepo(ui, path, create)
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/usr/lib64/python2.6/site-packages/mercurial/hg.py", line 124, in _peerorrepo
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     hook(ui, obj)
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]   File "/repo/hg/version-control-tools/hgext/reviewboard/server.py", line 238, in reposetup
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3]     raise util.Abort(_('Please set reviewboard.url to the URL of the '
[Fri Jul 17 23:18:41 2015] [error] [client 192.168.59.3] Abort: Please set reviewboard.url to the URL of the Review Board instance to talk to.

/etc/mercurial/hgrc has reviewboard.url set. Not sure what's going on here. I suspect file permissions issues.
This is a race condition of some kind. If I sleep before cloning the repo, the test passes as expected. Interesting.
url:        https://hg.mozilla.org/hgcustom/version-control-tools/rev/f08dc013e3d82d78d018d5ad67f36ce97d4c3ebb
changeset:  f08dc013e3d82d78d018d5ad67f36ce97d4c3ebb
user:       Gregory Szorc <gps@mozilla.com>
date:       Fri Jul 17 20:14:27 2015 -0700
description:
reviewboard: add sleep to patch over test failure (bug 1184602)

This is not the ideal workaround, but it appears to work, at least on my
machine. I have no clue what the race condition is and thus don't have
any leads on where to look to fix it. This seems like the easiest
solution to correcting a test failure.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
I also had to add a sleep() to the code here [1] prior to cloning repositories to Autoland for testing, so this impacted all of the Autoland tests as well.

[1] https://dxr.mozilla.org/hgcustom:version-control-tools/source/testing/vcttesting/mozreview.py#393
Summary: test-repo-discovery.t is failing due to internal server error → Autoland tests and test-repo-discovery.t are failing due to internal server error
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.