Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-11 Thread Pete Zaitcev
On Tue, 12 Feb 2008 10:46:12 +0900, FUJITA Tomonori <[EMAIL PROTECTED]> wrote:

> On a serious note, it seems that two scatter lists per request leaded
> to this bug. Can the scatter list in struct ub_request be removed?

Good question. It's an eyesore to be sure. The duplication exists
for the sake of retries combined with the separation of requests
from commands.

Please bear with me, if you're curious: commands can be launched
without requests (at probe time, for instance, or when sense is
requested). So, they need an s/g table. But then, the lifetime of
a request is greater than than of a command, in case of a retry
especially. Therefore a request needs the s/g table too.

So, one way to kill this duplication is to mandate that a
request existed for every command. It seemed like way more code
than just one memcpy() when I wrote it.

Another way would be to make commands flexible, e.g. sometimes with
just a virtual address and size, sometimes with an s/g table.
If you guys make struct scatterlist illegal to copy with memcpy
one day, this is probably what I'll do.

-- Pete
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-11 Thread FUJITA Tomonori
On Fri, 8 Feb 2008 23:46:19 -0800
Pete Zaitcev <[EMAIL PROTECTED]> wrote:

> On Tue, 5 Feb 2008 14:05:06 -0800, Andrew Morton <[EMAIL PROTECTED]> wrote:
> 
> > > > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
> 
> > I think ub.c is basically abandoned in favour of usb-storage.
> > If so, perhaps we should remove or disble ub.c?
> 
> Looks like it's just Tomo or Jens made a mistake when converting to
> the new s/g API. Nothing to be too concerned about. I know I should've
> reviewed their patch closer, but it seemed too simple...

I guess I can put the blame for this on Jens' commit (45711f1a) ;)

On a serious note, it seems that two scatter lists per request leaded
to this bug. Can the scatter list in struct ub_request be removed?

Thanks,

> -- Pete
> 
> Fix up the conversion to sg_init_table().
> 
> Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
> 
> --- a/drivers/block/ub.c
> +++ b/drivers/block/ub.c
> @@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct 
> request *rq)
>   if ((cmd = ub_get_cmd(lun)) == NULL)
>   return -1;
>   memset(cmd, 0, sizeof(struct ub_scsi_cmd));
> - sg_init_table(cmd->sgv, UB_MAX_REQ_SG);
>  
>   blkdev_dequeue_request(rq);
>  
> @@ -668,6 +667,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct 
> request *rq)
>   /*
>* get scatterlist from block layer
>*/
> + sg_init_table(&urq->sgv[0], UB_MAX_REQ_SG);
>   n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
>   if (n_elem < 0) {
>   /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */
> --
> 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/
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-08 Thread Pete Zaitcev
On Tue, 5 Feb 2008 14:05:06 -0800, Andrew Morton <[EMAIL PROTECTED]> wrote:

> > > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/

> I think ub.c is basically abandoned in favour of usb-storage.
> If so, perhaps we should remove or disble ub.c?

Looks like it's just Tomo or Jens made a mistake when converting to
the new s/g API. Nothing to be too concerned about. I know I should've
reviewed their patch closer, but it seemed too simple...

-- Pete

Fix up the conversion to sg_init_table().

Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>

--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct 
request *rq)
if ((cmd = ub_get_cmd(lun)) == NULL)
return -1;
memset(cmd, 0, sizeof(struct ub_scsi_cmd));
-   sg_init_table(cmd->sgv, UB_MAX_REQ_SG);
 
blkdev_dequeue_request(rq);
 
@@ -668,6 +667,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct 
request *rq)
/*
 * get scatterlist from block layer
 */
