2002-06-27 19:22:24

by Chaoyang Deng

[permalink] [raw]
Subject: kernel BUG

Hi,

I am working on an iSCSI target driver with a Fibre Channel disk. After I
updated my OS to linux7.3 with kernel 2.4.18-3, I got problem: my driver
will crash my box. I am not sure if it is a bug in my code or in the
Qlogic Fibre Channel driver or in the kernel. Could anyone give me a hint?

The kernel log file is as following:

Jun 27 14:38:11 sierra kernel: ------------[ cut here ]------------
Jun 27 14:38:11 sierra kernel: kernel BUG at /usr/src/build/90234-i686/BUILD/kernel-2.4.18/linux/include/asm/pci.h:153!
Jun 27 14:38:11 sierra kernel: invalid operand: 0000
Jun 27 14:38:11 sierra kernel: iscsi_target scsi_target es1371 ac97_codec gameport soundcore i810 agpgart bin
Jun 27 14:38:11 sierra kernel: CPU: 0
Jun 27 14:38:11 sierra kernel: EIP: 0010:[<c8832442>] Not tainted
Jun 27 14:38:11 sierra kernel: EFLAGS: 00010082
Jun 27 14:38:11 sierra kernel:
Jun 27 14:38:11 sierra kernel: EIP is at qla2x00_64bit_start_scsi [qla2200] 0xc2 (2.4.18-3)
Jun 27 14:38:11 sierra kernel: eax: 00000059 ebx: 00000000 ecx: 00000001 edx: 00002930
Jun 27 14:38:11 sierra kernel: esi: 00000001 edi: 00000001 ebp: c7e30084 esp: c5849e58
Jun 27 14:38:11 sierra kernel: ds: 0018 es: 0018 ss: 0018
Jun 27 14:38:11 sierra kernel: Process scsi_target_thread
Jun 27 14:38:11 sierra kernel: (pid: 1744, stackpage=c5849000)
Jun 27 14:38:11 sierra kernel: Stack: c883ebc0 00000099 00000000 000000d1 66692020 c7e0e500 c7c05e60 00000000
Jun 27 14:38:11 sierra kernel: 00000001 c78fe000 00292264 0000d800 c78ff1a0 c7952000 c7e30084 c7952004
Jun 27 14:38:11 sierra kernel: c8836812 c78ff1a0 c78ff1a0 c7e30084 00000000 c7953800 c882f445 c7e30084
Jun 27 14:38:11 sierra kernel: Call Trace: [<c883ebc0>] .rodata.str1.32 [qla2200] 0x60
Jun 27 14:38:11 sierra kernel: [<c8836812>] qla2x00_next [qla2200] 0xa2
Jun 27 14:38:11 sierra kernel: [<c882f445>] qla2100_queuecommand [qla2200] 0x295
Jun 27 14:38:11 sierra kernel: [<c880d679>] scsi_dispatch_cmd [scsi_mod] 0x1e9
Jun 27 14:38:11 sierra kernel: [<c8813a50>] scsi_old_done [scsi_mod] 0x0
Jun 27 14:38:11 sierra kernel: [<c8815364>] scsi_request_fn [scsi_mod] 0x2d4
Jun 27 14:38:11 sierra kernel: [<c8814744>] __scsi_insert_special [scsi_mod] 0x64
Jun 27 14:38:11 sierra kernel: [<c881479a>] scsi_insert_special_req [scsi_mod] 0x1a
Jun 27 14:38:11 sierra kernel: [<c880d964>] scsi_do_req_Rc63a25cd [scsi_mod] 0x174
Jun 27 14:38:11 sierra kernel: [<c8e67360>] te_cmnd_processed [scsi_target] 0x0
Jun 27 14:38:11 sierra kernel: [<c8e67349>] handle_cmd [scsi_target] 0x249
Jun 27 14:38:11 sierra kernel: [<c8e67360>] te_cmnd_processed [scsi_target] 0x0
Jun 27 14:38:11 sierra kernel: [<c8e66937>] scsi_target_process_thread [scsi_target] 0x267
Jun 27 14:38:11 sierra kernel: [<c8e69358>] target_data [scsi_target] 0x18
Jun 27 14:38:11 sierra kernel: [<c8e6892e>] .rodata.str1.1 [scsi_target] 0x6e
Jun 27 14:38:11 sierra kernel: [<c8e676ab>] .text.lock.KBUILD_BASENAME [scsi_target] 0x2d
Jun 27 14:38:11 sierra kernel: [<c8e666d0>] scsi_target_process_thread [scsi_target] 0x0
Jun 27 14:38:11 sierra kernel: [<c0107136>] kernel_thread [kernel] 0x26
Jun 27 14:38:11 sierra kernel: [<c8e666d0>] scsi_target_process_thread [scsi_target] 0x0



+----------------------------------------------------+
| Chaoyang Deng -- [email protected] -- 603.868.1908 |
| iSCSI Consortium, InterOperability lab (IOL), UNH |
| http://www.iol.unh.edu/consortiums/iscsi/ |
| 204 Forest Park, Durham, NH 03824 -- 603.862.3470 |
+----------------------------------------------------+


