* Article about "git bisect run" on LWN
@ 2009-02-05 6:47 Christian Couder
2009-02-05 13:34 ` Bill Lear
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Christian Couder @ 2009-02-05 6:47 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Andreas Ericsson, Ingo Molnar, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
Hi,
For information, an article from me, 'Fully automated bisecting with "git
bisect run"' has been published in today's edition of LWN on the
development page:
http://lwn.net/Articles/317154/
Thank you guys,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 6:47 Article about "git bisect run" on LWN Christian Couder
@ 2009-02-05 13:34 ` Bill Lear
2009-02-05 14:13 ` Ingo Molnar
2009-02-05 16:23 ` Jonathan Corbet
2 siblings, 0 replies; 18+ messages in thread
From: Bill Lear @ 2009-02-05 13:34 UTC (permalink / raw)
To: Christian Couder
Cc: git, Junio C Hamano, Andreas Ericsson, Ingo Molnar, Jeff Garzik,
Linus Torvalds, Jon Seymour, Johannes Schindelin
On Thursday, February 5, 2009 at 07:47:49 (+0100) Christian Couder writes:
>Hi,
>
>For information, an article from me, 'Fully automated bisecting with "git
>bisect run"' has been published in today's edition of LWN on the
>development page:
>
>http://lwn.net/Articles/317154/
Wow, very nice Christian. Thank you for including me in the article
and for sending me this notice --- very thoughtful of you.
Bill
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 6:47 Article about "git bisect run" on LWN Christian Couder
2009-02-05 13:34 ` Bill Lear
@ 2009-02-05 14:13 ` Ingo Molnar
2009-02-06 2:42 ` david
2009-02-06 5:23 ` Christian Couder
2009-02-05 16:23 ` Jonathan Corbet
2 siblings, 2 replies; 18+ messages in thread
From: Ingo Molnar @ 2009-02-05 14:13 UTC (permalink / raw)
To: Christian Couder
Cc: git, Junio C Hamano, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
* Christian Couder <chriscool@tuxfamily.org> wrote:
> Hi,
>
> For information, an article from me, 'Fully automated bisecting with "git
> bisect run"' has been published in today's edition of LWN on the
> development page:
>
> http://lwn.net/Articles/317154/
Nice article!
In terms of possible future enhancements of git bisect, here's a couple of
random ideas that would help my auto-bisection efforts:
- Feature: support "Bisection Redundancy"
This feature helps developers realize if a bug is sporadic. This happens
quite often in the kernel space: a bug looks deterministic, but down the
line it becomes sporadic. Sometimes a boot crash only occurs with a 75%
probability - and if one is unlucky it can cause a _lot_ of wasted
bisection time. The wrong commit gets blamed and the wrong set of
developers start scratching their heads. It's a reoccuring theme on lkml.
What git could do here is to allow testers to inject a bit of extra
"redundancy" automatically, and use the redundant test-points to detect
conflicts in good/bad constraints.
It would work like this:
git bisect start --redundancy=33%
It would mean that for every third bisection points, Git would
_not_ chose the ideal (estimated) 'middle point' from the set of "unknown
quality" changes that are still outstanding - but would intentionally
"weer outside" and select one commit from the _known_ set of commits.
If such a redundant re-test of the known-good or known-bad set yields a
nonsensical result then Git aborts the bisection with a "logic
inconsistency detected" kind of message - and people could at this point
realize the non-determinism of the test.
( Git can do this when a "redundant" test point is marked as 'bad' -
despite an earlier bisection already categorizing that test point as
'good' - or if it's the other way around. Git will only continue with
the bisection if the test point has the expected quality. )
This essentially means an automated re-test - but it's much better than
just a repeated bisection - i've often met non-deterministic bugs that
yield the _exact same_ nonsensical commit even on repeat bisections. That
happens when a timing bug depends on the exact kernel layout, or a
miscompilation or linker bug depends on the exact kernel layout, etc.
It's also faster than a re-done bisection: 33% more testpoints is better
than twice as many test-points. Also, auto-bisection can deal with
redundancy just fine - it does not really matter whether i have to wait
20 or 30 minutes for a test result since there's no manual intervention
needed - but it _very_ much matters whether i can trust the validity of
the bisection result.
- Feature: better "git bisect next" support.
Sometimes a commit wont build. In that case we have "git bisect next", but
last i checked that only jumps a single commit - and build breakages
often have a large scope - full trees that got merged upstream, etc. Most
of the time those build breakages are uninteresting and the build-broken
window does not contain the bad commit.
So it would be nice to have a "git bisect next --left=20%" type of
feature. This would jump 20% commits to the "left" from the bisection
point, towards the 'known bad' set of commits, but still within the
bisection window.
Similarly, "git bisect next --right=20%" would jump towards the known-good
edge of the bisection window (but still within the bisection window).
Currently when i hit a build error during auto-bisection, it aborts and i
have to intervene manually. But with a bigger jump distance i could use
git-bisect-next reliably in scripts too.
Likewise, users too hit build breakages often, and find it hard to get out
of the window of breakage. With the high-order tree structure of the
kernel repository that is rather non-intuitive to do as well, and often
people make mistakes and test the wrong commit.
- Feature: detect "redundant" and "inconsistent" test points
This is a variation of the redunant testing theme, but from a different
angle: often newbies when they bisect the kernel weer outside of the
bisection window without realizing it. It would be nice if Git printed a
friendly notifier that:
git bisect good 12341234
info: bisection point 12341234 was already in the 'good' range
Or, if the redunant test point is conflicting, print:
git bisect good 12341234
fatal: bisection point 12341234 was already in the 'bad' range!
And give an error return as well, so that scripts can abort.
Currently Git seems to be very forgiving and accepts all bisection points
that we feed it, without checking them for consistency. (this might have
changed in current development versions, i dont know.)
- User friendliness: give an estimation about how many steps are remaining
Right now git prints this when a bisection session begins:
aldebaran:~/tip> git bisect start
aldebaran:~/tip> git bisect bad linus
aldebaran:~/tip> git bisect good v2.6.28
Bisecting: 5449 revisions left to test after this
[e0b685d39a0404e7f87fb7b7808c3b37a115fe11] Updated contact info for CREDITS file
It would be nice if Git estimated the expected number of bisection points.
Something like this would be helpful:
aldebaran:~/tip> git bisect good v2.6.28
Bisecting: 5449 revisions left to test after this
About ~16 test steps left [approximated]
[e0b685d39a0404e7f87fb7b7808c3b37a115fe11] Updated contact info for CREDITS file
The real number of test points might be higher than this, if the tree
layout is unlucky, or it might be less than this if the user manually
narrows the bisection window to a suspected set of commits - but that's
OK - most kernel testers use the default variant and the message is clear
enough that it's only an estimation.
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 6:47 Article about "git bisect run" on LWN Christian Couder
2009-02-05 13:34 ` Bill Lear
2009-02-05 14:13 ` Ingo Molnar
@ 2009-02-05 16:23 ` Jonathan Corbet
2009-02-05 20:54 ` Christian Couder
2009-02-06 2:49 ` david
2 siblings, 2 replies; 18+ messages in thread
From: Jonathan Corbet @ 2009-02-05 16:23 UTC (permalink / raw)
To: Christian Couder
Cc: git, Junio C Hamano, Andreas Ericsson, Ingo Molnar, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
On Thu, 5 Feb 2009 07:47:49 +0100
Christian Couder <chriscool@tuxfamily.org> wrote:
> For information, an article from me, 'Fully automated bisecting with
> "git bisect run"' has been published in today's edition of LWN on the
> development page:
>
> http://lwn.net/Articles/317154/
For those of you lacking an LWN subscription, please follow this link
instead:
http://lwn.net/SubscriberLink/317154/c49a5d1a14050820/
Thanks to Christian for doing this article for us!
jon
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 16:23 ` Jonathan Corbet
@ 2009-02-05 20:54 ` Christian Couder
2009-02-06 2:49 ` david
1 sibling, 0 replies; 18+ messages in thread
From: Christian Couder @ 2009-02-05 20:54 UTC (permalink / raw)
To: Jonathan Corbet, Jake Edge
Cc: git, Junio C Hamano, Andreas Ericsson, Ingo Molnar, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
Le jeudi 5 février 2009, Jonathan Corbet a écrit :
> On Thu, 5 Feb 2009 07:47:49 +0100
>
> For those of you lacking an LWN subscription, please follow this link
> instead:
>
> http://lwn.net/SubscriberLink/317154/c49a5d1a14050820/
>
> Thanks to Christian for doing this article for us!
Thank you Jon for publishing this article and for the subscriber link.
And thank you Jake for your help in writing this article.
Best regards,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-06 2:42 ` david
@ 2009-02-06 1:46 ` Ingo Molnar
2009-02-06 1:52 ` Ingo Molnar
0 siblings, 1 reply; 18+ messages in thread
From: Ingo Molnar @ 2009-02-06 1:46 UTC (permalink / raw)
To: david
Cc: Christian Couder, git, Junio C Hamano, Andreas Ericsson,
Jeff Garzik, Linus Torvalds, Bill Lear, Jon Seymour,
Johannes Schindelin
* david@lang.hm <david@lang.hm> wrote:
> On Thu, 5 Feb 2009, Ingo Molnar wrote:
>
>> * Christian Couder <chriscool@tuxfamily.org> wrote:
>>
>>> Hi,
>>>
>>> For information, an article from me, 'Fully automated bisecting with "git
>>> bisect run"' has been published in today's edition of LWN on the
>>> development page:
>>>
>>> http://lwn.net/Articles/317154/
>>
>> Nice article!
>>
>> In terms of possible future enhancements of git bisect, here's a couple of
>> random ideas that would help my auto-bisection efforts:
>>
>> - Feature: support "Bisection Redundancy"
>>
>> This feature helps developers realize if a bug is sporadic. This happens
>> quite often in the kernel space: a bug looks deterministic, but down the
>> line it becomes sporadic. Sometimes a boot crash only occurs with a 75%
>> probability - and if one is unlucky it can cause a _lot_ of wasted
>> bisection time. The wrong commit gets blamed and the wrong set of
>> developers start scratching their heads. It's a reoccuring theme on lkml.
>>
>> What git could do here is to allow testers to inject a bit of extra
>> "redundancy" automatically, and use the redundant test-points to detect
>> conflicts in good/bad constraints.
>>
>> It would work like this:
>>
>> git bisect start --redundancy=33%
>>
>> It would mean that for every third bisection points, Git would
>> _not_ chose the ideal (estimated) 'middle point' from the set of "unknown
>> quality" changes that are still outstanding - but would intentionally
>> "weer outside" and select one commit from the _known_ set of commits.
>>
>> If such a redundant re-test of the known-good or known-bad set yields a
>> nonsensical result then Git aborts the bisection with a "logic
>> inconsistency detected" kind of message - and people could at this point
>> realize the non-determinism of the test.
>>
>> ( Git can do this when a "redundant" test point is marked as 'bad' -
>> despite an earlier bisection already categorizing that test point as
>> 'good' - or if it's the other way around. Git will only continue with
>> the bisection if the test point has the expected quality. )
>>
>> This essentially means an automated re-test - but it's much better than
>> just a repeated bisection - i've often met non-deterministic bugs that
>> yield the _exact same_ nonsensical commit even on repeat bisections. That
>> happens when a timing bug depends on the exact kernel layout, or a
>> miscompilation or linker bug depends on the exact kernel layout, etc.
>>
>> It's also faster than a re-done bisection: 33% more testpoints is better
>> than twice as many test-points. Also, auto-bisection can deal with
>> redundancy just fine - it does not really matter whether i have to wait
>> 20 or 30 minutes for a test result since there's no manual intervention
>> needed - but it _very_ much matters whether i can trust the validity of
>> the bisection result.
>
> when you gave this the title of redundnancy and described the problem I
> assumed that you would then propose running the test multiple times (so
> "git bisect run X --redundancy 5" would run each test 5 times, it would
> pass IFF it passed the test all 5 times. that would seem to be a better
> match for the name, as well as being a better test
Yeah, but using 100%, 200%, 300%, etc. redundancy is a bit wasteful and not
granular enough for my purposes.
Here's the math:
A typical kernel bisection takes 15 test steps. 30% of redundancy means that
it takes only 30% longer, but for that we get +5 tests. Five extra test
points are usually enough to establish whether a test method shows sporadic
tendencies or not, with an ~90% confidence factor.
Repeating the test 5 times would bring a 15-steps kernel bisection from 30
minutes [it's about 60 seconds to build a kernel, 60 seconds to boot it] to
about 2.5 hours - that's very long. The confidence factor only goes from
~90% to 99% - that extra 9% is not worth the cost.
The idea would be to insert 30% redunancy into my bisections automatically -
so that i could trust _all_ bisections more - not just the ones i suspect to
be non-deterministic. Hence the suggestion to enable lower levels of
redundancy like 30%. (but even 10% or 20% might be enough to weed out the
most obvious cases)
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-06 1:46 ` Ingo Molnar
@ 2009-02-06 1:52 ` Ingo Molnar
0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2009-02-06 1:52 UTC (permalink / raw)
To: david
Cc: Christian Couder, git, Junio C Hamano, Andreas Ericsson,
Jeff Garzik, Linus Torvalds, Bill Lear, Jon Seymour,
Johannes Schindelin
* Ingo Molnar <mingo@elte.hu> wrote:
> The idea would be to insert 30% redunancy into my bisections automatically
> - so that i could trust _all_ bisections more - not just the ones i
> suspect to be non-deterministic. Hence the suggestion to enable lower
> levels of redundancy like 30%. (but even 10% or 20% might be enough to
> weed out the most obvious cases)
the other advantage of redundancy that i forgot to mention:
- Sometimes the non-determinism is inserted by a _human_. It happened not
once that i accidentally mis-judged a testpoint, and the bisection ran
afoul. Only 4-5 steps later do i suspect that something is wrong: that i
get an unlikely series of good,good,good,good,good or bad,bad,bad,bad,bad
testpoint qualities.
So for manual bisection, redundancy can be a big time-saver. If i mess up a
bisection point then say 50% redundancy can still point out my stupidity
with a high likelyhood.
In fact if Git sees an unlikely series of same-quality bisection points, it
could artificially insert a test to around the last-different test point, to
test the theory of a messed up bisection.
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 14:13 ` Ingo Molnar
@ 2009-02-06 2:42 ` david
2009-02-06 1:46 ` Ingo Molnar
2009-02-06 5:23 ` Christian Couder
1 sibling, 1 reply; 18+ messages in thread
From: david @ 2009-02-06 2:42 UTC (permalink / raw)
To: Ingo Molnar
Cc: Christian Couder, git, Junio C Hamano, Andreas Ericsson,
Jeff Garzik, Linus Torvalds, Bill Lear, Jon Seymour,
Johannes Schindelin
On Thu, 5 Feb 2009, Ingo Molnar wrote:
> * Christian Couder <chriscool@tuxfamily.org> wrote:
>
>> Hi,
>>
>> For information, an article from me, 'Fully automated bisecting with "git
>> bisect run"' has been published in today's edition of LWN on the
>> development page:
>>
>> http://lwn.net/Articles/317154/
>
> Nice article!
>
> In terms of possible future enhancements of git bisect, here's a couple of
> random ideas that would help my auto-bisection efforts:
>
> - Feature: support "Bisection Redundancy"
>
> This feature helps developers realize if a bug is sporadic. This happens
> quite often in the kernel space: a bug looks deterministic, but down the
> line it becomes sporadic. Sometimes a boot crash only occurs with a 75%
> probability - and if one is unlucky it can cause a _lot_ of wasted
> bisection time. The wrong commit gets blamed and the wrong set of
> developers start scratching their heads. It's a reoccuring theme on lkml.
>
> What git could do here is to allow testers to inject a bit of extra
> "redundancy" automatically, and use the redundant test-points to detect
> conflicts in good/bad constraints.
>
> It would work like this:
>
> git bisect start --redundancy=33%
>
> It would mean that for every third bisection points, Git would
> _not_ chose the ideal (estimated) 'middle point' from the set of "unknown
> quality" changes that are still outstanding - but would intentionally
> "weer outside" and select one commit from the _known_ set of commits.
>
> If such a redundant re-test of the known-good or known-bad set yields a
> nonsensical result then Git aborts the bisection with a "logic
> inconsistency detected" kind of message - and people could at this point
> realize the non-determinism of the test.
>
> ( Git can do this when a "redundant" test point is marked as 'bad' -
> despite an earlier bisection already categorizing that test point as
> 'good' - or if it's the other way around. Git will only continue with
> the bisection if the test point has the expected quality. )
>
> This essentially means an automated re-test - but it's much better than
> just a repeated bisection - i've often met non-deterministic bugs that
> yield the _exact same_ nonsensical commit even on repeat bisections. That
> happens when a timing bug depends on the exact kernel layout, or a
> miscompilation or linker bug depends on the exact kernel layout, etc.
>
> It's also faster than a re-done bisection: 33% more testpoints is better
> than twice as many test-points. Also, auto-bisection can deal with
> redundancy just fine - it does not really matter whether i have to wait
> 20 or 30 minutes for a test result since there's no manual intervention
> needed - but it _very_ much matters whether i can trust the validity of
> the bisection result.
when you gave this the title of redundnancy and described the problem I
assumed that you would then propose running the test multiple times (so
"git bisect run X --redundancy 5" would run each test 5 times, it would
pass IFF it passed the test all 5 times. that would seem to be a better
match for the name, as well as being a better test
David Lang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 16:23 ` Jonathan Corbet
2009-02-05 20:54 ` Christian Couder
@ 2009-02-06 2:49 ` david
1 sibling, 0 replies; 18+ messages in thread
From: david @ 2009-02-06 2:49 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Christian Couder, git, Junio C Hamano, Andreas Ericsson,
Ingo Molnar, Jeff Garzik, Linus Torvalds, Bill Lear, Jon Seymour,
Johannes Schindelin
On Thu, 5 Feb 2009, Jonathan Corbet wrote:
> On Thu, 5 Feb 2009 07:47:49 +0100
> Christian Couder <chriscool@tuxfamily.org> wrote:
>
>> For information, an article from me, 'Fully automated bisecting with
>> "git bisect run"' has been published in today's edition of LWN on the
>> development page:
>>
>> http://lwn.net/Articles/317154/
>
> For those of you lacking an LWN subscription, please follow this link
> instead:
>
> http://lwn.net/SubscriberLink/317154/c49a5d1a14050820/
>
> Thanks to Christian for doing this article for us!
and since Jon was too professional to put in a plug himself, I'll do it
for him ;-)
if you aren't a subscriber, consider subscribing (the 'starving-hacker'
level is only $2.50USD/month)
David Lang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-05 14:13 ` Ingo Molnar
2009-02-06 2:42 ` david
@ 2009-02-06 5:23 ` Christian Couder
2009-02-07 4:41 ` Christian Couder
1 sibling, 1 reply; 18+ messages in thread
From: Christian Couder @ 2009-02-06 5:23 UTC (permalink / raw)
To: Ingo Molnar
Cc: git, Junio C Hamano, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
Le jeudi 5 février 2009, Ingo Molnar a écrit :
> * Christian Couder <chriscool@tuxfamily.org> wrote:
> > Hi,
> >
> > For information, an article from me, 'Fully automated bisecting with
> > "git bisect run"' has been published in today's edition of LWN on the
> > development page:
> >
> > http://lwn.net/Articles/317154/
>
> Nice article!
>
> In terms of possible future enhancements of git bisect, here's a couple
> of random ideas that would help my auto-bisection efforts:
>
> - Feature: support "Bisection Redundancy"
>
> This feature helps developers realize if a bug is sporadic. This
> happens quite often in the kernel space: a bug looks deterministic, but
> down the line it becomes sporadic. Sometimes a boot crash only occurs
> with a 75% probability - and if one is unlucky it can cause a _lot_ of
> wasted bisection time. The wrong commit gets blamed and the wrong set of
> developers start scratching their heads. It's a reoccuring theme on lkml.
>
> What git could do here is to allow testers to inject a bit of extra
> "redundancy" automatically, and use the redundant test-points to
> detect conflicts in good/bad constraints.
>
> It would work like this:
>
> git bisect start --redundancy=33%
>
> It would mean that for every third bisection points, Git would
> _not_ chose the ideal (estimated) 'middle point' from the set of
> "unknown quality" changes that are still outstanding - but would
> intentionally "weer outside" and select one commit from the _known_ set
> of commits.
>
> If such a redundant re-test of the known-good or known-bad set yields
> a nonsensical result then Git aborts the bisection with a "logic
> inconsistency detected" kind of message - and people could at this point
> realize the non-determinism of the test.
>
> ( Git can do this when a "redundant" test point is marked as 'bad' -
> despite an earlier bisection already categorizing that test point as
> 'good' - or if it's the other way around. Git will only continue
> with the bisection if the test point has the expected quality. )
>
> This essentially means an automated re-test - but it's much better
> than just a repeated bisection - i've often met non-deterministic bugs
> that yield the _exact same_ nonsensical commit even on repeat bisections.
> That happens when a timing bug depends on the exact kernel layout, or a
> miscompilation or linker bug depends on the exact kernel layout, etc.
>
> It's also faster than a re-done bisection: 33% more testpoints is
> better than twice as many test-points. Also, auto-bisection can deal with
> redundancy just fine - it does not really matter whether i have to wait
> 20 or 30 minutes for a test result since there's no manual intervention
> needed - but it _very_ much matters whether i can trust the validity of
> the bisection result.
I see. With the current code it seems difficult to have a "weer outside"
algorithm, but if the "git bisect skip" code is ported (from shell
in "git-bisect.sh") to C in "builtin-rev-list.c", that might be doable. And
anyway moving the bisect skip code to C is needed for other improvements.
> - Feature: better "git bisect next" support.
You probably mean "git bisect skip" here.
> Sometimes a commit wont build. In that case we have "git bisect next",
> but last i checked that only jumps a single commit - and build breakages
> often have a large scope - full trees that got merged upstream, etc. Most
> of the time those build breakages are uninteresting and the build-broken
> window does not contain the bad commit.
>
> So it would be nice to have a "git bisect next --left=20%" type of
> feature. This would jump 20% commits to the "left" from the bisection
> point, towards the 'known bad' set of commits, but still within the
> bisection window.
>
> Similarly, "git bisect next --right=20%" would jump towards the
> known-good edge of the bisection window (but still within the bisection
> window).
In the following thread, H. Peter Anvin suggested an algorithm to deal with
this kind of problem:
http://thread.gmane.org/gmane.comp.version-control.git/98164/
And I suggested a simpler one, that might be implemented without having to
port "git bisect skip" code to C first, but I did not work on it yet.
> Currently when i hit a build error during auto-bisection, it aborts and
> i have to intervene manually. But with a bigger jump distance i could use
> git-bisect-next reliably in scripts too.
>
> Likewise, users too hit build breakages often, and find it hard to get
> out of the window of breakage. With the high-order tree structure of the
> kernel repository that is rather non-intuitive to do as well, and often
> people make mistakes and test the wrong commit.
I am working slowly on "git replace" these days and, if everything goes
well, it should make it possible to use "replace" refs when bisecting, so
that people could bisect on commit trees where many breakages have been
removed. And as refs can be shared, this means that users and developers
should be able to easily share these improved trees.
Another way to work around breakages could be to have a list of commits and
ranges of commits that should always be skipped and always pass them
to "git bisect skip" before using "git bisect run". Something like that
perhaps:
$ git bisect start <bad> <good>
$ git bisect skip $(cat always_skipped.txt)
$ git bisect run ./my_test_script.sh
But I agree that it would also be a good thing to have an improved "git
bisect skip" that could jump out of breakage windows.
> - Feature: detect "redundant" and "inconsistent" test points
>
> This is a variation of the redunant testing theme, but from a different
> angle: often newbies when they bisect the kernel weer outside of the
> bisection window without realizing it. It would be nice if Git printed
> a friendly notifier that:
>
> git bisect good 12341234
> info: bisection point 12341234 was already in the 'good' range
I agree that it would be nice. And it might be easy to implement.
> Or, if the redunant test point is conflicting, print:
>
> git bisect good 12341234
> fatal: bisection point 12341234 was already in the 'bad' range!
>
> And give an error return as well, so that scripts can abort.
>
> Currently Git seems to be very forgiving and accepts all bisection
> points that we feed it, without checking them for consistency. (this
> might have changed in current development versions, i dont know.)
I don't think conflicting test points are accepted. An error should be
reported (with exit code 1), like this:
$ git bisect start HEAD~5 HEAD
Some good revs are not ancestor of the bad rev.
git bisect cannot work properly in this case.
Maybe you mistake good and bad revs?
> - User friendliness: give an estimation about how many steps are
> remaining
>
> Right now git prints this when a bisection session begins:
>
> aldebaran:~/tip> git bisect start
> aldebaran:~/tip> git bisect bad linus
> aldebaran:~/tip> git bisect good v2.6.28
> Bisecting: 5449 revisions left to test after this
> [e0b685d39a0404e7f87fb7b7808c3b37a115fe11] Updated contact info for
> CREDITS file
>
> It would be nice if Git estimated the expected number of bisection
> points. Something like this would be helpful:
>
> aldebaran:~/tip> git bisect good v2.6.28
> Bisecting: 5449 revisions left to test after this
> About ~16 test steps left [approximated]
> [e0b685d39a0404e7f87fb7b7808c3b37a115fe11] Updated contact info for
> CREDITS file
>
> The real number of test points might be higher than this, if the tree
> layout is unlucky, or it might be less than this if the user manually
> narrows the bisection window to a suspected set of commits - but that's
> OK - most kernel testers use the default variant and the message is
> clear enough that it's only an estimation.
I will have a look at that. It might be easy to do.
Thanks,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-06 5:23 ` Christian Couder
@ 2009-02-07 4:41 ` Christian Couder
2009-02-07 12:55 ` David Symonds
0 siblings, 1 reply; 18+ messages in thread
From: Christian Couder @ 2009-02-07 4:41 UTC (permalink / raw)
To: Ingo Molnar
Cc: git, Junio C Hamano, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
Le vendredi 6 février 2009, Christian Couder a écrit :
> Le jeudi 5 février 2009, Ingo Molnar a écrit :
>
> > - Feature: better "git bisect next" support.
>
> You probably mean "git bisect skip" here.
>
> > Sometimes a commit wont build. In that case we have "git bisect
> > next", but last i checked that only jumps a single commit - and build
> > breakages often have a large scope - full trees that got merged
> > upstream, etc. Most of the time those build breakages are uninteresting
> > and the build-broken window does not contain the bad commit.
> >
> > So it would be nice to have a "git bisect next --left=20%" type of
> > feature. This would jump 20% commits to the "left" from the bisection
> > point, towards the 'known bad' set of commits, but still within the
> > bisection window.
> >
> > Similarly, "git bisect next --right=20%" would jump towards the
> > known-good edge of the bisection window (but still within the bisection
> > window).
>
> In the following thread, H. Peter Anvin suggested an algorithm to deal
> with this kind of problem:
>
> http://thread.gmane.org/gmane.comp.version-control.git/98164/
>
> And I suggested a simpler one, that might be implemented without having
> to port "git bisect skip" code to C first, but I did not work on it yet.
>
> > Currently when i hit a build error during auto-bisection, it aborts
> > and i have to intervene manually. But with a bigger jump distance i
> > could use git-bisect-next reliably in scripts too.
> >
> > Likewise, users too hit build breakages often, and find it hard to
> > get out of the window of breakage. With the high-order tree structure
> > of the kernel repository that is rather non-intuitive to do as well,
> > and often people make mistakes and test the wrong commit.
>
> I am working slowly on "git replace" these days and, if everything goes
> well, it should make it possible to use "replace" refs when bisecting, so
> that people could bisect on commit trees where many breakages have been
> removed. And as refs can be shared, this means that users and developers
> should be able to easily share these improved trees.
>
> Another way to work around breakages could be to have a list of commits
> and ranges of commits that should always be skipped and always pass them
> to "git bisect skip" before using "git bisect run". Something like that
> perhaps:
>
> $ git bisect start <bad> <good>
> $ git bisect skip $(cat always_skipped.txt)
> $ git bisect run ./my_test_script.sh
It might be useful to have a list of always good commits too, and use it
like this:
$ git bisect start <bad> <good> $(cat always_good.txt)
$ git bisect skip $(cat always_skipped.txt)
$ git bisect run ./my_test_script.sh
or you may want to use grafts in your bisection repository. See the
following thread about bisection breakage in the btrfs history:
http://thread.gmane.org/gmane.comp.version-control.git/105186/
Regards,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-07 4:41 ` Christian Couder
@ 2009-02-07 12:55 ` David Symonds
2009-02-07 18:09 ` Christian Couder
2009-02-07 18:16 ` Junio C Hamano
0 siblings, 2 replies; 18+ messages in thread
From: David Symonds @ 2009-02-07 12:55 UTC (permalink / raw)
To: Christian Couder
Cc: Ingo Molnar, git, Junio C Hamano, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder
<chriscool@tuxfamily.org> wrote:
> It might be useful to have a list of always good commits too, and use it
> like this:
>
> $ git bisect start <bad> <good> $(cat always_good.txt)
> $ git bisect skip $(cat always_skipped.txt)
> $ git bisect run ./my_test_script.sh
Your test script could just do this at its start instead:
if cat always_good.txt | grep $(rev-parse HEAD); then
exit 0
elif cat always_skipped.txt | grep $(rev-parse HEAD); then
exit 125
fi
Dave.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-07 12:55 ` David Symonds
@ 2009-02-07 18:09 ` Christian Couder
2009-02-07 18:16 ` Junio C Hamano
1 sibling, 0 replies; 18+ messages in thread
From: Christian Couder @ 2009-02-07 18:09 UTC (permalink / raw)
To: David Symonds
Cc: Ingo Molnar, git, Junio C Hamano, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
Le samedi 7 février 2009, David Symonds a écrit :
> On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder
>
> <chriscool@tuxfamily.org> wrote:
> > It might be useful to have a list of always good commits too, and use
> > it like this:
> >
> > $ git bisect start <bad> <good> $(cat always_good.txt)
> > $ git bisect skip $(cat always_skipped.txt)
> > $ git bisect run ./my_test_script.sh
>
> Your test script could just do this at its start instead:
>
> if cat always_good.txt | grep $(rev-parse HEAD); then
> exit 0
This won't work, because when you give one good rev, you say that all the
ancestors of this rev are good (not just that the rev you give is good).
> elif cat always_skipped.txt | grep $(rev-parse HEAD); then
> exit 125
> fi
If you have a range like v1..v2 in "always_skipped.txt" this won't work.
And anyway it may be less efficient because it may perform many useless
checkouts.
Regards,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-07 12:55 ` David Symonds
2009-02-07 18:09 ` Christian Couder
@ 2009-02-07 18:16 ` Junio C Hamano
2009-02-09 12:19 ` Ingo Molnar
1 sibling, 1 reply; 18+ messages in thread
From: Junio C Hamano @ 2009-02-07 18:16 UTC (permalink / raw)
To: David Symonds
Cc: Christian Couder, Ingo Molnar, git, Andreas Ericsson, Jeff Garzik,
Linus Torvalds, Bill Lear, Jon Seymour, Johannes Schindelin
David Symonds <dsymonds@gmail.com> writes:
> On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder
> <chriscool@tuxfamily.org> wrote:
>
>> It might be useful to have a list of always good commits too, and use it
>> like this:
>>
>> $ git bisect start <bad> <good> $(cat always_good.txt)
>> $ git bisect skip $(cat always_skipped.txt)
>> $ git bisect run ./my_test_script.sh
>
> Your test script could just do this at its start instead:
>
> if cat always_good.txt | grep $(rev-parse HEAD); then
> exit 0
> elif cat always_skipped.txt | grep $(rev-parse HEAD); then
> exit 125
> fi
Don't cat a file into grep, please.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-07 18:16 ` Junio C Hamano
@ 2009-02-09 12:19 ` Ingo Molnar
2009-02-09 13:15 ` Johannes Schindelin
0 siblings, 1 reply; 18+ messages in thread
From: Ingo Molnar @ 2009-02-09 12:19 UTC (permalink / raw)
To: Junio C Hamano
Cc: David Symonds, Christian Couder, git, Andreas Ericsson,
Jeff Garzik, Linus Torvalds, Bill Lear, Jon Seymour,
Johannes Schindelin
* Junio C Hamano <gitster@pobox.com> wrote:
> David Symonds <dsymonds@gmail.com> writes:
>
> > On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder
> > <chriscool@tuxfamily.org> wrote:
> >
> >> It might be useful to have a list of always good commits too, and use it
> >> like this:
> >>
> >> $ git bisect start <bad> <good> $(cat always_good.txt)
> >> $ git bisect skip $(cat always_skipped.txt)
> >> $ git bisect run ./my_test_script.sh
> >
> > Your test script could just do this at its start instead:
> >
> > if cat always_good.txt | grep $(rev-parse HEAD); then
> > exit 0
> > elif cat always_skipped.txt | grep $(rev-parse HEAD); then
> > exit 125
> > fi
>
> Don't cat a file into grep, please.
I do it all the time not because i dont know about grep's ability
to take a file parameter, but because this way it's just a
special-case of command piping and i can inject other commands as
i extend/edit the command line interactively, etc.
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-09 12:19 ` Ingo Molnar
@ 2009-02-09 13:15 ` Johannes Schindelin
2009-02-09 21:03 ` David Symonds
0 siblings, 1 reply; 18+ messages in thread
From: Johannes Schindelin @ 2009-02-09 13:15 UTC (permalink / raw)
To: Ingo Molnar
Cc: Junio C Hamano, David Symonds, Christian Couder, git,
Andreas Ericsson, Jeff Garzik, Linus Torvalds, Bill Lear,
Jon Seymour
Hi,
On Mon, 9 Feb 2009, Ingo Molnar wrote:
> * Junio C Hamano <gitster@pobox.com> wrote:
>
> > David Symonds <dsymonds@gmail.com> writes:
> >
> > > On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder
> > > <chriscool@tuxfamily.org> wrote:
> > >
> > >> It might be useful to have a list of always good commits too, and use it
> > >> like this:
> > >>
> > >> $ git bisect start <bad> <good> $(cat always_good.txt)
> > >> $ git bisect skip $(cat always_skipped.txt)
> > >> $ git bisect run ./my_test_script.sh
> > >
> > > Your test script could just do this at its start instead:
> > >
> > > if cat always_good.txt | grep $(rev-parse HEAD); then
> > > exit 0
> > > elif cat always_skipped.txt | grep $(rev-parse HEAD); then
> > > exit 125
> > > fi
> >
> > Don't cat a file into grep, please.
>
> I do it all the time not because i dont know about grep's ability
> to take a file parameter, but because this way it's just a
> special-case of command piping and i can inject other commands as
> i extend/edit the command line interactively, etc.
I think Junio meant using '< $file' type redirection, to avoid an
unnecessary fork(). (Good habit, avoiding fork()s...)
Ciao,
Dscho
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-09 13:15 ` Johannes Schindelin
@ 2009-02-09 21:03 ` David Symonds
2009-02-10 6:12 ` Christian Couder
0 siblings, 1 reply; 18+ messages in thread
From: David Symonds @ 2009-02-09 21:03 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Ingo Molnar, Junio C Hamano, Christian Couder, git,
Andreas Ericsson, Jeff Garzik, Linus Torvalds, Bill Lear,
Jon Seymour
On Tue, Feb 10, 2009 at 12:15 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> I think Junio meant using '< $file' type redirection, to avoid an
> unnecessary fork(). (Good habit, avoiding fork()s...)
Yes, I usually pass filenames to grep; this time I was
copy-and-pasting parts of the original script. But my point still
remains: it seems it would be cleaner to do this kind of
always-good-filtering in the test script rather than make git-bisect
more complex.
Dave.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Article about "git bisect run" on LWN
2009-02-09 21:03 ` David Symonds
@ 2009-02-10 6:12 ` Christian Couder
0 siblings, 0 replies; 18+ messages in thread
From: Christian Couder @ 2009-02-10 6:12 UTC (permalink / raw)
To: David Symonds
Cc: Johannes Schindelin, Ingo Molnar, Junio C Hamano, git,
Andreas Ericsson, Jeff Garzik, Linus Torvalds, Bill Lear,
Jon Seymour
Le lundi 9 février 2009, David Symonds a écrit :
> On Tue, Feb 10, 2009 at 12:15 AM, Johannes Schindelin
>
> <Johannes.Schindelin@gmx.de> wrote:
> > I think Junio meant using '< $file' type redirection, to avoid an
> > unnecessary fork(). (Good habit, avoiding fork()s...)
>
> Yes, I usually pass filenames to grep; this time I was
> copy-and-pasting parts of the original script. But my point still
> remains: it seems it would be cleaner to do this kind of
> always-good-filtering in the test script rather than make git-bisect
> more complex.
But it's not so easy and not efficient to do this kind of filtering in the
test script.
Maybe something cleaner could be to have "always good" and "always skipped"
refs that are automatically used each time you bisect.
For example, "git bisect good --always" and "git bisect skip --always" could
add refs in "refs/bisect/always/" even when you are not bisecting, and
these refs would not be removed on reset.
But in the end, I think this does not really fix the problem. If you need
such hacks, it means that your commit DAG is not easily bisectable. For
example if you must skip too many commits, then too often bisection will
not be able to point to a first bad commit because it won't be able to tell
between many skipped commits.
That's why I think the proper fix is to have a way to bisect on a fixed up
commit DAG where you can just get rid of old annoying bugs and of history
parts that are not relevant.
Regards,
Christian.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2009-02-10 6:14 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 6:47 Article about "git bisect run" on LWN Christian Couder
2009-02-05 13:34 ` Bill Lear
2009-02-05 14:13 ` Ingo Molnar
2009-02-06 2:42 ` david
2009-02-06 1:46 ` Ingo Molnar
2009-02-06 1:52 ` Ingo Molnar
2009-02-06 5:23 ` Christian Couder
2009-02-07 4:41 ` Christian Couder
2009-02-07 12:55 ` David Symonds
2009-02-07 18:09 ` Christian Couder
2009-02-07 18:16 ` Junio C Hamano
2009-02-09 12:19 ` Ingo Molnar
2009-02-09 13:15 ` Johannes Schindelin
2009-02-09 21:03 ` David Symonds
2009-02-10 6:12 ` Christian Couder
2009-02-05 16:23 ` Jonathan Corbet
2009-02-05 20:54 ` Christian Couder
2009-02-06 2:49 ` david
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).