Skip to content

Conversation

@mhagstrand
Copy link
Contributor

In Travis CI the nowait.phpt test sometimes fails because of
the usleep() not being long enough ensure proper
execution order. Instead of depending on sleeping the
test now uses two semaphores to guarantee execution order.

In Travis CI the nowait.phpt test sometimes fails because of
the usleep() not being long enough ensure proper
execution order. Instead of depending on sleeping the
test now uses two semaphores to guarantee execution order.
@krakjoe
Copy link
Member

krakjoe commented Jan 2, 2017

Merged 8c5647e

Thanks

@krakjoe krakjoe closed this Jan 2, 2017
@krakjoe
Copy link
Member

krakjoe commented Jan 2, 2017

@mhagstrand can you take another look, last build has failures because of this test ... maybe you missed something ?

https://travis-ci.org/php/php-src/jobs/188211242

@mhagstrand
Copy link
Contributor Author

Thanks @krakjoe! I see the problem from the diff

013+ 
014+ Warning: sem_release(): failed to release key 0x430acb2e: Invalid argument in /home/travis/build/php/php-src/ext/sysvsem/tests/nowait.php on line 66

I released the child semaphore after allowing the child process to continue execution. If the child finishes execution before the parent releases that semaphore, the child removes the semaphore. Then the warning occurs.

sem_release($c_sem_id);

@mhagstrand
Copy link
Contributor Author

My patch to fix this:
#2269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants