Re: BUG: sleeping function called from invalid context atkernel/fork.c:385

From: Andrew Morton
Date: Wed May 23 2007 - 02:43:27 EST


On Wed, 23 May 2007 16:31:54 +1000 David Chinner <dgc@xxxxxxx> wrote:

> Saw this when running strace -f on a script on 2.6.21 on ia64:
>
> BUG: sleeping function called from invalid context at kernel/fork.c:385
> in_atomic():1, irqs_disabled():0
>
> Call Trace:
> [<a000000100014700>] show_stack+0x80/0xa0
> sp=e00000306e6f7a00 bsp=e00000306e6f0ef8
> [<a000000100014750>] dump_stack+0x30/0x60
> sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0
> [<a0000001000acaf0>] __might_sleep+0x1f0/0x260
> sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8
> [<a0000001000bd2e0>] mmput+0x20/0x220
> sp=e00000306e6f7bd0 bsp=e00000306e6f0e90
> [<a0000001000321e0>] sys_ptrace+0x460/0x1600
> sp=e00000306e6f7bd0 bsp=e00000306e6f0d80
> [<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20
> sp=e00000306e6f7e30 bsp=e00000306e6f0d80
> [<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
> sp=e00000306e6f8000 bsp=e00000306e6f0d80
> BUG: sleeping function called from invalid context at kernel/fork.c:385
> in_atomic():1, irqs_disabled():0
>
> Call Trace:
> [<a000000100014700>] show_stack+0x80/0xa0
> sp=e00000306e6f7a00 bsp=e00000306e6f0ef8
> [<a000000100014750>] dump_stack+0x30/0x60
> sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0
> [<a0000001000acaf0>] __might_sleep+0x1f0/0x260
> sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8
> [<a0000001000bd2e0>] mmput+0x20/0x220
> sp=e00000306e6f7bd0 bsp=e00000306e6f0e90
> [<a0000001000321e0>] sys_ptrace+0x460/0x1600
> sp=e00000306e6f7bd0 bsp=e00000306e6f0d80
> [<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20
> sp=e00000306e6f7e30 bsp=e00000306e6f0d80
> [<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
> sp=e00000306e6f8000 bsp=e00000306e6f0d80
>
> I could reproduce it via 'strace -f sleep 1'
>

I'd say this is specific to ia64. Someone would have spotted it on
x86 by now.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/