All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: restarting tests/sleep
       [not found]     ` <484D4364.2080509-6ktuUTfB/bM@public.gmane.org>
@ 2008-06-09 16:23       ` Serge E. Hallyn
       [not found]         ` <20080609162309.GA32120-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Serge E. Hallyn @ 2008-06-09 16:23 UTC (permalink / raw)
  To: Nadia Derbey, Dave Hansen; +Cc: Linux Containers

Quoting Nadia Derbey (Nadia.Derbey-6ktuUTfB/bM@public.gmane.org):
> Serge E. Hallyn wrote:
>> Can you check your /var/log/messages for a 'protection fault' message?
>> Then, if there is one for 'sleep', run gdb on sleep, take the IP in
>> the protection fault msg, and do 'x/10 0x8005cd0' or whatever the
>> address is?
>
> No, I'm not getting a protection fault, and I've got nothing generated  
> in the /var/log/messages. But when I reran the test to check what you're  
> asking me to, I didn't reach the same point: I'm not reaching the [vdso]  
> restoring. I'm getting an EFAULT. Here are the last lines from the 
> output:
>
> =====
> DEBUG (cr.c::923) next memseg_t is: start bfd99000 end bfdae000 prot 3  
> flag 50 offset 3221139456 fnam [stack]
> DEBUG (cr.c::969) Delete segment bfc96000 - bfcab000
> DEBUG (cr.c::971) Restore segment bfd99000 - bfdae000
> [1 cr.c:972 restore_mem()] inj_func(ic, inj_readbuf, 3, remfd,  
> memseg->start, memseg->end - memseg->start) : -14
> ERROR (cr.c:926) unexpected item name: '' (size=0)
> =====

Yeah that's insurmountable - notice the stack in the process which was
fork()ed to be the restarted process topped at bfcab000, while the
checkpointed stack topped at bfdae000.  You're not allowed to write
above the stack.  So the only things to do are

	1. keep trying the restart in the hopes you get a task with
	   stack topping at or above bfdae000
	2. if the checkpointed stack is too high to be likely to be
	   restartable, generate a new checkpoint image and you
	   should get a lower stack top.

(Dave, maybe you had other ideas I haven't considered)

Good thing cryo is just a proof of concept to exploit the kernel code :)

thanks,
-serge

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: restarting tests/sleep
       [not found]         ` <20080609162309.GA32120-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2008-06-09 16:32           ` Dave Hansen
  2008-06-09 18:19             ` Serge E. Hallyn
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2008-06-09 16:32 UTC (permalink / raw)
  To: Serge E. Hallyn; +Cc: Linux Containers, Nadia Derbey

On Mon, 2008-06-09 at 11:23 -0500, Serge E. Hallyn wrote:
> 
> 
> Yeah that's insurmountable - notice the stack in the process which was
> fork()ed to be the restarted process topped at bfcab000, while the
> checkpointed stack topped at bfdae000.  You're not allowed to write
> above the stack.  So the only things to do are
> 
>         1. keep trying the restart in the hopes you get a task with
>            stack topping at or above bfdae000
>         2. if the checkpointed stack is too high to be likely to be
>            restartable, generate a new checkpoint image and you
>            should get a lower stack top.
> 
> (Dave, maybe you had other ideas I haven't considered)

Have you tried turning of stack randomization?  It should make the stack
more dependable at exec.  We could also provide a hint somewhere on
exec() where to place the stack.  

-- Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: restarting tests/sleep
  2008-06-09 16:32           ` Dave Hansen
@ 2008-06-09 18:19             ` Serge E. Hallyn
  0 siblings, 0 replies; 3+ messages in thread
From: Serge E. Hallyn @ 2008-06-09 18:19 UTC (permalink / raw)
  To: Dave Hansen; +Cc: Linux Containers, Nadia Derbey

Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> On Mon, 2008-06-09 at 11:23 -0500, Serge E. Hallyn wrote:
> > 
> > 
> > Yeah that's insurmountable - notice the stack in the process which was
> > fork()ed to be the restarted process topped at bfcab000, while the
> > checkpointed stack topped at bfdae000.  You're not allowed to write
> > above the stack.  So the only things to do are
> > 
> >         1. keep trying the restart in the hopes you get a task with
> >            stack topping at or above bfdae000
> >         2. if the checkpointed stack is too high to be likely to be
> >            restartable, generate a new checkpoint image and you
> >            should get a lower stack top.
> > 
> > (Dave, maybe you had other ideas I haven't considered)
> 
> Have you tried turning of stack randomization?  It should make the stack
> more dependable at exec.  We could also provide a hint somewhere on
> exec() where to place the stack.  

Yup, that should prevent the spurious -EFAULTS.  Suka, you were getting
these too last week, so I recommend doing

	echo 0 > /proc/sys/kernel/randomize_va_space

on startup.

-serge

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-09 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <484D2E7C.4060905@bull.net>
     [not found] ` <20080609143626.GA23253@us.ibm.com>
     [not found]   ` <484D4364.2080509@bull.net>
     [not found]     ` <484D4364.2080509-6ktuUTfB/bM@public.gmane.org>
2008-06-09 16:23       ` restarting tests/sleep Serge E. Hallyn
     [not found]         ` <20080609162309.GA32120-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-06-09 16:32           ` Dave Hansen
2008-06-09 18:19             ` Serge E. Hallyn

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.