Re: Latest git oopses during boot

Previous thread: [patch 4/4] make pr_debug() dynamic - update docs by Jason Baron on Thursday, February 7, 2008 - 5:13 pm. (3 messages)

Next thread: [PATCH 1/2] kmemcheck v3 by Vegard Nossum on Thursday, February 7, 2008 - 5:36 pm. (25 messages)
To: Harald Arnesen <skogtun.linux@...>
Cc: FUJITA Tomonori <tomof@...>, <akpm@...>, <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, <fujita.tomonori@...>
Date: Thursday, February 7, 2008 - 5:14 pm

Ok, I was wrong. The code really *does* compile to that insane

a3 14 00 00 00 mov %eax,0x14

by your compiler.

That's the

asc_dvc_varp->overrun_buf = kzalloc(ASC_OVERRUN_BSIZE, GFP_KERNEL);

thing, and gcc seems to have decided that it can statically prove that
asc_dvc_varp is NULL.

Quite frankly, I don't see that being true. But you have some patches in
your tree that I haven't followed, so.. Are you sure the patches applied
to the right spot? The patch I saw added that kzalloc() to the _end_ of
the function (long after asc_dvc_varp was initialized), maybe that one got
mis-applied?

Or maybe your compiler version is simply totally broken.

Linus
--

To: Linus Torvalds <torvalds@...>
Cc: Harald Arnesen <skogtun.linux@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, <fujita.tomonori@...>
Date: Thursday, February 7, 2008 - 5:39 pm

I'll try applying the patch to a freshly downloaded git-tree.

Shall I try another compiler? I have at least these two:

gcc version 3.4.6 (Ubuntu 3.4.6-6ubuntu2)
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

in addition to the self-compiled 4.2.3 I used for the tests.
--
Hilsen Harald.
--

To: Harald Arnesen <skogtun.harald@...>
Cc: Harald Arnesen <skogtun.linux@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, <fujita.tomonori@...>
Date: Thursday, February 7, 2008 - 6:12 pm

I would suggest a patch mis-application problem first (or possibly even
the patch itself being broken - I simply didn't look very closely at the
patch, but it *looked* ok).

If it's a compiler bug, it's a pretty big one, and quite frankly, I doubt
it. Compiler bugs do happen, but they are pretty rare, and they tend to
have more subtle effects than the one you see.

4.2.3? Really? That's pretty damn recent, and so almost totally untested.
That does make a compiler bug at least more likely.

So yes, if you already have other compilers installed, you should try
them. If it really is a compiler bug, it's a really bad one, and you would
want to let the gcc people know.

Still, I'd double-check that the

asc_dvc_varp->overrun_buf = kzalloc(ASC_OVERRUN_BSIZE, GFP_KERNEL);

line was added properly first. You should see it way after the point where
it did

asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;

to initialize it (and both statements should be inside a

if (ASC_NARROW_BOARD(boardp)) {

conditional - please check that the source code looks sane too).

Linus
--

To: Linus Torvalds <torvalds@...>
Cc: Harald Arnesen <skogtun.harald@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, <fujita.tomonori@...>
Date: Thursday, February 7, 2008 - 6:24 pm

I just re-downloaded an re-patched and re-compiled (with gcc 4.2.3),
and now the kernel boots. I must have screwed up the previous
patching.

It now works, with Fujita's patch applied.
--
Hilsen Harald
--

To: <skogtun.linux@...>
Cc: <torvalds@...>, <skogtun.harald@...>, <tomof@...>, <akpm@...>, <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, <fujita.tomonori@...>
Date: Thursday, February 7, 2008 - 8:10 pm

On Thu, 7 Feb 2008 23:24:00 +0100

Thanks Harald and Linus,

The bug has been in the advansys driver. 2.6.23 and 2.6.24 works just
because the size of Scsi_Host structure was multiples of 8. After
2.6.24, some patches change Scsi_Host structure and now the size is
not multiples of 8. So we hit this bug.

I'll resend the patch with a proper description.
--

Previous thread: [patch 4/4] make pr_debug() dynamic - update docs by Jason Baron on Thursday, February 7, 2008 - 5:13 pm. (3 messages)

Next thread: [PATCH 1/2] kmemcheck v3 by Vegard Nossum on Thursday, February 7, 2008 - 5:36 pm. (25 messages)