Skip to content

go package causes segfault #136432

@patjgardner

Description

@patjgardner

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.0.28
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2b4cfb033757b63ab0b128d01c58db76480956f9
Last commit: 6 days ago
Core tap JSON: 12 Jul 15:36 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 2
Homebrew Ruby: 2.6.10 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/bin/ruby
CPU: dual-core 64-bit amd_k10
Clang: N/A
Git: 2.39.3 => /bin/git
Curl: 7.61.1 => /bin/curl
Kernel: Linux 4.18.0-477.15.1.el8_8.x86_64 x86_64 GNU/Linux
OS: Rocky Linux release 8.8 (Green Obsidian)
Host glibc: 2.28
/usr/bin/gcc: 8.5.0
/usr/bin/ruby: 2.5.9
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

brew doctor                                                                                                         
Your system is ready to brew.

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

I was trying to upgrade the oh-my-posh package to the latest version. When that failed, I noticed that the upgraded depended on running 'go', so I ran 'go' by itself with no arguments. This results in a segmentation fault.

What happened (include all command output)?

brew upgrade oh-my-posh in bash at 16:52:45
Running brew update --auto-update...
==> Upgrading 1 outdated package:
jandedobbeleer/oh-my-posh/oh-my-posh 12.2.1 -> 17.9.0
==> Fetching jandedobbeleer/oh-my-posh/oh-my-posh
==> Downloading https://github.com/JanDeDobbeleer/oh-my-posh/archive/v17.9.0.tar.gz
Already downloaded: /home/pat/.cache/Homebrew/downloads/e488ac0fbb26cb204c79cdf2a856ca6de41a1701a8b4fae70767e05d68c84d7f--oh-my-posh-17.9.0.tar.gz
==> Upgrading jandedobbeleer/oh-my-posh/oh-my-posh
12.2.1 -> 17.9.0

==> go build -o=oh-my-posh -ldflags="-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=17.9.0' -X 'github.com/jandedobbeleer/oh-my-posh/src/bui
Last 15 lines from /home/pat/.cache/Homebrew/Logs/oh-my-posh/01.build.Date=2023-07-10T06:33:36Z'":
2023-07-12 15:59:12 +0000

go build -o=oh-my-posh -ldflags="-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=17.9.0' -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Date=2023-07-10T06:33:36Z'"

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/jandedobbeleer/homebrew-oh-my-posh/issues

go in bash at 16:59:13
Segmentation fault
dmesg | grep seg
[ 939.334039] 8385 (go): Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already

What did you expect to happen?

Upgrade of oh-my-posh or execution of go command were expected to proceed without error.

Step-by-step reproduction instructions (by running brew commands)

brew upgrade oh-my-posh                                                                                             in bash at 16:52:45
Running `brew update --auto-update`...
==> Upgrading 1 outdated package:
jandedobbeleer/oh-my-posh/oh-my-posh 12.2.1 -> 17.9.0
==> Fetching jandedobbeleer/oh-my-posh/oh-my-posh
==> Downloading https://github.com/JanDeDobbeleer/oh-my-posh/archive/v17.9.0.tar.gz
Already downloaded: /home/pat/.cache/Homebrew/downloads/e488ac0fbb26cb204c79cdf2a856ca6de41a1701a8b4fae70767e05d68c84d7f--oh-my-posh-17.9.0.tar.gz
==> Upgrading jandedobbeleer/oh-my-posh/oh-my-posh
  12.2.1 -> 17.9.0

==> go build -o=oh-my-posh -ldflags="-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=17.9.0' -X 'github.com/jandedobbeleer/oh-my-posh/src/bui
Last 15 lines from /home/pat/.cache/Homebrew/Logs/oh-my-posh/01.build.Date=2023-07-10T06:33:36Z'":
2023-07-12 15:59:12 +0000

go build -o=oh-my-posh -ldflags="-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=17.9.0' -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Date=2023-07-10T06:33:36Z'"


If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/jandedobbeleer/homebrew-oh-my-posh/issues

go                                                                                                                  in bash at 16:59:13
Segmentation fault
dmesg | grep seg
[  939.334039] 8385 (go): Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReproducible Homebrew/homebrew-core bugoutdatedPR was locked due to agesupersededPR was replaced by another PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions