[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090606064749.GA13508@redhat.com>
Date: Sat, 6 Jun 2009 08:47:49 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: naresh kamboju <naresh.kernel@...il.com>
Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
Roland McGrath <roland@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Pavel Emelyanov <xemul@...nvz.org>,
linux-kernel@...r.kernel.org
Subject: open_posix_testsuite: STOP + CONT + wait hang?
(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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists