|hg push review| corrupts clone, "unknown working parent"

RESOLVED DUPLICATE of bug 1321548

Status

MozReview
General
RESOLVED DUPLICATE of bug 1321548
2 years ago
4 months ago

People

(Reporter: Grisha, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8803138 [details]
recovery2.hg

After running |hg push review| on a particular patch series, multiple patches disappear and I can't seem to be able to get the tree into a sensible state anymore.

Fully reproducible, and I can't seem to get around this.

STR:
- clone mozilla-central
- hg import recovery2.hg (exported patch series attached)
- hg push review

Here's the tree before and after, and |hg push review --traceback| output.

➜  mozilla-central hg wip
@   318769:af1c9e382640 gkruglov tip
|  Bug 1291821 - Add SyncProvider, switch history buffering to use a db-backed buffer r=rnewman
o   318768:303012da4d1a gkruglov
|  Bug 1291821 - Improve bulk insert/update performance for storing history during a sync r=rnewman
o   318767:848859bec920 gkruglov
|  Bug 1291821 - Rename repositories/sessions r=rnewman
o   318766:40f5d893e152 gkruglov
|  Bug 1291821 - Get tests to work after sync changes r=rnewman
o   318765:ff9dc9986612 gkruglov
|  Bug 1291821 - Ensure sink repository is aware of new events coming from the source r=rnewman
o   318764:ca0e6c714f3b gkruglov
|  Bug 1291821 - Split history stage into recent and full history stages r=rnewman
o   318763:4447b0f8444d gkruglov
|  Bug 1291821 - Wrap local repositories in buffering middleware r=rnewman
o   318762:f7e6a48264d4 gkruglov
|  Bug 1291821 - Use sync deadline to decide if batching download should proceed r=rnewman
o   318761:4d171daf6574 gkruglov
|  Bug 1291821 - Keep track of sync deadline r=rnewman
o   318760:4b40e11e3482 gkruglov
|  Bug 1291821 - Remove total sync limits, refactor batching downloader r=rnewman
o   318759:eab351bd6937 gkruglov
|  Bug 1291821 - Decouple BatchingUploader from Server11Repository r=rnewman
o   318758:5e0c7dcaae3a gkruglov
|  Bug 1291821 - Simplify onFetchFailed, clean up some exception code r=rnewman
o   318757:e495c57db72d gkruglov
|  Bug 1291821 - Add onBatchComplete to a FetchRecordsDelegate r=rnewman
o   318756:7b52a04d1370 gkruglov
|  Bug 1291821 - Rename RepositorySession's delegate to storeDelegate, for clarity r=rnewman
o   318755:db8de49dc89e gkruglov
|  Bug 1291821 - Switch stage duration interval counting to use elapsedRealtime r=rnewman
o   318754:80e6ee0e4727 gkruglov
|  Bug 1291821 - Buffering repository middleware r=rnewman
o   318753:1c20990bc32f gkruglov
|  Bug 1291821 - Add a "clean" parameter to storeDone r=rnewman
o   318752:5f3347576af3 gkruglov
|  Bug 1291821 - Pre: remove unused SerialRecordConsumer r=rnewman
o   318751:f0f1aaf051d6 archaeopteryx central
|  Backed out changeset 19d4e98a1191 (bug 1295352) for frequently failing mda test test_getUserMedia_trackEnded.html on Linux x64 debug. r=backout a=backout
~
➜  mozilla-central hg push review --traceback
pushing to https://reviewboard-hg.mozilla.org/autoreview
searching for appropriate review repository
redirecting push to https://reviewboard-hg.mozilla.org/gecko
running checkstyle... failed (e.g. Java was not installed) - ignoring.
    To see full error output, run locally with: `./mach gradle checkstyle`
(adding commit id to 3 changesets)
saved backup bundle to /home/grisha/Code/mozilla-central/.hg/strip-backup/af1c9e382640-b5288b60-addcommitid.hg
warning: ignoring unknown working parent 5ed1a10fc056!
Traceback (most recent call last):
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 204, in _runcatch
    return _dispatch(req)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 880, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 637, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib64/python2.7/site-packages/hgext/pager.py", line 160, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib64/python2.7/site-packages/hgext/color.py", line 503, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1010, in _runcommand
    return checkargs()
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 971, in checkargs
    return cmdfunc()
  File "/usr/local/lib64/python2.7/site-packages/mercurial/dispatch.py", line 877, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/util.py", line 1036, in check
    return func(*args, **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/util.py", line 1036, in check
    return func(*args, **kwargs)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 178, in pushcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/util.py", line 1036, in check
    return func(*args, **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/util.py", line 1036, in check
    return func(*args, **kwargs)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 487, in pushcommand
    return orig(ui, repo, dest=dest, **opts)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/util.py", line 1036, in check
    return func(*args, **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/commands.py", line 5972, in push
    opargs=opts.get('opargs'))
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 255, in wrappedpush
    newbranch=False, **kwargs)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 304, in wrappedpush
    **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 290, in push
    **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/exchange.py", line 444, in push
    _pushdiscovery(pushop)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/extensions.py", line 210, in closure
    return func(*(args + a), **kw)
  File "/home/grisha/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 452, in wrappedpushdiscovery
    impactedrevs = list(repo.revs('%ln::', nodes))
  File "/usr/local/lib64/python2.7/site-packages/mercurial/localrepo.py", line 565, in revs
    return m(self)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 2570, in mfunc
    result = getset(repo, subset, tree)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 335, in getset
    s = methods[x[0]](repo, subset, *x[1:])
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 424, in func
    return symbols[f](repo, subset, b)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 828, in descendants
    return _descendants(repo, subset, x)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 806, in _descendants
    roots = getset(repo, fullreposet(repo), x)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 335, in getset
    s = methods[x[0]](repo, subset, *x[1:])
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 424, in func
    return symbols[f](repo, subset, b)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revset.py", line 2283, in _hexlist
    ls = [cl.rev(node.bin(r)) for r in s.split('\0')]
  File "/usr/local/lib64/python2.7/site-packages/mercurial/changelog.py", line 327, in rev
    r = super(changelog, self).rev(node)
  File "/usr/local/lib64/python2.7/site-packages/mercurial/revlog.py", line 360, in rev
    raise LookupError(node, self.indexfile, _('no node'))
LookupError: 00changelog.i@eaec9e422125: no node
abort: 00changelog.i@eaec9e422125: no node!
➜  mozilla-central hg wip
warning: ignoring unknown working parent 5ed1a10fc056!
o   318759:3334f8282c65 gkruglov tip
|  Bug 1291821 - Decouple BatchingUploader from Server11Repository r=rnewman
o   318758:4f29c50601e0 gkruglov
|  Bug 1291821 - Simplify onFetchFailed, clean up some exception code r=rnewman
o   318757:e050f76e3037 gkruglov
|  Bug 1291821 - Add onBatchComplete to a FetchRecordsDelegate r=rnewman
o   318756:4eda4375d5b9 gkruglov
|  Bug 1291821 - Rename RepositorySession's delegate to storeDelegate, for clarity r=rnewman
o   318755:65b54722f3db gkruglov
|  Bug 1291821 - Switch stage duration interval counting to use elapsedRealtime r=rnewman
o   318754:2a56ea5b9e43 gkruglov
|  Bug 1291821 - Buffering repository middleware r=rnewman
o   318753:5e7b24b2b4c3 gkruglov
|  Bug 1291821 - Add a "clean" parameter to storeDone r=rnewman
o   318752:5f3347576af3 gkruglov
|  Bug 1291821 - Pre: remove unused SerialRecordConsumer r=rnewman
o   318751:f0f1aaf051d6 archaeopteryx central
|  Backed out changeset 19d4e98a1191 (bug 1295352) for frequently failing mda test test_getUserMedia_trackEnded.html on Linux x64 debug. r=backout a=backout
~
➜  mozilla-central hg status 
warning: ignoring unknown working parent 5ed1a10fc056!
(Reporter)

Comment 1

2 years ago
NI-ing as per our IRC chat. Any help is much appreciated!
Flags: needinfo?(gps)

Comment 2

2 years ago
So, we do magic during `hg push` to rewrite changesets to add the MozReview-Commit-ID metadata to commit messages.

Best I can tell, there is a reference to the original changeset that gets used after the rewriting as part of a revset. Since this changeset has been stripped from the repo, the revset fails because the changeset is no longer present.

But if that hunch is correct, I'd expect a lot of people to be complaining about this bug. And I'd expect some tests to fail.

I think something is special about your configuration. I just don't know what. Maybe an old extension that isn't behaving well with modern Mercurial?

I'm going to retain the needinfo to remind myself to dig into the Mercurial code to see if there is any truth to my hunch.
(Reporter)

Comment 3

2 years ago
Grabbed my old laptop and tried pushing a series from there - success!

Non-working setup: hg version 3.9.1, tried with all extensions disabled (other than reviewboard and firefoxtree)
Working setup: hg version 3.7.1, various extensions enabled
I wonder if this is the error Sylvestre got yesterday?

glob: you may want to spend a few minutes investigating this failure. Although I have a feeling it will be difficult to track down until we get a reliable reproduce case.
Flags: needinfo?(gps) → needinfo?(glob)
i suspect this is caused by mozhg/rewrite stripping out unmodified revisions, which i fixed recently in https://reviewboard.mozilla.org/r/108676/diff/1

given we can't reproduce this issue, the length of time elapsed, and that it smells like the rewrite stripping issue, i'm going to close this bug.  don't hesitate to reopen if you encounter the issue again.
Status: NEW → RESOLVED
Last Resolved: a year ago
Flags: needinfo?(glob)
Resolution: --- → WORKSFORME
(Reporter)

Comment 6

10 months ago
It appears I have ran into the same issue, after doing bunch of rebasing of patches.

➜  mozilla-central hg wip
@  421656:23e701166a6f gkruglov tip tracker Bug 1364644 - Version-based syncing of bookmarks r=rnewman
o  421655:e6937f57570e gkruglov Bug 1364644 - Versioned sync middleware r=rnewman
o  421654:0f000a4cd90d gkruglov Bug 1364644 - Bookmark version tracking r=rnewman
o  421653:32284fa21cfb gkruglov Bug 1364644 - Migrate bookmarks schema and records to add version columns r=rnewman
o  421652:31e644bd38e0 gkruglov Bug 1364644 - Pre: Rename fetchSince to fetchModified r=rnewman
o  421651:11fe9cefc9d0 gkruglov Bug 1364644 - Pre: Remove guidsSince RepositorySession interface r=rnewman
o    421650:462d7561089c ffxbld central No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update

➜  mozilla-central hg push review
pushing to https://reviewboard-hg.mozilla.org/autoreview
searching for appropriate review repository
redirecting push to https://reviewboard-hg.mozilla.org/gecko
running checkstyle... success!
(adding commit id to 2 changesets)
saved backup bundle to /home/grisha/Code/mozilla-central/.hg/strip-backup/23e701166a6f-47103305-addcommitid.hg
warning: ignoring unknown working parent 39aa0e9675ef!
abort: 00changelog.i@e09c0699ec54: no node!

➜  mozilla-central hg wip
warning: ignoring unknown working parent 39aa0e9675ef!
o  421654:dedde5c2b8b4 gkruglov tip Bug 1364644 - Bookmark version tracking r=rnewman
o  421653:51f9f048b27a gkruglov Bug 1364644 - Migrate bookmarks schema and records to add version columns r=rnewman
o  421652:2ccdd2ca9be4 gkruglov Bug 1364644 - Pre: Rename fetchSince to fetchModified r=rnewman
o  421651:11fe9cefc9d0 gkruglov tracker Bug 1364644 - Pre: Remove guidsSince RepositorySession interface r=rnewman
o    421650:462d7561089c ffxbld central No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update
(Reporter)

Comment 7

10 months ago
What's different this time is that I should have a very concrete set of STRs to reproduce this.

Updated

10 months ago
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I think I hit this problem twice today. When I try to push to mozreview, hg eats my local changesets, leaves my local tree in a bad state, and no changesets show up in reviewboard.

$ hg push review
pushing to ssh://reviewboard-hg.mozilla.org/autoreview
searching for appropriate review repository
redirecting push to ssh://reviewboard-hg.mozilla.org/gecko
(adding commit id to 2 changesets)
saved backup bundle to /Users/chris/Code/mozilla/firefox/.hg/strip-backup/e48a30238620-5f704eda-addcommitid.hg
warning: ignoring unknown working parent 51f191271133!
abort: 00changelog.i@51f191271133: no node!

hg log shows nothing:

$ hg log
warning: ignoring unknown working parent 51f191271133!

But hg wip shows `tip` pointing *some* of the changesets I pushed, but the one or two top changesets are missing:

$ hg wip
warning: ignoring unknown working parent 51f191271133!
o  444904:6ea03b858a08 cpeterson tip Bug 1430669 - Part 2: Suppress -Wsuggest-override warnings from gtest header files. r?glandium
o  444903:7773ccb97d4a cpeterson Bug 1430669 - Part 1: Suppress -Wsuggest-override warnings from Breakpad header files. r?glandium
o  444902:877d35a88678 cpeterson Bug 1430669 - Part 4: Enable gcc -Wsuggest-override warnings. r?glandium
...

$ hg version
Mercurial Distributed SCM (version 4.3.2)

Comment 9

4 months ago
I think comment #8 is due to a bug in the changeset rewriting mechanism in the reviewboard client extension. Try making sure version-control-tools is up to date. (This smells like bug 1321548, so marking it as a dupe.)
Status: REOPENED → RESOLVED
Last Resolved: a year ago4 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1321548
You need to log in before you can comment on or make changes to this bug.