Stephen Leake <stephen_le...@stephe-leake.org> writes:

> Stephen Leake <stephen_le...@stephe-leake.org> writes:
>
>> Mando Rodriguez <mandorodrig...@gmail.com> writes:
>>
>>> When attempting to perform a merge we get this :
>>>
>>> /
>>> mtn: 2 heads on branch '0'
>>> mtn: merge 1 / 1:
>>> mtn: calculating best pair of heads to merge next
>>> mtn: [left]  1d8d9ecda9ed7bd5b34dfbb48d4ce0d61e071598
>>> mtn: [right] 96c815a1768eb25e49bf74ba3d6e6236adefb30a
>>> mtn: fatal: error: roster.cc:1826:
>>> I(left_uncommon_ancestors.find(left_rid) !=
>>> left_uncommon_ancestors.end())
>>> mtn: this is almost certainly a bug in monotone.
>>
>> I may have time to look at it this weekend.
>
> I finally started looking into this.
>
> The immediate cause of the crash is an invariant failure in
> roster.cc:2066 make_roster_for_merge:
>
>  I(left_uncommon_ancestors.find(left_rid) != left_uncommon_ancestors.end());
>
> I rearranged the MM and I lines there so left_uncommon_ancestors would
> be dumped on --debug, and it is empty.
>
> ...

I've made some more progress. The database is inconsistent; the table
"branch_leaves" has incorrect entries. I can't reproduce the error, but
the fix is simple; run database::recalc_branch_leaves.

I added 'mtn db recalc_branch_heads' (not committed), and after running
it, 'mtn heads' correctly shows just one head.

We could add a check for this to 'mtn db check'; it could compute the
branch leaves and compare to the current values in the branch_leaves table.

If no one objects, I'll check in the 'db recalc_branch_heads' command,
and work on a new check in 'db check'.

-- 
-- Stephe


_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to