Skip to content

Revert "ci: drop external DTD from minimal fontconfig to avoid expat NULL-deref crash (#322909)" - #322994

Closed
Alexandru Dima (alexdima) wants to merge 2 commits into
mainfrom
revert-322909-fontconfig-doctype
Closed

Alexandru Dima (alexdima) wants to merge 2 commits into
mainfrom
revert-322909-fontconfig-doctype

Conversation

@alexdima

Copy link
Copy Markdown
Member

Reverts the fontconfig change from #322909.

Why revert

The change was intended to reduce the intermittent fontconfig/expat SIGSEGV that crashes Electron at smoke-test launch. It did the opposite.

Measured on the pr.yml workflow (the Linux / Electron-Smoke job specifically), around the merge of #322909 (2026-06-25 13:06 UTC):

smoke failures / completed rate
Before merge 1 / 13 ~8%
After merge 8 / 43 ~19%

The failure rate roughly doubled.

What the dump actually shows

I pulled a crash dump from an after-merge failure (run 28188049700, Language Features suite) and walked the frame-pointer (RBP) chain — more reliable than the heuristic stack scan used to justify #322909:

#0  libc.so.6           (NULL deref, fault addr 0x0)
#1  libexpat.so.1
#2  libexpat.so.1
#3  libexpat.so.1
#4  libfontconfig.so.1
#5  libfontconfig.so.1
#6  libfontconfig.so.1
#7  libfontconfig.so.1
#8  libfontconfig.so.1
#9  libfontconfig.so.1
#10 libpangoft2-1.0.so.0
#11 libglib-2.0.so.0
#12 libc.so.6

It's the same pango → fontconfig → expat → libc NULL-deref as before, just more frequent. The original "external parameter entity via DOCTYPE" theory doesn't hold: the minimal config without the DOCTYPE parses less XML than the system config, yet crashes more. That points at a flaky race / heap issue in the expat 2.6.1 + fontconfig stack that removing the DOCTYPE perturbed, not a deterministic content bug.

Net

Restore the previous (lower) crash rate now. The durable fix is still getting libexpat >= 2.7.5 onto the runner — the workaround step already auto-disables itself when it detects that version. That will be pursued separately.

Companion harness PR #322905 (fail fast on launch crash) stays in; it doesn't affect crash frequency, only how quickly/clearly a crash is surfaced.

Co-authored-by: Copilot [email protected]

…NULL-deref crash (#322909)"

This reverts commit 70c0a5d.

The change made the Linux Electron-Smoke crash *worse*, not better. Measured
against the PR workflow, the Linux / Electron-Smoke job failure rate rose from
~8% (1/13) before the merge to ~19% (8/43) after it — roughly double.

The original hypothesis (that fontconfig feeds the external DTD to expat as an
external parameter entity and triggers the not-yet-backported NULL-deref CVEs)
was not supported by the evidence. A proper frame-pointer backtrace of an
after-merge crash dump shows the same intermittent
libpangoft2 -> libfontconfig -> libexpat -> libc NULL-deref as before, just
more frequently. The minimal config without the DOCTYPE actually parses *less*
XML than the system config yet crashes more often, which points at a flaky
race/heap issue in the expat 2.6.1 + fontconfig stack that this change
perturbed rather than a deterministic content problem.

Revert to restore the previous, lower crash rate. The durable fix remains
shipping libexpat >= 2.7.5 on the runner (the workaround step already
auto-disables itself when that version is detected); that is being tracked
separately.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reverts the change from #322909 in the Linux smoke-test workflow by restoring the external DTD (<!DOCTYPE ...>) line in the generated minimal fontconfig config, returning the job to the previously observed (lower) crash rate behavior.

Changes:

  • Re-add the <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> line to /tmp/fonts-minimal.conf generation.
  • Restore/simplify the workaround commentary around the minimal fontconfig config.
Show a summary per file
File Description
.github/workflows/pr-linux-test.yml Restores the DOCTYPE line in the minimal fontconfig config used as the expat/fontconfig workaround for Linux smoke tests.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread .github/workflows/pr-linux-test.yml Resolved
TylerLeonhardt
TylerLeonhardt previously approved these changes Jun 25, 2026
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@alexdima
Alexandru Dima (alexdima) enabled auto-merge (squash) June 25, 2026 18:13
@alexdima
Alexandru Dima (alexdima) marked this pull request as draft June 25, 2026 18:23
auto-merge was automatically disabled June 25, 2026 18:23

Pull request was converted to draft

@alexdima

Copy link
Copy Markdown
Member Author

Update: I am trying to see if #323001 would be a better fix

@alexdima

Copy link
Copy Markdown
Member Author

closed in favor of a classical revert #323009

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants