From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Jean-Marc Pigeon <jmp-4qkeo2rQ0gg@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: 2.6.33-rc4 i686 clone function looping (?)
Date: Tue, 19 Jan 2010 09:09:31 -0600 [thread overview]
Message-ID: <20100119150931.GA7708@us.ibm.com> (raw)
In-Reply-To: <1263852243.4745.363.camel-4BUXZ/Ty1v7iqR6jatDSCA@public.gmane.org>
Quoting Jean-Marc Pigeon (jmp-4qkeo2rQ0gg@public.gmane.org):
> Hello,
>
> Same physical system and configuration
> (small system in 32 Bits i686 mode).
> 2.6.32.3: working A_one.
> 2.6.33-rc4: clone call, looping and
> taking ALL CPU cycle.
>
> Here is code used.
> ;======================================
> cloneflg=SIGCHLD|__WCLONE;
> cloneflg|=CLONE_NEWNET|CLONE_NEWIPC|CLONE_NEWNS|CLONE_NEWPID|
> CLONE_NEWUTS;
> clonestk=(char *)malloc(STKSIZE)
> ......
>
> ;--------------------------------------
> if (argv[0]!=(char *)0) { /*always */
> static ARGTYP args;
>
> args.mspid=getpid();
> args.arch=cntarch;
> args.argc=argc;
> args.argv=argv;
> if ((cpid=clone(&doboot,(void *)(clonestk
> +STKSIZE),cloneflg,(void *)&args))<0) {
> (void) apl_alert(0,"%s, Unable to clone %s container process
> (error=<%s>)",
> appname,argv[0],strerror(errno));
> ;======================================
>
> There is some difference within .config file between
> both kernel I regenerated, but I do not believe they
> are meaningful for the clone/cgroup/veth/bridge functions.
> I can provide config diff if needed.
>
> Do we have a real problem with 2.6.33-rc4?? or did I missed
> something? could someone confirm trouble with clone call?
I don't see any such problem (on s390). You leave a large chunk
of your code out of your email, though. What is STKSIZE? What
is ARGTYP? What does doboot do?
The following program verbatim (trying to mimick what I hope your
program looks like) did not give me any problems:
===============================================================
#include <stdio.h>
#include <malloc.h>
#include <signal.h>
#include <wait.h>
#include <sched.h>
#include <errno.h>
#include <linux/sched.h>
#define STKSIZE (4*getpagesize())
#define CLONE_NEWNET 0x40000000 /* New network namespace */
struct arg {
int a, b;
};
int fn(void *arg)
{
struct arg *a = arg;
printf("client a %d b %d\n", a->a, a->b);
}
int main()
{
struct arg a;
int cpid;
long cloneflg=SIGCHLD|__WCLONE;
void *clonestk;
cloneflg|=CLONE_NEWNET|CLONE_NEWIPC|CLONE_NEWNS|CLONE_NEWPID|CLONE_NEWUTS;
clonestk=(char *)malloc(STKSIZE);
a.a=1; a.b=2;
if ((cpid=clone(&fn, clonestk+STKSIZE, cloneflg,
(void *)&a)) < 0)
printf("Error %d on clone\n", errno);
printf("parent done\n");
}
===============================================================
-serge
next prev parent reply other threads:[~2010-01-19 15:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 22:04 2.6.33-rc4 i686 clone function looping (?) Jean-Marc Pigeon
[not found] ` <1263852243.4745.363.camel-4BUXZ/Ty1v7iqR6jatDSCA@public.gmane.org>
2010-01-19 15:09 ` Serge E. Hallyn [this message]
[not found] ` <20100119150931.GA7708-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-19 16:00 ` 2.6.33-rc4 i686 clone function looping (seems real!) Jean-Marc Pigeon
[not found] ` <1263916851.4745.386.camel-4BUXZ/Ty1v7iqR6jatDSCA@public.gmane.org>
2010-01-19 22:10 ` Serge E. Hallyn
2010-01-19 22:15 ` Serge E. Hallyn
2010-01-21 17:13 ` Serge E. Hallyn
[not found] ` <20100121171338.GA16904-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-21 17:35 ` Peter Zijlstra
2010-01-21 20:20 ` Serge E. Hallyn
2010-01-21 20:36 ` [RFC][PATCH] sched: Fix fork vs hotplug vs cpuset namespaces Peter Zijlstra
2010-01-21 22:30 ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2010-01-21 20:36 ` [RFC][PATCH] " Peter Zijlstra
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=20100119150931.GA7708@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=jmp-4qkeo2rQ0gg@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.