Confusing Mercurial history - was: Re: Hotspot segfaulting on Linux SPARC

Stefan Karlsson stefan.karlsson at oracle.com
Tue Apr 17 09:34:01 UTC 2018


On 2018-04-17 11:14, John Paul Adrian Glaubitz wrote:
> Hi Roman!
> 
> On 04/16/2018 08:36 PM, Roman Kennke wrote:
>>> I would normally expect a changeset that was checked in in July to be 
>>> included
>>> in a revision that was checked in in August. I don't understand how 
>>> one is supposed
>>> to perform bi-secting with Mercurial if something as basic as a 
>>> working history
>>> doesn't work in Mercurial.
>>
>> You're probably wrongly assuming that commit history is linear. It is
>> not. TBH, I don't really know how hg bisect works with branchy history.
>> It usually works fairly well in my experience. It will probably get
>> confused if you start out with two revision on different branches? Or
>> are you trying to bisect manually?
> 
> Yes, I am aware that the commit history is not linear. However, I am quite
> sure that the revision 46931 previously contained the revisions 46667
> and 46668 in the past but now it doesn't which is what confuses me.

As I Severin said, these numbers are your local numbers and might not at 
all match what I have in my copy of jdk/hs. However, if we assume that 
they are the same, I get this:

hg log -r 'reverse(0::46931)' --graph

o  changeset:   46931:6e1b59330482
|  parent:      46253:f7daf2e39cc8
|  user:        glaubitz
|  date:        Mon Aug 21 15:17:21 2017 +0200
|  summary:     8186433: Compiler flag -arch=sparc should not be passed 
on linux-sparc
|
o  changeset:   46253:f7daf2e39cc8
|  parent:      46250:3041c580db2a
|  user:        bobv
|  date:        Mon Aug 21 12:08:03 2017 -0400
|  summary:     8186115: libelf still referenced after 8172670

Where the parent of 46931 is 46253.

And hg log -r '46668::46931'

gives back nothing indicating that 46668 is not a ancestor of 46931.

You can also find the first common ancestor of the two change sets:

hg log -r 'ancestor(46667,46931)'
changeset:   45825:4fa7bd62eb84
parent:      45761:9ef5029b247b
user:        alanb
date:        Wed Jul 05 13:25:45 2017 +0100
summary:     8183503: Update hotspot tests to allow for unique test 
classes directory

Can you share the SHA number for your 46668 change, and maybe the summry 
line as well?

StefanK


> 
>> Here's some information around this stuff:
>> http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#sec:undo:bisect 
>>
> 
> I have found this guide as well and followed through it. However, in order
> to start bisecting, I need to find a good revision first which is already
> where I failed.
> 
> I tried many different revisions around 46931. But those either contained
> the bug I am now seeing or they were missing various other changes which
> are necessary to fix the build on linux-sparc.
> 
> I have successfully bisected large codebases like QEMU with git in the past
> successfully but I am completely failing at that with Mercurial. I think
> I will try a git mirror of the OpenJDK repository next because I am not
> sure whether I am just using Mercurial wrong or whether bisecting there
> is so much more difficult as compared to git.
> 
> For what is worth, I have also tried older versions of binutils and the
> kernel to make sure that the crash that I am seeing on linux-sparc is
> just not an artifact.
> 
> Adrian
> 


More information about the hotspot-dev mailing list