mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-15 15:45:49 -06:00
[GH-ISSUE #1025] Segfault on publish (installed with nix) #719
Labels
No labels
ai-generated
android-app
android-app
android-app
build
build
dependencies
docs
enhancement
enhancement
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
server
server
unified-push
web-app
website
🔒 security
🔥 HOT
🪲 bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ntfy#719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @antony-frolov on GitHub (Feb 14, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1025
🐞 Describe the bug
Got a segfault error when running publish command. Installed ntfy with nix on ubuntu 18.04.
💻 Components impacted
ntfy server
💡 Screenshots and/or logs
🔮 Additional context
@pcouy commented on GitHub (Feb 23, 2024):
I am having the exact same issue with a docker compose setup. The program counter in the error message differs from the one above, but the call stack is the same.
I'm running
ntfy 2.8.0 (aaa4976), runtime go1.21.3, built at 2023-11-19T21:51:43Z@binwiederhier commented on GitHub (Mar 7, 2024):
This is wild. The thing that's failing is the
user.Current()call, which means that Go cannot determine the current Linux/Windows user. I added logging hereef302d22a9so we can get an error message, and avoid a panic.Once I release this (which should be shortly), you can give me more details on the error.
@binwiederhier commented on GitHub (Mar 24, 2024):
Can you try again with the latest release and give me the error message?
@antony-frolov commented on GitHub (Mar 24, 2024):
tried the same command with the latest release and it works fine! so the issue is solved for me i guess
@binwiederhier commented on GitHub (Mar 25, 2024):
Does it print a warning?
@antony-frolov commented on GitHub (Mar 25, 2024):
it does
2024/03/25 16:37:22 WARN Could not determine default client config file: could not determine current user: user: unknown userid 451693@binwiederhier commented on GitHub (Mar 25, 2024):
This fails: https://github.com/binwiederhier/ntfy/blob/main/cmd/subscribe.go#L328-L331
This is a Go standard library call to determine the current user. If this fails, something on your system regarding your current user is unusual or wrong. Check if
id,cat /etc/passwd | grep $USERandecho $USERall add up.@antony-frolov commented on GitHub (Mar 25, 2024):
there is indeed something unusual, user info on our VMs is stored not in
/etc/passwdbut in some database common for all VMs i guess. so i can only get my user info withgetent passwd $USER@binwiederhier commented on GitHub (Mar 25, 2024):
I would have thought that Go does that under the hood 🤷