Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CGO] Frequent segmentation faults on build. #75176

Open
Labels
BugReportIssues describing a possible bug in the Go implementation. WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.
@henderkes

Description

Go version

1.23-1.25

Output of go env in your module/workspace:

Many different workspaces.

What did you do?

We're trying to compile FrankenPHP, either linking against libphp.a or libphp.so. We frequently encounter segmentation faults (and other weird behaviour with Go's gcc invocations), that only happen with FrankenPHP and other Go programs. Previous embed tests (embedding libphp.a/.so in a C/C++ application) work perfectly fine.

These issues range from failures to build, to startup relocation failures of standard libraries like libc, to startup relocation failures of libphp.so, to runtime startup failures. I have unfortunately never been successful in tracking them down, the only common denominator is that it only happens when Go programs link against C libraries. Sometimes the segmentation faults are reproducible (either by libc choice, or by optimisation options), other times they occur randomly and the next recompile produces a working binary.

What did you see happen?

php/frankenphp#1829
php/frankenphp#1755
and a whole bunch of other, intermittent failures that just randomly occurred and then went away.

What did you expect to see?

Compilation and run success, each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation. WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /