Closed Bug 1943069 Opened 28 days ago Closed 28 days ago

500 errors cloning nss repo

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jcristau, Assigned: jcristau)

References

Details

Attachments

(1 file)

Because the nss repo doesn't have clone bundles, CI ends up doing stream clones directly from hg.m.o. It looks like that wants to lock the repo, which causes intermittent errors:

mod_wsgi (pid=8597): Exception occurred processing WSGI script '/repo_local/mozilla/webroot_wsgi/projects/hgweb.wsgi'. 
Traceback (most recent call last):
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/lock.py", line 287, in _trylock
    self.vfs.makelock(lockname, self.f)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/vfs.py", line 233, in makelock
    return util.makelock(info, self.join(path))
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/util.py", line 2158, in makelock
    return os.symlink(info, pathname)
FileExistsError: [Errno 17] File exists: b'hgweb1.dmz.mdc1.mozilla.com/effffffc:8597' -> b'/repo_local/mozilla/mozilla/projects/nss/.hg/store/lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/lock.py", line 151, in trylock
    l._trylock()
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/lock.py", line 301, in _trylock
    locker,
mercurial.error.LockHeld: [Errno 11] Lock held: b'/repo_local/mozilla/mozilla/projects/nss/.hg/store/lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/hgweb/hgwebdir_mod.py", line 385, in run_wsgi
    for r in self._runwsgi(req, res):
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/hgweb/hgweb_mod.py", line 363, in run_wsgi
    for r in self._runwsgi(req, res, repo):
  File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 423, in wrapped_runwsgi
    for what in orig(self, req, res, repo):
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/hgweb/hgweb_mod.py", line 379, in _runwsgi
    rctx, req, res, self.check_perm
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/wireprotoserver.py", line 229, in handlewsgirequest
    _callhttp(repo, req, res, proto, cmd)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/wireprotoserver.py", line 321, in _callhttp
    rsp = wireprotov1server.dispatch(repo, proto, cmd, accesshidden)
  File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 275, in wrappeddispatch
    res = orig(repo, proto, command, *args, **kwargs)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/wireprotov1server.py", line 91, in dispatch
    return func(repo, proto, *args)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/wireprotov1server.py", line 551, in getbundle
    repo, b'serve', **pycompat.strkwargs(opts)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/exchange.py", line 2483, in getbundlechunks
    **pycompat.strkwargs(kwargs)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/exchange.py", line 2493, in _getbundlestream2
    return bundle2.addpartbundlestream2(bundler, repo, **kwargs)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/bundle2.py", line 1945, in addpartbundlestream2
    repo, includepats, excludepats, includeobsmarkers
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/streamclone.py", line 811, in generatev2
    with repo.lock():
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/localrepo.py", line 3132, in lock
    desc=_(b'repository %s') % self.origroot,
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/localrepo.py", line 3096, in _lock
    devel_wait_sync_file=sync_file,
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/lock.py", line 162, in trylock
    printwarning(ui.warn, inst.locker)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/lock.py", line 137, in printwarning
    printer(msg)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/ui.py", line 1911, in warn
    self._writemsg(self._fmsgerr, type=b'warning', *msg, **opts)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/ui.py", line 1342, in _writemsg
    _writemsgwith(self._write, dest, *args, **opts)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/ui.py", line 2347, in _writemsgwith
    write(dest, *args, **opts)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/ui.py", line 1285, in _write
    self._writenobuf(dest, *args, **opts)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/ui.py", line 1310, in _writenobuf
    dest.write(msg)
  File "/var/hg/venv_hgweb/lib64/python3.6/site-packages/mercurial/utils/procutil.py", line 138, in write
    c = write1(m[total_written:])
TypeError: write() argument 1 must be read-only bytes-like object, not memoryview
Type: task → defect
Assignee: nobody → jcristau
Status: NEW → ASSIGNED
Attachment #9461018 - Attachment description: bundles: add nss and nspr clone bundles (bug 1943069). r?sheehan → bundles: add nss, nspr and comm-unified clone bundles (bug 1943069). r?sheehan

I'm told the alternative would be to turn off server.uncompressed in hgrc for those repos, to use non-stream clones, which should be fine for nss/nspr. Having bundles for comm-unified seems desirable in any case.

Pushed by jcristau@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/3dcf8436ed88
bundles: add nss, nspr and comm-unified clone bundles . r=sheehan

Status: ASSIGNED → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED
Regressions: 1944021
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: