[lxc-devel] lxc on ia64
Greg Kurz
gkurz at fr.ibm.com
Fri Dec 2 13:47:13 UTC 2011
On Thu, 2011-12-01 at 23:59 +0200, Vadym S. Khondar wrote:
> > I guess something like this should fix the issue:
> >
> > --- a/src/lxc/namespace.c
> > +++ b/src/lxc/namespace.c
> > @@ -71,7 +71,7 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int
> > flags)
> > pid_t ret;
> >
> > #ifdef __ia64__
> > - ret = __clone2(do_clone, stack,
> > + ret = __clone2(do_clone, stack - stack_size,
> > stack_size, flags | SIGCHLD,&clone_arg);
> > #else
> > ret = clone(do_clone, stack, flags | SIGCHLD,&clone_arg);
> >
>
> Yep. I actually tried this one right after reading clone man but decided
> not to bear readers with potentially erroneous experiments :)
>
:)
> With such a correction my lxc dumps core somewhere in vnprinf of
> standard c library. Without any clues from actual lxc code to know at
> least from where this call happened.
>
vnprintf() is likely to be called when writing something to the log
file.
> Besides I tried to replace alloca() right above code snippet you've
> posted with malloc() (again after reading of manual as soon as it states
> that allocated chunk will be freed when calling function returns) with
> no luck (same core dump in vnprintf).
>
I suspect some stack overflow here... And I remember from ancient
memories that ia64 uses more stack for function calls than x86. Try to
double or even triple the stack_size value.
> Also it seems that lxc-start can gdb'd only if comment out following check:
>
> if (lxc_check_inherited(-1))
> return -1;
>
Yes... that's because gdb leaks (voluntarly or not) file descriptors. By
the way, this inherited check is a pain... it should at most write some
warnings into the log file, but not be an error condition.
> within lxc_start() at start.c:631
>
> After playing that around I've decided to write to list.
>
That's what opensource is all about, isn't it ? :)
> >
> > Cc'ing Daniel who will be pleased to see that lxc is also being used on
> > ia64 ! :)
>
> Indeed, I'm trying to use it. It would be handy on still rather powerful
> although not new ia64 servers.
>
> > Cheers.
> >
>
> Thanks for response.
Cheers.
--
Gregory Kurz gkurz at fr.ibm.com
Software Engineer @ IBM/Meiosys http://www.ibm.com
Tel +33 (0)534 638 479 Fax +33 (0)561 400 420
"Anarchy is about taking complete responsibility for yourself."
Alan Moore.
More information about the lxc-devel
mailing list