lkml.org 
[lkml]   [2009]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectopen_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.



\
 
 \ /
  Last update: 2009-06-06 08:55    [W:0.069 / U:4.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site