All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nikita V. Youshchenko" <yoush-/llMDZXAvAOHXe+LvDLADg@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	leo-n4oKp6kCDthKyFCjRbgQbg@public.gmane.org
Subject: Re: [PATCH] c/r: fix "scheduling in atomic" while restoring ipc shm
Date: Tue, 2 Mar 2010 17:50:46 +0300	[thread overview]
Message-ID: <201003021750.47123@zigzag.lvk.cs.msu.su> (raw)
In-Reply-To: <4B85E62B.90804-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>

> Hi Nikita,
>
> Thanks for the report and the analysis. It actually helped to
> pinpoint a couple of other minor issues in the code. This patch
> should fix all of these.
>
> Oren.

Hi Oren.

With ckpt-v19 plus this patch applied, we still are getting a kernel
crash, with BUG() fired at
+       ipc = idr_find(&msg_ids->ipcs_idr, h->perms.id);
+       BUG_ON(!ipc);
added by the patch.

By looking at the code, I can't understand how this idr_find() can at
all succeed, if the namespace it is looking in was just created and
is empty.

What code adds object in question into this idr?

Any hints?

Nikita

...
[   60.321860] [430:430:c/r:ckpt_read_obj_dispatch:254] type 502 len 120
[   60.322489] [430:430:c/r:ckpt_read_obj:383] type 502 len 120(120,120)
[   60.323140] [430:430:c/r:restore_ipc_shm:226] shm: do_shmget size 790528 flag 0x7a4 id 32769
[   60.324257] [430:430:c/r:restore_ipc_shm:228] shm: do_shmget ret 32769
[   60.325573] ------------[ cut here ]------------
[   60.326059] kernel BUG at ipc/checkpoint_shm.c:274!
[   60.326564] invalid opcode: 0000 [#1] PREEMPT SMP
[   60.327124] last sysfs file:
[   60.327480] Modules linked in:
[   60.327903]
[   60.328104] Pid: 430, comm: bash Not tainted 2.6.33-rc8 #2 /
[   60.328104] EIP: 0060:[<c10e0abe>] EFLAGS: 00000246 CPU: 0
[   60.328104] EIP is at restore_ipc_shm+0x1a0/0x35a
[   60.328104] EAX: 00000000 EBX: 00000000 ECX: 00000005 EDX: c789ba58
[   60.328104] ESI: 00008001 EDI: c793d640 EBP: c79ac000 ESP: c7991dbc
[   60.328104]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[   60.328104] Process bash (pid: 430, ti=c7990000 task=c7855b70 task.ti=c7990000)
[   60.328104] Stack:
[   60.328104]  c129da9c c79ac000 000c1000 00000000 c129db00 000001ae 000001b4 000c1000
[   60.328104] <0> 00000000 c124dde1 000001ae 00000001 00000000 c7940c00 c79ac000 c10e036d
[   60.328104] <0> 00000002 c129da9c ffffffef c129da9c c799ac60 c79ac000 c10e048a 000001f6
[   60.328104] Call Trace:
[   60.328104]  [<c10e036d>] ? restore_ipc_any+0xa5/0x119
[   60.328104]  [<c10e048a>] ? restore_ipc_ns+0xa9/0x112
[   60.328104]  [<c10e091e>] ? restore_ipc_shm+0x0/0x35a
[   60.328104]  [<c10feb48>] ? restore_obj+0x98/0x116
[   60.328104]  [<c11007ed>] ? ckpt_read_obj_dispatch+0x220/0x246
[   60.328104]  [<c1100829>] ? ckpt_read_obj+0x16/0xe8
[   60.328104]  [<c107b866>] ? fsnotify_access+0x5a/0x61
[   60.328104]  [<c110097d>] ? ckpt_read_obj_type+0x16/0x70
[   60.328104]  [<c1039ab8>] ? restore_ns+0x18/0x12b
[   60.328104]  [<c10feb48>] ? restore_obj+0x98/0x116
[   60.328104]  [<c11007ed>] ? ckpt_read_obj_dispatch+0x220/0x246
[   60.328104]  [<c1100829>] ? ckpt_read_obj+0x16/0xe8
[   60.328104]  [<c110097d>] ? ckpt_read_obj_type+0x16/0x70
[   60.328104]  [<c11033fb>] ? restore_task+0x512/0x9fc
[   60.328104]  [<c1101b59>] ? do_restart+0xff4/0x12f3
[   60.328104]  [<c10364f0>] ? autoremove_wake_function+0x0/0x2d
[   60.328104]  [<c10fdb21>] ? do_sys_restart+0x66/0x77
[   60.328104]  [<c10027d5>] ? ptregs_restart+0x15/0x1c
[   60.328104]  [<c10026d0>] ? sysenter_do_call+0x12/0x26
[   60.328104] Code: fe ff ff e9 c8 01 00 00 8b 04 24 83 c0 64 89 44 24 10 e8 dd 16 10 00 8b 57 10 8b 04 24 83 c0 
74 e8 24 71 02 00 85 c0 89 c3 75 04 <0f> 0b eb fe 8b 68 2c 8d 45 18 3e ff 45 18 8b 44 24 04 8d 57 08
[   60.328104] EIP: [<c10e0abe>] restore_ipc_shm+0x1a0/0x35a SS:ESP 0068:c7991dbc
[   60.351332] ---[ end trace 9660dfa05be59307 ]---

  parent reply	other threads:[~2010-03-02 14:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 16:02 Scheduling in atomic while restoring shm Nikita V. Youshchenko
     [not found] ` <201002241902.19623-G0jJXfdb3EhtNF42gJWJKsm+4N3/VObd@public.gmane.org>
2010-02-24 23:31   ` [PATCH] c/r: fix "scheduling in atomic" while restoring ipc shm Oren Laadan
     [not found]     ` <1267054267-2819-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-25  2:53       ` Oren Laadan
     [not found]         ` <4B85E62B.90804-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-02 14:50           ` Nikita V. Youshchenko [this message]
     [not found]             ` <201003021750.47123-G0jJXfdb3EhtNF42gJWJKsm+4N3/VObd@public.gmane.org>
2010-03-02 17:48               ` Serge E. Hallyn
     [not found]                 ` <20100302174855.GA16352-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-02 21:59                   ` Oren Laadan
2010-03-02 22:09               ` Oren Laadan
     [not found]                 ` <4B8D8C7D.2050004-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-02 23:17                   ` Serge E. Hallyn
     [not found]                     ` <20100302231716.GA4594-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-02 23:40                       ` Serge E. Hallyn
2010-03-03 20:31       ` [PATCH] c/r: fix ipc scheduling while atomic - take 3 Oren Laadan
     [not found]         ` <1267648296-5517-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-03 23:06           ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003021750.47123@zigzag.lvk.cs.msu.su \
    --to=yoush-/llmdzxavaohxe+lvdladg@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=leo-n4oKp6kCDthKyFCjRbgQbg@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.