OpenVZ Forum


Home » Mailing lists » Devel » Re: restarting tests/sleep
Re: restarting tests/sleep [message #30878] Mon, 09 June 2008 16:32 Go to next message
Dave Hansen is currently offline  Dave Hansen
Messages: 240
Registered: October 2005
Senior Member
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

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: restarting tests/sleep [message #30885 is a reply to message #30878] Mon, 09 June 2008 18:19 Go to previous message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting Dave Hansen (dave@linux.vnet.ibm.com):
> 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
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH 0/2] cryo: fixes for handling options -l and -f
Next Topic: [RFC PATCH 0/5] memcg: VM overcommit accounting and handling
Goto Forum:
  


Current Time: Thu Jul 11 23:28:03 GMT 2024

Total time taken to generate the page: 0.02285 seconds