[PR #2197] [MERGED] fix(build): add osusergo tag to prevent SIGFPE crash under systemd #8109

Closed
opened 2026-04-20 18:02:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2197
Author: @kolaente
Created: 2/5/2026
Status: ✅ Merged
Merged: 2/5/2026
Merged by: @kolaente

Base: main ← Head: fix/osusergo-systemd-crash


📝 Commits (1)

  • 6de3d74 fix(build): add osusergo tag to prevent SIGFPE crash under systemd

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 magefile.go (+5 -1)

📄 Description

When running Vikunja as a systemd service without HOME set, the AWS SDK's init() function calls os/user.Current() which uses CGO's getpwuid_r(). This can cause a SIGFPE crash in certain restricted environments.

Adding the osusergo build tag forces Go to use its pure implementation that parses /etc/passwd directly, avoiding the problematic CGO call.

Fixes #2170


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2197 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/osusergo-systemd-crash` --- ### 📝 Commits (1) - [`6de3d74`](https://github.com/go-vikunja/vikunja/commit/6de3d748ab15978f1e82224d20bb8427c6cb4b43) fix(build): add osusergo tag to prevent SIGFPE crash under systemd ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `magefile.go` (+5 -1) </details> ### 📄 Description When running Vikunja as a systemd service without HOME set, the AWS SDK's init() function calls os/user.Current() which uses CGO's getpwuid_r(). This can cause a SIGFPE crash in certain restricted environments. Adding the osusergo build tag forces Go to use its pure implementation that parses /etc/passwd directly, avoiding the problematic CGO call. Fixes #2170 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:02:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8109