2002-06-28 05:56:48

by Austin Gonyou

[permalink] [raw]
Subject: Re: kernel BUG

My recommendation for this is to *not* use the in-kernel qla2xxx driver.
Not that it's necessarily bad mind you, but much new hardware doesn't
seem to like it. I've locked up a box several times using it. Instead, I
recommend that you go to qlogic's site and get 6.0.27 and try it. It's
much faster than the previous drivers, and has been very stable and
compile's with no warnings ever, at least in my scenario.

I recently had an issue with a QL2xxx driver, some storage, and LUNs. My
issue turned out to be a blacklist issue, but, I got a lot of info from
the Qlogic folks as well, regarding which driver should be used today.

Hope this helps.

On Thu, 2002-06-27 at 14:23, Chaoyang Deng wrote:
> Hi,
>
> I am working on an iSCSI target driver with a Fibre Channel disk. After I
> updated my OS to linux7.3 with kernel 2.4.18-3, I got problem: my driver
> will crash my box. I am not sure if it is a bug in my code or in the
> Qlogic Fibre Channel driver or in the kernel. Could anyone give me a hint?

--
Austin Gonyou <[email protected]>

2002-06-28 13:59:51

by Mike Black

[permalink] [raw]
Subject: Re: kernel BUG

FYI...6.0.27 is only for QLA2200 and QLA23XX. I'm using 4.0.27beta for the QLA2100

It's hard to find on their website though (took a quick look just now and couldn't find it again).

----- Original Message -----
From: "Austin Gonyou" <[email protected]>
To: "Chaoyang Deng" <[email protected]>
Cc: <[email protected]>
Sent: Friday, June 28, 2002 1:58 AM
Subject: Re: kernel BUG


> My recommendation for this is to *not* use the in-kernel qla2xxx driver.
> Not that it's necessarily bad mind you, but much new hardware doesn't
> seem to like it. I've locked up a box several times using it. Instead, I
> recommend that you go to qlogic's site and get 6.0.27 and try it. It's
> much faster than the previous drivers, and has been very stable and
> compile's with no warnings ever, at least in my scenario.
>
> I recently had an issue with a QL2xxx driver, some storage, and LUNs. My
> issue turned out to be a blacklist issue, but, I got a lot of info from
> the Qlogic folks as well, regarding which driver should be used today.
>
> Hope this helps.
>
> On Thu, 2002-06-27 at 14:23, Chaoyang Deng wrote:
> > Hi,
> >
> > I am working on an iSCSI target driver with a Fibre Channel disk. After I
> > updated my OS to linux7.3 with kernel 2.4.18-3, I got problem: my driver
> > will crash my box. I am not sure if it is a bug in my code or in the
> > Qlogic Fibre Channel driver or in the kernel. Could anyone give me a hint?
>
> --
> Austin Gonyou <[email protected]>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2002-06-28 19:24:48

by ew

[permalink] [raw]
Subject: Re: kernel BUG

On Thu, 2002-06-27 at 14:23, Chaoyang Deng wrote:
>
>Hi,
>
>I am working on an iSCSI target driver with a Fibre Channel disk. After I
>updated my OS to linux7.3 with kernel 2.4.18-3, I got problem: my driver
>will crash my box. I am not sure if it is a bug in my code or in the
>Qlogic Fibre Channel driver or in the kernel. Could anyone give me a hint?
>

The BUG() is popping in include/asm/pci.h:pci_map_sg(). If either sg_list.address
or sg_list.page is not NULL, or both are NULL the BUG() is called. The reason
for this is around 2.4.13-pre2 bounce buffers along with a nasty memcpy where added
in linux/drivers/scsi/scsi_lib.c:scsi_io_completion() to scatterlists for HighMemIO
support, along with two extra members (page & offset) to struct scatterlist in
include/linux/scatterlist.h.

Eric Weiss

___________________________________________________________

http://webmail.unixpunx.org - Free mail for hackers, free mail for the punks.

2002-06-28 19:52:37

by ew

[permalink] [raw]
Subject: Re: kernel BUG

On Thu, 2002-06-27 at 14:23, Chaoyang Deng wrote:
>
>Hi,
>
>I am working on an iSCSI target driver with a Fibre Channel disk. After I
>updated my OS to linux7.3 with kernel 2.4.18-3, I got problem: my driver
>will crash my box. I am not sure if it is a bug in my code or in the
>Qlogic Fibre Channel driver or in the kernel. Could anyone give me a hint?
>

The BUG() is popping in include/asm/pci.h:pci_map_sg(). If either sg_list.address
or sg_list.page is not NULL, or both are NULL the BUG() is called. The reason
for this is around 2.4.13-pre2 bounce buffers along with a nasty memcpy where added
in linux/drivers/scsi/scsi_lib.c:scsi_io_completion() to scatterlists for HighMemIO
support, along with two extra members (page & offset) to struct scatterlist in
include/linux/scatterlist.h.

Eric Weiss

___________________________________________________________

http://webmail.unixpunx.org - Free mail for hackers, free mail for the punks.