+   sg_init_table(&urq->sgv[0], UB_MAX_REQ_SG);
n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
if (n_elem < 0) {
/* Impossible, because blk_rq_map_sg should not hit ENOMEM. */
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Oliver Pinter
/usr/data/source/git/linux-2.6/drivers/block/ub.c: In function 'ub_end_rq':
/usr/data/source/git/linux-2.6/drivers/block/ub.c:819: error: implicit
declaration of function 'end_that_request_first'
/usr/data/source/git/linux-2.6/drivers/block/ub.c:820: error: implicit
declaration of function 'end_that_request_last'
make[7]: *** [drivers/block/ub.o] Error 1
make[6]: *** [drivers/block] Error 2
make[5]: *** [drivers] Error 2
make[5]: *** Waiting for unfinished jobs


On 2/5/08, Oliver Pinter <[EMAIL PROTECTED]> wrote:
> i reverted this commit 7d699bafe258ebd8f9b4ec182c554200b369a504 , and
> now compile ...
>
> On 2/5/08, Pete Zaitcev <[EMAIL PROTECTED]> wrote:
> > On Tue, 5 Feb 2008 14:05:06 -0800, Andrew Morton
> <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Looks like you deadlocked in ub_request_fn().  I assume that you were
> > using
> > > ub.c in 2.6.23 and that it worked OK?  If so, we broke it, possibly via
> > > changes to the core block layer.
> > >
> > > I think ub.c is basically abandoned in favour of usb-storage.  If so,
> > > perhaps we should remove or disble ub.c?
> >
> > Actually I think it may be an argument for keeping ub, if ub exposes
> > a bug in the __blk_end_request. I'll look at the head of the thread
> > and see if Mr. Pinter has hit anything related to Mr. Ueda's work.
> >
> > -- Pete
> >
>
>
> --
> Thanks,
> Oliver
>


-- 
Thanks,
Oliver
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Oliver Pinter
i reverted this commit 7d699bafe258ebd8f9b4ec182c554200b369a504 , and
now compile ...

On 2/5/08, Pete Zaitcev <[EMAIL PROTECTED]> wrote:
> On Tue, 5 Feb 2008 14:05:06 -0800, Andrew Morton <[EMAIL PROTECTED]>
> wrote:
>
> > Looks like you deadlocked in ub_request_fn().  I assume that you were
> using
> > ub.c in 2.6.23 and that it worked OK?  If so, we broke it, possibly via
> > changes to the core block layer.
> >
> > I think ub.c is basically abandoned in favour of usb-storage.  If so,
> > perhaps we should remove or disble ub.c?
>
> Actually I think it may be an argument for keeping ub, if ub exposes
> a bug in the __blk_end_request. I'll look at the head of the thread
> and see if Mr. Pinter has hit anything related to Mr. Ueda's work.
>
> -- Pete
>


-- 
Thanks,
Oliver
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Pete Zaitcev
On Tue, 5 Feb 2008 14:05:06 -0800, Andrew Morton <[EMAIL PROTECTED]> wrote:

> Looks like you deadlocked in ub_request_fn().  I assume that you were using
> ub.c in 2.6.23 and that it worked OK?  If so, we broke it, possibly via
> changes to the core block layer.
> 
> I think ub.c is basically abandoned in favour of usb-storage.  If so,
> perhaps we should remove or disble ub.c?

Actually I think it may be an argument for keeping ub, if ub exposes
a bug in the __blk_end_request. I'll look at the head of the thread
and see if Mr. Pinter has hit anything related to Mr. Ueda's work.

-- Pete
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Andrew Morton
On Tue, 5 Feb 2008 22:48:29 +0100
"Oliver Pinter" <[EMAIL PROTECTED]> wrote:

> On 2/5/08, Oliver Pinter <[EMAIL PROTECTED]> wrote:
> > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
> >
> > uploaded:
> > kernel image
> > .config
> > new pictures
> > lspci
> > lsusb
> >
> > -
> >
> > when read for /dev/uba then crashed the kernel, the read is egal, thet
> > dd or mount is ...

Looks like you deadlocked in ub_request_fn().  I assume that you were using
ub.c in 2.6.23 and that it worked OK?  If so, we broke it, possibly via
changes to the core block layer.

I think ub.c is basically abandoned in favour of usb-storage.  If so,
perhaps we should remove or disble ub.c?
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Oliver Pinter
On 2/5/08, Oliver Pinter <[EMAIL PROTECTED]> wrote:
> http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
>
> uploaded:
> kernel image
> .config
> new pictures
> lspci
> lsusb
>
> -
>
> when read for /dev/uba then crashed the kernel, the read is egal, thet
> dd or mount is ...
>
> On 2/5/08, Oliver Pinter <[EMAIL PROTECTED]> wrote:
> > yes, but auch too with latest git ... my top is on:
> > 9ef9dc69d4167276c04590d67ee55de8380bc1ad
> >
> > then i complie the new kernel
> >
> > On 2/5/08, Andrew Morton <[EMAIL PROTECTED]> wrote:
> > > On Tue, 05 Feb 2008 08:46:56 -0500 Stephen Smalley <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > >
> > > > On Mon, 2008-02-04 at 21:39 -0800, Andrew Morton wrote:
> > > > > On Mon, 28 Jan 2008 09:31:43 +0100 "Oliver Pinter (Pintér Olivér)"
> > > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > hi all!
> > > > > >
> > > > > > in the 2.6.24 become i some soft lockups with usb-phone, when i
> > pluged
> > > > > > in the mobile, then the vfs-layer crashed. am afternoon can i the
> > > > > > .config send, and i bisected the kernel, when i have time.
> > > > > >
> > > > > > pictures from crash:
> > > > > > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
> > > > >
> > > > > It looks like selinux's file_has_perm() is doing spin_lock() on an
> > > > > uninitialised (or already locked) spinlock.
> > > >
> > > > The trace looks bogus to me - I don't see how file_has_perm() could
> > have
> > > > been called there, and file_has_perm() doesn't directly take any spin
> > > > locks.
> > > >
> > >
> > > Oliver, could you please set CONFIG_FRAME_POINTER=y (which might get a
> > > better trace), and perhaps try Linus's latest tree from
> > > ftp://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/ (which is a bit
> > more
> > > careful about telling us about possibly-bogus backtrace entries)?
> > >
> > > Thanks.
> > >
> >
> >
> > --
> > Thanks,
> > Oliver
> >
>
>
> --
> Thanks,
> Oliver
>


