From: Ingo Molnar <mingo@elte.hu>
To: git@vger.kernel.org
Subject: git-bisect annoyances
Date: Thu, 10 Apr 2008 13:47:39 +0200 [thread overview]
Message-ID: <20080410114739.GA15229@elte.hu> (raw)
In-Reply-To: <20080409101428.GA2637@elte.hu>
Ok, just in case i dont bore people with "stupid user" experiences and
logs of sessions of confusion, here's another session i just had with
Git.
This time it's with our good friend git-bisect - which i thought to
master pretty well and which i already used successfully to bisect
kernel bugs up to a hundred times already (at least).
The 'v' repository is a vanilla clone of Linus's upstream linux-2.6.git
kernel tree with no other modifications done to it.
dione:~> git-clone v linux-tmp4
Initialized empty Git repository in /home/mingo/linux-tmp4/.git/
0 blocks
Checking out files: 100% (23809/23809), done.
dione:~> cd linux-tmp4/
dione:~/linux-tmp4> ls
COPYING MAINTAINERS arch fs kernel samples usr
CREDITS Makefile block include lib scripts virt
Documentation README crypto init mm security
Kbuild REPORTING-BUGS drivers ipc net sound
#
# ok, so far so good. done this a thousand times before.
#
# Now lets check out v2.6.24 and check whether the bug i'm interested
# in triggers on v2.6.24. I dont create an extra branch for it, because
# this is pure temporary work, i use a plain git-checkout as a
# throwaway temporary branch:
#
dione:~/linux-tmp4> git-checkout v2.6.24
Note: moving to "v2.6.24" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 4991408... Linux 2.6.24
#
# i build that kernel and boot it - the bug doesnt trigger - good.
# We've got all prerequisites for a bisection session - a 'good' kernel
# [v2.6.24] and a 'bad' kernel [HEAD].
#
#
dione:~/linux-tmp4> git-bisect start
fatal: ref HEAD is not a symbolic ref
won't bisect on seeked tree
#
# Hm. It's not a symbolic ref, and git-bisect just wont do it. Ok but
# then what, and what can the user do to progress? It should be rather
# clear to Git what i'm intending to do here. I'm not interested in
# HEAD at all, i want to start bisection and i'll feed the good/bad
# points to git-bisect - once it lets me do that.
#
# Ok, lets see where we are:
#
dione:~/linux-tmp4> git-branch -a
* (no branch)
master
origin/HEAD
origin/master
origin/new_branch
#
# So perhaps this new, unnamed branch is what is causing the trouble?
# Lets try a specific branch then:
#
dione:~/linux-tmp4> git-checkout master
Previous HEAD position was 4991408... Linux 2.6.24
Switched to branch "master"
dione:~/linux-tmp4> git-bisect start
won't bisect on seeked tree
#
# Hm, still no go. Lets see what git-bisect has to offer:
#
dione:~/linux-tmp4> git-bisect
Usage: /usr/bin/git-bisect
[start|bad|good|skip|next|reset|visualize|replay|log|run]
#
# Ah, it has a reset thing, lets try it:
#
dione:~/linux-tmp4> git-bisect reset
Note: moving to "49914084e797530d9baaf51df9eda77babc98fa8" which isn't a
local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 4991408... Linux 2.6.24
dione:~/linux-tmp4> git-bisect start
fatal: ref HEAD is not a symbolic ref
#
# hm, still no go. I'm not interested in a new branch at all, but i
# want to bisect, so lets try what was suggested then and name the
# branch:
#
dione:~/linux-tmp4> git-checkout -b tmp
Switched to a new branch "tmp"
#
# Looks good so far - can i bisect?
#
dione:~/linux-tmp4> git-bisect start
won't bisect on seeked tree
#
# Hm, still no go. Ok, lets forget this whole temporary branch thing
# that looked good and try a more pristine state:
#
dione:~/linux-tmp4> git-checkout -b tmp2 master
Previous HEAD position was 4991408... Linux 2.6.24
Switched to a new branch "tmp2"
dione:~/linux-tmp4> git-bisect start
#
# Halleluya! While i have typed much more than i wanted, and ended up
# with two extra branches that i have to throw away, it seems to be
# working! Although the command printing nothing is not really
# reassuring - did it really do something?
#
# Ok, lets get the bisection going now:
#
dione:~/linux-tmp4> git-bisect good v2.6.24 bad HEAD
dione:~/linux-tmp4>
#
# Hm, no indication about what happened, and no "middle" bisection
# point offered. No way to figure out what's wrong.
#
# Ok, backtrack one more step - something's wrong here. Lets start
# again with a completely new tree:
#
dione:~> git-clone v linux-tmp5
Initialized empty Git repository in /home/mingo/linux-tmp5/.git/
0 blocks
Checking out files: 100% (23809/23809), done.
dione:~> cd linux-tmp5/
dione:~/linux-tmp5> git-checkout -b tmp master
Switched to a new branch "tmp"
dione:~/linux-tmp5> git-bisect start good v2.6.24
dione:~/linux-tmp5> cd
dione:~> cd linux-tmp5/
dione:~/linux-tmp5> git-bisect start good v2.6.24 bad master
dione:~/linux-tmp5>
#
# Hm, nothing. Ho hum. Do i suck this much? One more tree than i wanted
# and three more branches that i wanted and still no bisection?
#
# Ah, i must have switched the arguments?
#
dione:~/linux-tmp5> git-bisect start v2.6.24 good master bad
won't bisect on seeked tree
#
# Nope.
#
dione:~/linux-tmp5> git-bisect visualize
You need to give me at least one good and one bad revisions.
(You can use "git bisect bad" and "git bisect good" for that.)
dione:~/linux-tmp5> git bisect bad HEAD
dione:~/linux-tmp5> git bisect good v2.6.24
Bisecting: -1 revisions left to test after this
[eb36f4fc019835cecf0788907f6cab774508087b] fix oops on rmmod capidrv
#
# -1 revisions left to test? Ouch ...
#
# But why did "git bisect" make a difference to "git-bisect" ?
# Lets see whether it's all from the same package:
#
dione:~> type git
git is hashed (/usr/bin/git)
dione:~> type git-bisect
git-bisect is hashed (/usr/bin/git-bisect)
dione:~> rpm -qf /usr/bin/git-bisect
git-core-1.5.4.3-2.fc8
dione:~> rpm -qf /usr/bin/git
git-core-1.5.4.3-2.fc8
#
# Yup, it is. 20 minutes spent on this already and no bisection.
# I really suck today :-)
#
#
# So i started suspecting my kernel and my hardware. Are timestamps
# maybe messed up and confusing Git? Since the commands dont return
# success nor failure i was unsure what Git thought about my attempts.
#
# So i rebooted the box and created a new tree. No go.
#
#
# Just to be sure i also waited through a full git-fsck, only 10
# minutes runtime:
#
dione:~/linux-tmp4> git-fsck --full --strict
dangling commit f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed
dione:~/linux-tmp4>
#
# [ Sidenote #1: git-fsck is such a heavy operation that it should
# really return some indication by default that it's all appears OK.
# A user typically only runs git-fsck if in deep doubt about some
# git detail - so while silence is often good for a comment, it's
# counter-intuitive here. Especially since the "breakage" of
# git-bisect is "silence" too, so the user is unable to trust these
# different modal forms of silence and gets frustrated ... ]
#
#
# [ Sidenote #2: git-fsck --full --strict is slow and we always knew
# this - it's a last-ditch thing for the truly hopeless. But this is
# a 3.2 GHz quad box that is only 25% utilized during git-fsck but
# takes 10 minutes to finish. Presumably git-fsck could run multiple
# threads/tasks to be sped up? Making the slowest possible operation
# of a tool significantly faster is a good way to reduce user
# frustration IMO. A user is already frustrated enough when he tries
# --full --strict. And i _bet_ a parallel version of git-fsck would
# also be an fantastic bad-RAM checker ;-) ]
#
#
# Then, many other silly attempts later and at linux-tmp8, by chance -
# 30 minutes down the line - i got it going:
#
# I updated my Linus tree on the (rather pathetic) theory that maybe a
# specific layout of the repo breaks bisection - and that seems to have
# made a difference:
#
dione:~/linux-tmp8> git-checkout -b tmp2 master
Switched to a new branch "tmp2"
dione:~/linux-tmp8> git-bisect start
won't bisect on seeked tree
dione:~/linux-tmp8> git-bisect reset
Switched to branch "master"
dione:~/linux-tmp8> git-bisect bad master
You need to start by "git bisect start"
Do you want me to do it for you [Y/n]? Y
dione:~/linux-tmp8> git-bisect good v2.6.24
Bisecting: 6270 revisions left to test after this
[4814bdbd590e835ecec2d5e505165ec1c19796b2] [NETNS]: Lookup in FIB
semantic hashes taking into account the namespace.
#
# But i dont understand why. Before updating Linus's tree i saved away
# the commit ID that showed the breakage, just in case it matters:
#
commit 7180c4c9e09888db0a188f729c96c6d7bd61fa83
Merge: 4c3b01f... 869ab51...
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Mon Apr 7 19:15:35 2008 -0700
#
# .. but couldnt reproduce this weirdness with specifically checking
# out 7180c4c9e09888db0a188f729c96c6d7bd61fa83. But i still have the
# linux-tmp4 repository that shows this behavior reliably. It's all
# quite weird. Either this repo is corrupted in some special way, or my
# hardware has some really strange runtime failure, or i'm missing
# something very obvious ;-)
#
#
# One more minor sidenote. Git-bisect creates its own branch:
#
dione:~/linux-tmp12> git-branch -a
* bisect
master
tmp
tmp2
origin/HEAD
origin/master
origin/new_branch
#
# So i assumed that i could get rid of that 'bisect' branch by doing
# the obvious: "git-bisect stop", but no go:
#
dione:~/linux-tmp12> git-bisect stop
Usage: /usr/bin/git-bisect [start|bad|good|skip|next|reset|visualize|replay|log|run]
#
# After some experimentation "git-bisect reset" did the trick - but
# it's a bit counter-intuitive IMO, because the logical extension of
# 'start' is 'stop', and i often use 'git-bisect reset' to just restart
# bisection anew. (it chimes in on 'restart')
#
#
# Ok, that's all for today. :-)
#
Ingo
next prev parent reply other threads:[~2008-04-10 11:48 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 10:14 git annoyances Ingo Molnar
2008-04-09 10:41 ` Björn Steinbrink
2008-04-09 14:57 ` Jeff King
2008-04-09 15:15 ` [PATCH] git-remote: show all remotes with "git remote show" Jeff King
2008-04-09 16:54 ` Johannes Schindelin
2008-04-10 10:56 ` Junio C Hamano
2008-04-09 20:07 ` Ingo Molnar
2008-04-10 19:59 ` Ingo Molnar
2008-04-09 17:08 ` git annoyances Avery Pennarun
2008-04-10 8:41 ` Karl Hasselström
2008-04-10 15:05 ` Avery Pennarun
2008-04-11 7:00 ` Karl Hasselström
2008-04-09 20:08 ` Friendly refspecs (Was: Re: git annoyances) Teemu Likonen
2008-04-09 20:32 ` Avery Pennarun
2008-04-09 20:34 ` Jeff King
2008-04-09 22:25 ` Teemu Likonen
2008-04-09 22:51 ` Jeff King
2008-04-10 0:03 ` Jeff King
2008-04-10 0:11 ` Jeff King
2008-04-10 7:51 ` Friendly refspecs Junio C Hamano
2008-04-10 8:03 ` Jeff King
[not found] ` <bd6139dc0804091616k53f4e0c1sf75aa9585c5a54c5@mail.gmail.com>
2008-04-10 0:33 ` Friendly refspecs (Was: Re: git annoyances) Jeff King
2008-04-10 7:58 ` Sverre Rabbelier
2008-04-13 9:31 ` Friendly refspecs Teemu Likonen
2008-04-13 9:34 ` [PATCH] Add examples section to 'git fetch' manual Teemu Likonen
2008-04-13 18:56 ` Junio C Hamano
2008-04-13 19:48 ` Matt Graham
2008-04-13 20:05 ` Teemu Likonen
2008-04-14 1:02 ` Junio C Hamano
2008-04-16 3:48 ` Friendly refspecs Jeff King
2008-04-16 4:25 ` Jeff King
2008-04-16 4:41 ` Junio C Hamano
2008-04-16 4:47 ` Jeff King
2008-04-16 15:42 ` Daniel Barkalow
2008-04-16 20:03 ` Junio C Hamano
2008-04-22 10:56 ` Jeff King
2008-04-22 16:52 ` Junio C Hamano
2008-04-22 17:19 ` Daniel Barkalow
2008-04-22 20:12 ` Jeff King
2008-04-22 20:05 ` Jeff King
2008-04-22 20:45 ` Junio C Hamano
2008-04-22 21:52 ` Jeff King
2008-04-23 4:24 ` Teemu Likonen
2008-04-23 5:52 ` Junio C Hamano
2008-04-23 6:24 ` Andreas Ericsson
2008-04-23 9:16 ` Jeff King
2008-04-23 9:21 ` Jeff King
2008-04-23 11:15 ` Teemu Likonen
2008-04-09 21:21 ` Junio C Hamano
2008-04-10 7:38 ` Teemu Likonen
2008-04-12 18:59 ` git annoyances Santiago Gala
2008-04-09 19:21 ` Daniel Barkalow
2008-04-09 20:41 ` Ingo Molnar
2008-04-10 14:08 ` Daniel Barkalow
2008-04-09 21:04 ` Junio C Hamano
2008-04-09 21:39 ` Jon Loeliger
2008-04-09 23:45 ` Nicolas Pitre
2008-04-09 21:45 ` Jeff King
2008-04-09 23:56 ` André Goddard Rosa
2008-04-10 19:45 ` Govind Salinas
2008-04-10 6:08 ` Jean-Christian de Rivaz
2008-04-10 8:19 ` Sverre Rabbelier
2008-04-10 11:47 ` Ingo Molnar [this message]
2008-04-11 5:41 ` git-bisect annoyances Christian Couder
2008-04-11 11:41 ` Ingo Molnar
2008-04-12 6:56 ` Christian Couder
2008-04-11 5:56 ` Junio C Hamano
2008-04-10 23:25 ` [PATCH] When a remote is added but not fetched, tell the user Gabriel
2008-04-11 15:21 ` Johannes Schindelin
2008-04-11 18:35 ` Gabriel
2008-04-11 18:39 ` [PATCH] Default to fetching a remote after adding it Gabriel
2008-04-11 19:17 ` Stephen Sinclair
2008-04-12 14:33 ` Johannes Schindelin
2008-04-12 15:13 ` Gabriel
2008-04-12 15:24 ` Johannes Schindelin
2008-04-11 19:08 ` [PATCH] When a remote is added but not fetched, tell the user Teemu Likonen
2008-04-11 21:39 ` Junio C Hamano
2008-04-11 22:35 ` Sverre Rabbelier
2008-04-11 23:15 ` Junio C Hamano
2008-04-11 23:20 ` Sverre Rabbelier
2008-04-15 3:15 ` Miles Bader
2008-04-11 19:29 ` [PATCH] Default to fetching a remote after adding it Gabriel
2008-04-11 19:36 ` Wincent Colaiuta
2008-04-11 19:46 ` Gabriel
2008-04-11 10:15 ` git annoyances Luciano Rocha
2008-04-11 10:27 ` Wincent Colaiuta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080410114739.GA15229@elte.hu \
--to=mingo@elte.hu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).