Skip to content

ci: bump github runner to ubuntu-24.04 to address fontconfig crash - #308495

Merged
Robo (deepak1556) merged 4 commits into
mainfrom
robo/debug_font_config
Apr 8, 2026
Merged

Robo (deepak1556) merged 4 commits into
mainfrom
robo/debug_font_config

Conversation

@deepak1556

@deepak1556 Robo (deepak1556) commented Apr 8, 2026 •

Copy link
Copy Markdown
Collaborator

For https://github.com/microsoft/vscode/actions/runs/24122759225/job/70380360453?pr=293913

Crash reason:  SIGSEGV /0x00000080
Crash address: 0x0
Process uptime: 1 seconds

thread_name[24]
  thread_name_rva             = 0x85d0
  thread_name                 = "[pango] FcInit"

Thread 24 (crashed)
 0  libc.so.6 + 0x44c1d
    rax = 0x0000000000000013   rdx = 0x00007f4c734ec185
    rcx = 0x00007f4c72646cbf   rbx = 0x000026180007c600
    rsi = 0x0000000000000008   rdi = 0x00007f4c734ec185
    rbp = 0x0000000000005845   rsp = 0x00007f4b5ffe34d0
     r8 = 0x0000000000000000    r9 = 0x00007f4b5ffe3520
    r10 = 0x0000000000000000   r11 = 0x0000000000000293
    r12 = 0x00cb070000000000   r13 = 0x0000000000000013
    r14 = 0x0000000000000011   r15 = 0x00007f4c734ec187
    rip = 0x00007f4c72644c1d
    Found by: given as instruction pointer in context
 1  libexpat.so.1 + 0x2288f
    rsp = 0x00007f4b5ffe3510   rip = 0x00007f4c734e588f
    Found by: stack scanning
 2  libexpat.so.1 + 0x22a49
    rsp = 0x00007f4b5ffe3540   rip = 0x00007f4c734e5a49
    Found by: stack scanning
 3  libexpat.so.1 + 0x11664
    rsp = 0x00007f4b5ffe35b0   rip = 0x00007f4c734d4664
    Found by: stack scanning
 4  libfontconfig.so.1 + 0x2e333
    rsp = 0x00007f4b5ffe35e0   rip = 0x00007f4c72138333
    Found by: stack scanning

Root cause: Chromium's InitializeGlobalFontConfigAsync posts FcInit to a thread pool worker (crbug.com/404311), while pango's pangoft2 backend independently calls FcInit from its own thread during GTK
initialization. Fontconfig 2.13.1 (shipped in ubuntu-22.04) lacks thread-safe initialization — concurrent first-time FcInit calls race and both enter FcConfigParse, corrupting shared global state. This causes expat (called by fontconfig to parse fonts.conf) to dereference a NULL pointer.

ubuntu-24.04 ships fontconfig 2.15.0 which includes the thread-safe initialization from 2.14+.

@deepak1556 Robo (deepak1556) self-assigned this Apr 8, 2026
Copilot AI review requested due to automatic review settings April 8, 2026 12:50

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

Adds a diagnostic step to the Linux PR test workflow to help investigate a suspected fontconfig-related crash during app launch in CI.

Changes:

  • Print installed font-related package versions and installed font packages.
  • Validate /etc/fonts/fonts.conf and /etc/fonts/conf.d/*.conf with xmllint.
  • Attempt to clear and rebuild fontconfig caches and print the fontconfig version.

Comment thread .github/workflows/pr-linux-test.yml Resolved
Comment thread .github/workflows/pr-linux-test.yml Resolved
@deepak1556

Robo (deepak1556) commented Apr 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

libexpat is on v2.4.7, very likely related to libexpat/libexpat@e5d6bf0 which is only fixed from v2.6.3

Never mind, the version carries the patches https://launchpadlibrarian.net/846116146/expat_2.4.7-1ubuntu0.6_2.4.7-1ubuntu0.7.diff.gz

Fixes an intermittent SIGSEGV on the [pango] FcInit thread during
Electron startup in CI integration tests.

Root cause: Chromium's InitializeGlobalFontConfigAsync() posts FcInit()
to a thread pool worker (crbug.com/404311), while pango's pangoft2
backend independently calls FcInit() from its own thread during GTK
initialization. fontconfig 2.13.1 (shipped in ubuntu-22.04) lacks
thread-safe initialization — concurrent first-time FcInit() calls
race and both enter FcConfigParse(), corrupting shared global state.
This causes expat (called by fontconfig to parse fonts.conf) to
dereference a NULL pointer.

ubuntu-24.04 ships fontconfig 2.15.0 which includes the thread-safe
initialization from 2.14+.
@deepak1556 Robo (deepak1556) changed the title ci: debug fontconfig crash during app launch ci: bump to github runner to ubuntu-24.04 to address fontconfig crash Apr 8, 2026
@deepak1556 Robo (deepak1556) changed the title ci: bump to github runner to ubuntu-24.04 to address fontconfig crash ci: bump github runner to ubuntu-24.04 to address fontconfig crash Apr 8, 2026
@deepak1556
Robo (deepak1556) marked this pull request as ready for review April 8, 2026 14:04
@deepak1556
Robo (deepak1556) marked this pull request as draft April 8, 2026 14:07
@deepak1556 Robo (deepak1556) added this to the 1.116.0 milestone Apr 8, 2026
@deepak1556
Robo (deepak1556) marked this pull request as ready for review April 8, 2026 14:19
@deepak1556
Robo (deepak1556) enabled auto-merge (squash) April 8, 2026 14:19
@deepak1556
Robo (deepak1556) merged commit 1f40e56 into main Apr 8, 2026
23 checks passed
@deepak1556
Robo (deepak1556) deleted the robo/debug_font_config branch April 8, 2026 14:47
Michael Lively (Yoyokrazy) added a commit that referenced this pull request Apr 22, 2026
Linux electron tests were stabilized by moving to ubuntu-24.04 in #308495
and #309451. Keep that runner GH-hosted while the rest of the PR workflows
use 1ES self-hosted pools.

Co-authored-by: Copilot <[email protected]>
Michael Lively (Yoyokrazy) added a commit that referenced this pull request Apr 22, 2026
…311975)

* ci: switch PR workflows back to 1ES self-hosted runners with JobId

Reverts the GitHub-hosted runner switch for ubuntu/windows jobs in pr*.yml
and adds a unique JobId label per job, per the IcM mitigation. The JobId
ensures 1ES pool runs are scoped to a specific GitHub Actions run+attempt,
which prevents the cancellation issues that occurred with bare pool labels.

Pool labels:
- 1es-vscode-oss-ubuntu-22.04-x64
- 1es-vscode-oss-windows-2022-x64

macOS jobs (pr-darwin-test.yml, pr-node-modules macOS) remain on
GitHub-hosted runners as no 1ES macOS pool exists.

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

* ci: keep pr-linux-test.yml on ubuntu-24.04 GH-hosted runner

Linux electron tests were stabilized by moving to ubuntu-24.04 in #308495
and #309451. Keep that runner GH-hosted while the rest of the PR workflows
use 1ES self-hosted pools.

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

* ci: include inputs.job_name in JobId for reusable test workflows

pr-win32-test.yml is invoked 3x from pr.yml (Electron/Browser/Remote) and
without a per-invocation discriminator all 3 jobs share the same JobId
within a run, defeating the 1ES per-job scoping. Add inputs.job_name to
the JobId prefix so each invocation is distinct. Apply the same defense
to pr-linux-cli-test.yml for safety.

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

---------

Co-authored-by: Copilot <[email protected]>
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 23, 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.

3 participants