From: Oleg Nesterov <oleg@redhat.com>
To: naresh kamboju <naresh.kernel@gmail.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
Roland McGrath <roland@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
Ingo Molnar <mingo@elte.hu>, Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org
Subject: open_posix_testsuite: STOP + CONT + wait hang?
Date: Sat, 6 Jun 2009 08:47:49 +0200 [thread overview]
Message-ID: <20090606064749.GA13508@redhat.com> (raw)
In-Reply-To: <f5a7b3810906050843g6cbf5067o5ba1b9e07e5e2f5b@mail.gmail.com>
(change the subject)
On 06/05, naresh kamboju wrote:
>
> I want to inform 2.6.29 signal issues,
> As per my understanding I have noticed that if there is a delay
> (sleep/nanosleep/usleep) in the child process. Child could not
> reporting exit status to parent at this situation parent is waiting
> for ever by combinations of SIGSTOP and SIGCONT. So test cases are
> reporting as HUNG.
Thanks for report, but please provide more info.
> ARCH: ARM
is it ARM specific? I can't reproduce the problem on x86.
> KERNEL: 2.6.29.1
did you try other kernel versions?
> #define SLEEPSEC 5
...
> if ((pid = fork()) == 0) {
> /* child here */
> struct timespec tssleep;
>
> tssleep.tv_sec=SLEEPSEC;
> tssleep.tv_nsec=0;
> if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) == 0) {
> printf("clock_nanosleep() returned success\n");
> return CHILDPASS;
> } else {
> printf("clock_nanosleep() did not return success\n");
> return CHILDFAIL;
> }
> return CHILDFAIL;
> } else {
> /* parent here */
> int i;
>
> sleep(1);
>
> if (kill(pid, SIGSTOP) != 0) {
> printf("Could not raise SIGSTOP\n");
> return PTS_UNRESOLVED;
> }
>
> if (kill(pid, SIGCONT) != 0) {
> printf("Could not raise SIGCONT\n");
> return PTS_UNRESOLVED;
> }
>
> if (wait(&i) == -1) {
And I guess it hangs here, right?
The child should sleep SLEEPSEC seconds then exit, so the whole
test-case should take SLEEPSEC seconds too.
Do you mean it really hangs and never completes?
Can you confirm it hangs in wait() ?
Does the child print "returned success" ?
If you can reproduce the problem, please send the content of
/proc/CHILD_PID/status and /proc/PARENT_PID/status.
Oleg.
next prev parent reply other threads:[~2009-06-06 6:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 18:55 [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage Oleg Nesterov
2009-05-25 19:39 ` Oleg Nesterov
2009-05-27 1:06 ` Roland McGrath
2009-05-27 23:24 ` Oleg Nesterov
2009-05-26 21:05 ` Roland McGrath
2009-05-26 21:33 ` Oleg Nesterov
2009-05-27 0:55 ` Roland McGrath
2009-06-02 4:54 ` Sukadev Bhattiprolu
2009-06-05 15:43 ` naresh kamboju
2009-06-06 0:19 ` Roland McGrath
2009-06-06 6:47 ` Oleg Nesterov [this message]
2009-06-17 8:35 ` open_posix_testsuite: STOP + CONT + wait hang? naresh kamboju
2009-06-17 13:29 ` Oleg Nesterov
2009-06-17 14:34 ` naresh kamboju
2009-05-27 21:32 ` [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage Oleg Nesterov
2009-05-27 22:23 ` Roland McGrath
2009-05-27 23:12 ` Oleg Nesterov
2009-05-27 23:26 ` Roland McGrath
2009-05-27 23:43 ` Oleg Nesterov
2009-05-27 23:51 ` Roland McGrath
2009-05-28 0:05 ` Oleg Nesterov
2009-06-02 4:48 ` Sukadev Bhattiprolu
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=20090606064749.GA13508@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=naresh.kernel@gmail.com \
--cc=roland@redhat.com \
--cc=sukadev@linux.vnet.ibm.com \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox