Skip to content

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

Merged
deepak1556 merged 4 commits intomainfrom
robo/debug_font_config
Apr 8, 2026
Merged

ci: bump github runner to ubuntu-24.04 to address fontconfig crash #308495
deepak1556 merged 4 commits intomainfrom
robo/debug_font_config

Conversation

@deepak1556
Copy link
Copy Markdown
Collaborator

@deepak1556 deepak1556 commented Apr 8, 2026

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 deepak1556 self-assigned this Apr 8, 2026
Copilot AI review requested due to automatic review settings April 8, 2026 12:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 Outdated
Comment thread .github/workflows/pr-linux-test.yml
@deepak1556
Copy link
Copy Markdown
Collaborator Author

deepak1556 commented Apr 8, 2026

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 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 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 deepak1556 marked this pull request as ready for review April 8, 2026 14:04
@deepak1556 deepak1556 marked this pull request as draft April 8, 2026 14:07
@deepak1556 deepak1556 added this to the 1.116.0 milestone Apr 8, 2026
@deepak1556 deepak1556 marked this pull request as ready for review April 8, 2026 14:19
@deepak1556 deepak1556 enabled auto-merge (squash) April 8, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants