René's URL Explorer Experiment


Title: proc_open mixed up stderr and stdout when using pty for pipe · Issue #17983 · php/php-src · GitHub

Open Graph Title: proc_open mixed up stderr and stdout when using pty for pipe · Issue #17983 · php/php-src

X Title: proc_open mixed up stderr and stdout when using pty for pipe · Issue #17983 · php/php-src

Description: Description We were having randomly bug in our ci where sometimes some test would failed because the stdout of a sub process launched by php was not complete. We manage to make a reproducer, and it seems that sometimes stdout output woul...

Open Graph Description: Description We were having randomly bug in our ci where sometimes some test would failed because the stdout of a sub process launched by php was not complete. We manage to make a reproducer, and it...

X Description: Description We were having randomly bug in our ci where sometimes some test would failed because the stdout of a sub process launched by php was not complete. We manage to make a reproducer, and it...

Opengraph URL: https://github.com/php/php-src/issues/17983

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"proc_open mixed up stderr and stdout when using pty for pipe","articleBody":"### Description\n\nWe were having randomly bug in our ci where sometimes some test would failed because the stdout of a sub process launched by php was not complete.\n\nWe manage to make a reproducer, and it seems that sometimes stdout output would go to stderr.\n\nHere is a reproducer  : \n\n```php\n\u003c?php\n\n[$reference] = run_process();\n\necho \"Output Reference:\\n\";\necho $reference;\necho \"\\n\";\n\nfor ($i=0; $i \u003c 10_000; $i++) {\n    if ($i > 0 && $i % 80 === 0) {\n        echo \"\\n\";\n    }\n    echo '.';\n    [$output, $error] = run_process();\n\n    // uncomment this line to make it works\n//    $output .= $error;\n\n    \n    if ($output !== $reference) {\n        throw new \\RuntimeException(\"Output mismatch\");\n    }\n}\n\nfunction run_process(){\n    $descriptors = [\n        ['pty'],\n        ['pty'],\n        ['pty'],\n    ];\n    $pipes = [];\n\n    $proc = proc_open(['cat', __FILE__], $descriptors, $pipes);\n    $output = \"\";\n    $error = \"\";\n\n    stream_set_blocking($pipes[1], 0);\n    stream_set_blocking($pipes[2], 0);\n\n    while (proc_get_status($proc)['running']) {\n        usleep(10); // longer timer will not cause the issue\n\n        $output .= @stream_get_contents($pipes[1], -1);\n        $error .= @stream_get_contents($pipes[2], -1);\n    }\n\n    $output .= @stream_get_contents($pipes[1], -1);\n    $error .= @stream_get_contents($pipes[2], -1);\n\n    return [$output, $error];\n}\n\n```\n\nI suspect this have to do about having a pipe not ready or something mixed, having a longer timer before first read, reduce a lot the probability of error\n\nSee also https://github.com/symfony/symfony/issues/59927\n\n\n### PHP Version\n\nPHP 8.4\n\n### Operating System\n\n_No response_","author":{"url":"https://github.com/joelwurtz","@type":"Person","name":"joelwurtz"},"datePublished":"2025-03-06T17:45:41Z","url":"https://github.com/php/php-src/issues/17983"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:17f5b75a-3c2e-7d6f-09ad-eb97a583d588
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id946A:7C906:1088EE3:168BAED:6B055CAC
html-safe-nonce18a159d40e1684fe5a8e80bf0cb4611786734f5e524dc18ef9934844e629d767
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDZBOjdDOTA2OjEwODhFRTM6MTY4QkFFRDo2QjA1NUNBQyIsInZpc2l0b3JfaWQiOiI2MDYwMzE0OTcwODkyMzYwODc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac002035885b9921d8cb40b8e43812d5d6758fdaf2eacc7bbb7e7b04970ea39ad9
hovercard-subject-tagissue:2901050332
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/php/php-src/17983/issue_layout
twitter:imagehttps://opengraph.githubassets.com/68db0600baed1b2f5a573b4fe1e4f447bc7a72cfdd5853135e90cf1d9fb53d80/php/php-src/issues/17983
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/68db0600baed1b2f5a573b4fe1e4f447bc7a72cfdd5853135e90cf1d9fb53d80/php/php-src/issues/17983
og:image:altDescription We were having randomly bug in our ci where sometimes some test would failed because the stdout of a sub process launched by php was not complete. We manage to make a reproducer, and it...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejoelwurtz
hostnamegithub.com
expected-hostnamegithub.com
None8a6760da3cce5e2d079d07e3b62df71194316c4478db1a5e38050f44fce72c72
turbo-cache-controlno-preview
go-importgithub.com/php/php-src git https://github.com/php/php-src.git
octolytics-dimension-user_id25158
octolytics-dimension-user_loginphp
octolytics-dimension-repository_id1903522
octolytics-dimension-repository_nwophp/php-src
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1903522
octolytics-dimension-repository_network_root_nwophp/php-src
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8327739ac0648b9c3c722b5f401f7338553936b8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/php/php-src/issues/17983#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphp%2Fphp-src%2Fissues%2F17983
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphp%2Fphp-src%2Fissues%2F17983
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=php%2Fphp-src
Reloadhttps://github.com/php/php-src/issues/17983
Reloadhttps://github.com/php/php-src/issues/17983
Reloadhttps://github.com/php/php-src/issues/17983
phphttps://github.com/php
php-srchttps://github.com/php/php-src
Codehttps://github.com/php/php-src
Issues1.1k (1.1k)https://github.com/php/php-src/issues
Pull requests1.3k (1.3k)https://github.com/php/php-src/pulls
Actionshttps://github.com/php/php-src/actions
Security and quality83 (83)https://github.com/php/php-src/security
Insightshttps://github.com/php/php-src/insights
https://github.com/php/php-src
New issuehttps://github.com/login?return_to=https://github.com/php/php-src/issues/17983
New issuehttps://github.com/login?return_to=https://github.com/php/php-src/issues/17983
proc_open mixed up stderr and stdout when using pty for pipehttps://github.com/php/php-src/issues/17983#top
Bughttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Bug%22
Extension: standardhttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Extension%3A%20standard%22
Status: Needs Triagehttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Triage%22
https://github.com/joelwurtz
joelwurtzhttps://github.com/joelwurtz
on Mar 6, 2025https://github.com/php/php-src/issues/17983#issue-2901050332
symfony/symfony#59927https://github.com/symfony/symfony/issues/59927
joelwurtzhttps://github.com/joelwurtz
Bughttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Bug%22
Status: Needs Triagehttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Triage%22
on Mar 6, 2025https://github.com/php/php-src/issues/17983#event-16621120341
ndosschehttps://github.com/ndossche
Extension: standardhttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Extension%3A%20standard%22
on Mar 6, 2025https://github.com/php/php-src/issues/17983#event-16621856715
https://github.com/ktomk
ktomkhttps://github.com/ktomk
on Mar 10, 2025https://github.com/php/php-src/issues/17983#issuecomment-2709762144
https://github.com/joelwurtz
joelwurtzhttps://github.com/joelwurtz
on Mar 10, 2025https://github.com/php/php-src/issues/17983#issuecomment-2710125214
https://github.com/joelwurtz
joelwurtzhttps://github.com/joelwurtz
on Mar 10, 2025https://github.com/php/php-src/issues/17983#issuecomment-2710271255
https://github.com/wez
wezhttps://github.com/wez
on Mar 10, 2025https://github.com/php/php-src/issues/17983#issuecomment-2710558434
https://github.com/joelwurtz
joelwurtzhttps://github.com/joelwurtz
on Mar 25, 2025https://github.com/php/php-src/issues/17983#issuecomment-2750973449
joelwurtzhttps://github.com/joelwurtz
completedhttps://github.com/php/php-src/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 25, 2025https://github.com/php/php-src/issues/17983#event-16972881834
Sign up for freehttps://github.com/signup?return_to=https://github.com/php/php-src/issues/17983
Sign in to commenthttps://github.com/login?return_to=https://github.com/php/php-src/issues/17983
Bughttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Bug%22
Extension: standardhttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Extension%3A%20standard%22
Status: Needs Triagehttps://github.com/php/php-src/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Triage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.