Skip to content

fix(linux/freebsd): truncate thread names to 15 characters - #5527

Merged
ReenigneArcher merged 2 commits into
LizardByte:masterfrom
psyke83:truncate_posix_threads
Aug 20, 2026
Merged

fix(linux/freebsd): truncate thread names to 15 characters#5527
ReenigneArcher merged 2 commits into
LizardByte:masterfrom
psyke83:truncate_posix_threads

Conversation

@psyke83

@psyke83 psyke83 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The Linux and FreeBSD kernels impose a strict 16 character limit (including null terminator), so truncate thread names on these platforms.

Although it might be simpler to manually truncate the thread names, we don't have the same naming length limitation on Windows and MacOS.

Fixes the following threads being left as the fallback "rtsp::handler", "session::audio" or "sunshine":

audio::pulseaudio
stream::controlBroadcast
stream::audioBroadcast
stream::videoBroadcast
TaskPool::worker

Description

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@psyke83
psyke83 force-pushed the truncate_posix_threads branch from 5479dc0 to 8d31c10 Compare August 19, 2026 05:31
The Linux and FreeBSD kernels impose a strict 16 character limit
(including null terminator), so truncate thread names on these platforms.

Although it might be simpler to manually truncate the thread names, we don't
have the same naming length limitation on Windows and MacOS.

Fixes the following threads being left as the fallback "rtsp::handler",
"session::audio" or "sunshine":

audio::pulseaudio
stream::controlBroadcast
stream::audioBroadcast
stream::videoBroadcast
TaskPool::worker
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.45%. Comparing base (6ad5f97) to head (3e5ba1b).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5527   +/-   ##
=======================================
  Coverage   32.45%   32.45%           
=======================================
  Files         104      104           
  Lines       24968    24970    +2     
  Branches    11084    11074   -10     
=======================================
+ Hits         8103     8105    +2     
- Misses      13826    13893   +67     
+ Partials     3039     2972   -67     
Flag Coverage Δ
Archlinux 0.00% <0.00%> (ø)
FreeBSD-amd64 18.27% <0.00%> (-0.01%) ⬇️
Homebrew-macos-14 28.13% <100.00%> (+<0.01%) ⬆️
Homebrew-macos-15 28.84% <100.00%> (+<0.01%) ⬆️
Homebrew-macos-26 28.95% <100.00%> (+<0.01%) ⬆️
Homebrew-ubuntu-24.04 18.95% <100.00%> (+<0.01%) ⬆️
Linux-AppImage 18.37% <0.00%> (-0.01%) ⬇️
Windows-AMD64 23.76% <100.00%> (ø)
Windows-ARM64 20.48% <50.00%> (-0.01%) ⬇️
macOS-arm64 25.38% <0.00%> (-0.01%) ⬇️
macOS-x86_64 26.03% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/common.h 58.59% <ø> (ø)
src/platform/linux/misc.cpp 15.74% <100.00%> (+0.12%) ⬆️
src/platform/macos/misc.mm 23.96% <100.00%> (+0.19%) ⬆️
src/platform/windows/misc.cpp 16.49% <100.00%> (ø)

... and 44 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ad5f97...3e5ba1b. Read the comment docs.

@github-actions

Copy link
Copy Markdown
Last Updated 2026-08-20 03:13:32 UTC
Source Run CI Run #5029
Commit 3e5ba1b979c2bd297dec575034ef3ca03bd90a7b

Screenshot Comparison

PR #5527 screenshots vs screenshots baseline.

Matrix: AppImage

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcher merged commit 9e1f089 into LizardByte:master Aug 20, 2026
70 checks passed
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.

2 participants