Skip to content

Fix SIGSEGV on request shutdown with PHP security fix (#1509) + prepare 1.17.1 - #1510

Merged
intuibase merged 13 commits into
elastic:mainfrom
intuibase:fix/1509-objects-store-crash-on-shutdown
Oct 22, 2026
Merged

intuibase merged 13 commits into
elastic:mainfrom
intuibase:fix/1509-objects-store-crash-on-shutdown

Conversation

@intuibase

@intuibase intuibase commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1509

Problem

PHP security releases (e.g. 8.3.36, 7.3.33-35 from sury) contain the fix "Avoid state corruption via bailout", which resets EG(objects_store).object_buckets = NULL at the end of shutdown_executor().

The agent released zvals holding PHP objects (lastErrorData – error backtrace with objects/args, and lastException) in elasticApmRequestPostDeactivate, i.e. after shutdown_executor(). Releasing an object then dereferences the NULL object_buckets in zend_objects_store_del() -> SIGSEGV at the end of the request.

This is not a regression in the agent: 1.16.0 and 1.17.0 crash the same way, but only on PHP versions containing that fix (verified: 1.17.0 exits 0 on PHP 8.3.35 and with SIGSEGV on 8.3.36).

Changes

  • Release lastErrorData and lastException in RSHUTDOWN (before shutdown_executor()); post deactivate no longer releases PHP objects.
  • Add phpt regression test objects_released_before_executor_shutdown.phpt (fails with SIGSEGV on 1.17.0 + PHP 8.3.36, passes with this change). It only detects the bug on PHP versions containing the security fix.
  • Bump PHP header sources used for building to 8.2.35, 8.3.36, 8.4.27, 8.5.12.
  • Prepare 1.17.1 (version, release notes).

Testing

Verified manually on php:8.3.36-cli: agent 1.17.0 -> exit 139, agent built from this branch -> exit 0. Full phpt suite and other PHP versions still to be run in CI.

@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🔍 Preview links for changed docs

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@intuibase intuibase self-assigned this Oct 22, 2026
@sd-floyt

Copy link
Copy Markdown

we have the same issue. Please merge this as soon as possible

@youssef-jad

Copy link
Copy Markdown

we have the same issue. Please merge this as soon as possible

cant agree more

@intuibase
intuibase requested a review from hegerchr October 22, 2026 12:38

@hegerchr hegerchr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@intuibase
intuibase merged commit 35595dd into elastic:main Oct 22, 2026
264 of 270 checks passed
@intuibase
intuibase deleted the fix/1509-objects-store-crash-on-shutdown branch October 22, 2026 12:52
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.

SIGSEGV in zend_objects_store_del during post-deactivate after PHP security backport that resets EG(objects_store) on fast shutdown (1.16.0 and 1.17.0)

4 participants