-- 
Thanks,
Oliver
--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread Stephen Smalley

On Mon, 2008-02-04 at 21:39 -0800, Andrew Morton wrote:
> On Mon, 28 Jan 2008 09:31:43 +0100 "Oliver Pinter (Pintér Olivér)"  <[EMAIL 
> PROTECTED]> wrote:
> 
> > hi all!
> > 
> > in the 2.6.24 become i some soft lockups with usb-phone, when i pluged
> > in the mobile, then the vfs-layer crashed. am afternoon can i the
> > .config send, and i bisected the kernel, when i have time.
> > 
> > pictures from crash:
> > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
> 
> It looks like selinux's file_has_perm() is doing spin_lock() on an
> uninitialised (or already locked) spinlock.

The trace looks bogus to me - I don't see how file_has_perm() could have
been called there, and file_has_perm() doesn't directly take any spin
locks.

-- 
Stephen Smalley
National Security Agency

--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-05 Thread James Morris
On Mon, 4 Feb 2008, Andrew Morton wrote:

> On Mon, 28 Jan 2008 09:31:43 +0100 "Oliver Pinter (Pintér Olivér)"  <[EMAIL 
> PROTECTED]> wrote:
> 
> > hi all!
> > 
> > in the 2.6.24 become i some soft lockups with usb-phone, when i pluged
> > in the mobile, then the vfs-layer crashed. am afternoon can i the
> > .config send, and i bisected the kernel, when i have time.
> > 
> > pictures from crash:
> > http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
> 
> It looks like selinux's file_has_perm() is doing spin_lock() on an
> uninitialised (or already locked) spinlock.

Perplexing.

Do you have all of the lock debugging enabled?


- James
-- 
James Morris
<[EMAIL PROTECTED]>

Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-02-04 Thread Andrew Morton
On Mon, 28 Jan 2008 09:31:43 +0100 "Oliver Pinter (Pintér Olivér)"  <[EMAIL 
PROTECTED]> wrote:

> hi all!
> 
> in the 2.6.24 become i some soft lockups with usb-phone, when i pluged
> in the mobile, then the vfs-layer crashed. am afternoon can i the
> .config send, and i bisected the kernel, when i have time.
> 
> pictures from crash:
> http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/

It looks like selinux's file_has_perm() is doing spin_lock() on an
uninitialised (or already locked) spinlock.


--
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/


Re: [2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-01-28 Thread Oliver Pinter (Pintér Olivér)
and so then dmesg ..

-- 
Thanks,
Oliver
Initializing cgroup subsys cpuset
Linux version 2.6.24-szami2 ([EMAIL PROTECTED]) (gcc version 4.1.2 20061115 
(prerelease) (Debian 4.1.1-21)) #2 SMP Sun Jan 27 01:47:58 CET 2008
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e8000 - 0010 (reserved)
 BIOS-e820: 0010 - 1ff3 (usable)
 BIOS-e820: 1ff3 - 1ff4 (ACPI data)
 BIOS-e820: 1ff4 - 1fff (ACPI NVS)
 BIOS-e820: 1fff - 2000 (reserved)
 BIOS-e820: ffb8 - 0001 (reserved)
0MB HIGHMEM available.
511MB LOWMEM available.
found SMP MP-table at 000ff780
Entering add_active_range(0, 0, 130864) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   130864
  HighMem130864 ->   130864
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 ->   130864
On node 0 totalpages: 130864
  DMA zone: 56 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4040 pages, LIFO batch:0
  Normal zone: 1733 pages used for memmap
  Normal zone: 125035 pages, LIFO batch:31
  HighMem zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
DMI 2.3 present.
ACPI: RSDP 000F9E30, 0021 (r2 ACPIAM)
ACPI: XSDT 1FF30100, 003C (r1 A M I  OEMXSDT  1414 MSFT   97)
ACPI: FACP 1FF30290, 00F4 (r3 A M I  OEMFACP  1414 MSFT   97)
ACPI: DSDT 1FF303F0, 3779 (r1  P4C8B P4C8B106  106 INTL  2002026)
ACPI: FACS 1FF4, 0040
ACPI: APIC 1FF30390, 005C (r1 A M I  OEMAPIC  1414 MSFT   97)
ACPI: OEMB 1FF40040, 003F (r1 A M I  OEMBIOS  1414 MSFT   97)
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:2 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 15:2 APIC version 20
ACPI: IOAPIC (id[0x02] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 2, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 3000 (gap: 2000:dfb8)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129075
Kernel command line: BOOT_IMAGE=deb_s2.6.24 ro root=803 1
mapped APIC to b000 (fee0)
mapped IOAPIC to a000 (fec0)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 2048 (order: 11, 8192 bytes)
Detected 3150.239 MHz processor.
Console: colour VGA+ 132x44
console [tty0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:8
... MAX_LOCK_DEPTH:  30
... MAX_LOCKDEP_KEYS:2048
... CLASSHASH_SIZE:   1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS:  16384
... CHAINHASH_SIZE:  8192
 memory used by lock dependency info: 1024 kB
 per task-struct memory footprint: 1680 bytes

| Locking API testsuite:

 | spin |wlock |rlock |mutex | wsem | rsem |
  --
 A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
  initialize held:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
 bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
  --
  recursive read-lock: |  ok  | |  ok  |
   recursive read-lock #2: |  ok  | |  ok  |
mixed read-write-lock: |  ok  | |  ok  |
mixed write-read-lock: |  ok  | |  ok  |
  --
 hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
 soft-irqs-on + irq-safe-A/12:  o

[2.6.24 REGRESSION] BUG: Soft lockup - with VFS

2008-01-28 Thread Oliver Pinter (Pintér Olivér)
hi all!

in the 2.6.24 become i some soft lockups with usb-phone, when i pluged
in the mobile, then the vfs-layer crashed. am afternoon can i the
.config send, and i bisected the kernel, when i have time.

pictures from crash:
http://students.zipernowsky.hu/~oliverp/kernel/regression_2624/
-- 
Thanks,
Oliver
--
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/