Page MenuHomePhabricator

Errors when trying to create a diff with arcanist
Closed, InvalidPublic

Description

I am consistently getting errors such as this P2051, when arc diff'ing from a windows machine on a mercurial repo. The revision gets created but it has no associated commits. I have a herald rule to forbid commits with no approved revisions and this person always needs "manual intervention" to finally commit her changes.
Other windows and linux machines with the same version (updated to latest commit 3c4735795a29) of arcanist are working fine though. Google says similar errors are happening elsewhere (P1928) but no other clues... Any idea about what may be going wrong?

Event Timeline

chad added a subscriber: chad.May 18 2017, 3:44 PM
chad closed this task as Invalid.

Please read and follow Contributing Bug Reports.

franjesus added a comment.EditedMay 18 2017, 3:59 PM

I tried to reproduce with other users, on the same phabricator install but there is only one user with a particular windows setup (that has nothing different from other users except for his particular windows machine) that is experiencing this problem. I tried following the stack trace and adding some error_log's on the php. But my php knowledge is close to zero. In any case something like this:

case DifferentialRevisionControlSystem::MERCURIAL:
     error_log("Processing commit list: " . json_encode($data) );
     foreach ($data as $commit) {
       $hashes[] = array(
         ArcanistDifferentialRevisionHash::HASH_MERCURIAL_COMMIT,
         $commit['rev'],
       );
     }
     break;

Only brought this:

Processing commit list: null

So the error is obviously elsewhere, probably in the data that arcanist is sending.

If you have any clues on how to debug the error they will be most appreciated.

chad added a subscriber: cspeckmim.May 18 2017, 4:11 PM

I don't personally, since I neither use hg or windows, but maybe @cspeckmim from the community has some suggestions.

Please identify the versions of mercurial used on client/server, also the version of Phabricator in use. If you're on an older version of Phabricator it's possible that upgrading may resolve the issue.

Please also identify any mercurial extensions in use -- such as eol?.

Are you sure this is an issue based on machine and not something specific to the commit that you're seeing this on?

I don't believe I've seen this issue before

franjesus added a comment.EditedMay 19 2017, 9:56 AM

We have installed mercurial 3.9.2 both in the server and client, in fact we downgraded the client mercurial from 4.1 to 3.9.2 to match the versions, but nothing changed. The version of arcanist is 3c4735795a29 (pre-last commit) and phabricator is at ef839192aa5a (from Tuesday).

Enabled mercurial extensions are extdiff, mq, rebase, shelve and strip.

The issue happens always, no matter what the commit. Empty commits also have this issue.

What is the best/recommended way to debug this in production? I guess there is something better than error_log + json_encode...

What if you disable the extdiff extension? The documentation doesn't mention modifying regular diff output but probably worth trying.

Just tried it, didn't help :(

Any weird environment variables defined on those workstations? Also add --trace to the arc diff command might give more details

Did that, you can see the result at P2054. At least to me, nothing looks fishy...

What if you try recreating the output generated by the hg commands shown from the --trace -- does the output look off in any way?