[Midnightbsd-cvs] [MidnightBSD/mports] 347cc0: net-im/telegram-desktop: limit build parallelism t...

Lucas Holt noreply at github.com
Mon Sep 7 19:25:33 EDT 2026


  Branch: refs/heads/net-im/telegram-desktop
  Home:   https://github.com/MidnightBSD/mports
  Commit: 347cc0a234ba6296c6ee85cbc085137864c6f338
      https://github.com/MidnightBSD/mports/commit/347cc0a234ba6296c6ee85cbc085137864c6f338
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-07 (Mon, 07 Sep 2026)

  Changed paths:
    M net-im/telegram-desktop/Makefile

  Log Message:
  -----------
  net-im/telegram-desktop: limit build parallelism to fix clang crashes

telegram-desktop failed to build with clang dying partway through parsing the
generated gi/gio bindings:

  c++: error: clang frontend command failed with exit code 138
  ...
  gen/gio/tlsdatabase_impl.hpp:483:1: parsing function body
    'gi::repository::Gio::impl::internal::TlsDatabaseClassDef::cl...'

Exit 138 is SIGBUS. This is resource exhaustion from build parallelism, not a
compiler bug:

  base clang 19.1.7, 16 jobs                 5 crashes
  devel/llvm21 clang 21.1.8, 16 jobs         3 crashes
  devel/llvm21 clang 21.1.8, 16 jobs,
    stack raised to 512 MB                   7 crashes
  base clang 19.1.7, 8 jobs                  builds
  base clang 19.1.7, 4 jobs                  builds
  base clang 19.1.7, 2 jobs                  builds

Both compilers crash at high parallelism and both succeed at low parallelism,
and which file dies varies between runs (tlsdatabase_impl.hpp,
tlsinteraction_impl.hpp, file_impl.hpp), which is what a resource limit looks
like rather than a deterministic frontend bug. A newer compiler is not needed.

Stack limit was investigated and ruled out: the soft limit here is 12.2 MB and
SIGBUS is consistent with stack growth failure, but raising it to 512 MB made
things worse rather than better.

The limit is set to 4 rather than the 8 that was verified. This machine has
31.7 GB across 16 cores, so roughly 4 GB per job is required and a 16 GB
builder would still fail at 8. MAKE_JOBS_NUMBER_LIMIT only caps the job count,
so machines with fewer cores are unaffected. java/openjdk17 uses 3 and
www/qt6-webengine uses 1 for the same reason.

Built, staged and packaged on MidnightBSD 4.2 amd64 with the base compiler and
the limit in place: no crashes, no errors, telegram-desktop-6.5.0_5.mport
created.

AI-Assisted-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkHF8bn8Ehit2aSoWjCshm
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list