Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test to ensure no zombie process left after the pcntl_waitpid call #9015

Closed
wants to merge 2 commits into from

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Feb 28, 2022

Differential Revision: D34493604

…k#9011)

Summary: Pull Request resolved: facebook#9011

Differential Revision: D34487565

Pulled By: Atry

fbshipit-source-id: 0bc9620d1815a5a38cb92211260ebe958439e16f
Differential Revision: D34493604

fbshipit-source-id: 56dbca48e1b20f20c8849e8c792d4caa26431f80
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34493604

@Atry
Copy link
Contributor Author

Atry commented Feb 28, 2022

The test added in this PR would fail in execve_execvpe_lightprocess.php and succeed in execve_execvpe.php.
The result difference indicates the preexisting issue of pid leak in the current LightProcess implementation.

$ hphp/test/run hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php
Running 1 tests in 1 threads (0 in serial)

FAILED: hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php
011+  741841 ?        Z      0:00 [sh] <defunct>

1 tests failed
(╯°□°)╯︵ ┻━┻

Run hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php by hand:
./buck-out/gen/hphp/hhvm/hhvm/hhvm -c /data/users/atry/fbsource/fbcode/hphp/test/slow/config.ini -vEval.EnableArgsInBacktraces=false -vEval.EnableIntrinsicsExtension=true -vEval.HHIRInliningIgnoreHints=false -vEval.HHIRAlwaysInterpIgnoreHint=false -vEval.FoldLazyClassKeys=false -vUnitFileCache.Path=/tmp/hphp-test-neovyS/unit-cache.sql -vEval.Jit=true  -vEval.ProfileHWEnable=false -vEval.EmbeddedDataExtractPath='/data/users/atry/fbsource/fbcode/buck-out/gen/hphp/hhvm/hhvm/hhvm_%{type}_%{buildid}' -vEval.JitWorkerThreads=1 -vEval.JitWorkerThreadsForSerdes=1  -vAutoload.DB.Path='/tmp/hphp-test-neovyS/hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php.autoloadDB.0' -vResourceLimit.CoreFileSize=0   -vServer.LightProcessFilePrefix=/tmp/lightprocess -vServer.LightProcessCount=5   --file 'hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php'

See failed test output and expectations:
cat /tmp/hphp-test-neovyS/hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php.diff
cat /tmp/hphp-test-neovyS/hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php.out
cat hphp/test/slow/ext_hsl/execve_execvpe_lightprocess.php.expectf

For xargs, list of failures is available using:
cat /tmp/hphp-test-neovyS/test-failures

Re-run just the failing tests:
hphp/test/run  $(cat /tmp/hphp-test-neovyS/test-failures)

Total time for all executed tests as run: 2.64s
Total time for all executed tests if run serially: 2.60s
$ hphp/test/run hphp/test/slow/ext_hsl/execve_execvpe.php
Running 1 tests in 1 threads (0 in serial)

All tests passed.
              |    |    |
             )_)  )_)  )_)
            )___))___))___)\
           )____)____)_____)\
         _____|____|____|____\\__
---------\      SHIP IT      /---------
  ^^^^^ ^^^^^^^^^^^^^^^^^^^^^
    ^^^^      ^^^^     ^^^    ^^
         ^^^^      ^^^

Total time for all executed tests as run: 2.44s
Total time for all executed tests if run serially: 2.40s

@Atry Atry marked this pull request as draft February 28, 2022 23:06
@Atry Atry deleted the export-D34493604 branch March 5, 2022 04:57
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