Re: DMA cache consistency bug introduced in 2.6.28 (Was: Re: [Fdutils] Cannot format floppies under kernel 2.6.*?)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Thursday, December 17, 2009 - 2:14 pm

On Thu, 17 Dec 2009, Alain Knaff wrote:

Ok. I don't think I even have any machines with floppy drives any more 
(one external USB drive somewhere gathering dust just in case I ever 
encounter a floppy again).


Ok, I was more thinking "we have a bugzilla with ten different people 
reporting this". If it's just a single machine, that's not going to be 
relevant.


Yeah, lspci (and generally only the northbridge and southbridge matters, 
the "ISA bridge" might technically be relevant, but since it's universally 
on the same die as the southbridge, I left it in there just for kicks).


I guess it could simply be a floppy controller bug too, triggered by some 
random timing difference or innocuous-looking change.


Only the "it doesn't work on xyz" is likely interesting. The machines it 
works on are probably uninteresting statistically.


You'd need a git tree that contains both the working and non-working 
versions, and then literally just do

	git bisect start
	git bisect good <known good version number here>
	git bisect bad <known bad version here>

and it will give you a commit to try. Compile, test, see if it's good or 
bad, and do

	git bisect [good|bad]

depending on the result. Rinse and repeat (depending on how tight the 
initial good/bad commits were, it will need 10-15 kernel tests).

So in this case, since apparently 2.6.27.41 is good, and 2.6.28 is not, it 
would be something like this:

	# clone hpa's tree that has all the stable releases in one place
	git clone git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-allstable.git

	cd linux-2.6-allstable
	git bisect start
	git bisect bad v2.6.28
	git bisect good v2.6.27.41

and off you go.

NOTE! Bisection depends very much on the bug being 100% reproducible. If 
you ever mark a good kernel bad (because you messed up) or a bad kernel 
good (because the bug wasn't 100% reproducible, so you _thought_ it was 
good even though the bug was present and just happened to hide), the end 
result of the bisect will be totally unreliable and seriously screwed up.

So after a successful bisect, it is usually a good idea to try to go back 
to the original known-bad kernel, and then revert the commit that was 
indicated as the bad one (assuming the revert works - it could be that the 
bad one ends up being fundamental to other commits after it), and test 
that yes, that really fixes the bug.

It gets more complicated if the bisect hits kernels that you can't test 
because they have _unrelated_ issues on that machine (compile failures or 
just other bugs that hide the actual floppy behavior), but generally 
bisection is pretty simple. "man git-bisect" does have some extra 
pointers.

So git bisect may be somewhat time-consuming and mindless, but for 
reliably triggering bugs where nobody really knows what caused the bug it 
is a _really_ convenient thing to do. The only thing you need is a 
reliably triggering test-case, and some time.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: DMA cache consistency bug introduced in 2.6.28, Krzysztof Halasa, (Thu Dec 17, 11:21 am)
Re: DMA cache consistency bug introduced in 2.6.28 (Was: R ..., Linus Torvalds, (Thu Dec 17, 2:14 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Krzysztof Halasa, (Fri Dec 18, 8:01 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6. ..., Pallipadi, Venkatesh, (Tue Dec 22, 4:37 pm)
RE: [Fdutils] DMA cache consistency bug introduced in 2.6. ..., Pallipadi, Venkatesh, (Wed Dec 23, 8:10 am)
RE: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Wed Dec 23, 10:19 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Wed Dec 23, 10:41 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Linus Torvalds, (Wed Dec 23, 11:01 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Wed Dec 23, 11:11 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Wed Dec 23, 12:18 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Wed Dec 23, 12:35 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Wed Dec 23, 1:30 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Wed Dec 23, 2:34 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Arjan van de Ven, (Fri Dec 25, 5:21 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Arjan van de Ven, (Sat Dec 26, 2:38 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Mon Dec 28, 1:54 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Fri Jan 8, 10:42 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Mon Jan 11, 5:19 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Tue Jan 12, 2:04 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Pallipadi, Venkatesh, (Thu Jan 14, 7:01 pm)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Fri Jan 15, 2:39 am)
Re: [Fdutils] DMA cache consistency bug introduced in 2.6.28, Mark Hounschell, (Fri Jan 15, 11:02 am)
[PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Pallipadi, Venkatesh, (Thu Jan 21, 12:09 pm)
[tip:x86/urgent] x86: Disable HPET MSI on ATI SB700/SB800, tip-bot for Pallipad ..., (Fri Jan 22, 3:00 pm)
[tip:x86/urgent] x86: Disable HPET MSI on ATI SB700/SB800, tip-bot for Pallipad ..., (Fri Jan 22, 11:51 pm)
RE: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Yuhong Bao, (Sat Jan 23, 12:21 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Andreas Herrmann, (Mon Jan 25, 10:10 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Mark Hounschell, (Thu Jan 28, 2:17 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Mark Hounschell, (Thu Jan 28, 6:25 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Borislav Petkov, (Thu Jan 28, 6:41 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Mark Hounschell, (Thu Jan 28, 7:45 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Andreas Herrmann, (Mon May 17, 7:59 am)
RE: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Yuhong Bao, (Mon May 17, 8:10 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Linus Torvalds, (Mon May 17, 8:12 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Andreas Herrmann, (Mon May 17, 9:46 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Robert Hancock, (Mon May 17, 5:56 pm)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Linus Torvalds, (Mon May 17, 6:02 pm)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Robert Hancock, (Mon May 17, 6:06 pm)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Andi Kleen, (Tue May 18, 1:45 am)
Re: [PATCH] x86: Disable HPET MSI on ATI SB700/SB800, Robert Hancock, (Tue May 18, 4:22 pm)