Skip to content

cmd/cgo/internal/testsanitizers: failures with setarch: failed to set personality to x86_64: Operation not permitted #70463

Closed
@qmuntal

Description

@qmuntal

Proposal Details

I'm seeing the following error when running gotip tool dist test in a Ubuntu 22.04 container image:

--- FAIL: TestShared (0.00s)
    --- FAIL: TestShared/tsan_shared (8.58s)
        cshared_test.go:105: /usr/bin/setarch x86_64 -R /tmp/TestShared2916998830/tsan_shared exited with exit status 1
            setarch: failed to set personality to x86_64: Operation not permitted
--- FAIL: TestTSAN (51.46s)
    --- FAIL: TestTSAN/tsan (1.95s)
        tsan_test.go:88: /usr/bin/setarch x86_64 -R /tmp/TestTSAN2318749046/tsan exited with exit status 1
            setarch: failed to set personality to x86_64: Operation not permitted

The setarch normally needs the --privileged flag to be passed to docker run, but I would rather try to avoid that. In fact, setarch was introduced in CL 623956 to fix the following test issue: #59418, which it did, but also introduced the issue reported in here.

Activity

added
NeedsFixThe path to resolution is known, but the work has not been done.
on Nov 20, 2024
changed the title [-]cmd/cgo/internal/testsanitizers: TestShared/tsan_shared failed[/-] [+]cmd/cgo/internal/testsanitizers: failures with `setarch: failed to set personality to x86_64: Operation not permitted`[/+] on Nov 20, 2024
ianlancetaylor

ianlancetaylor commented on Nov 20, 2024

@ianlancetaylor
Contributor
gabyhelp

gabyhelp commented on Nov 20, 2024

@gabyhelp

Related Code Changes

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

gopherbot

gopherbot commented on Nov 20, 2024

@gopherbot
Contributor

Change https://go.dev/cl/630096 mentions this issue: cmd/cgo/internal/testsanitizers: fix TSAN tests using setarch

added this to the Go1.24 milestone on Nov 20, 2024
added
TestingAn issue that has been verified to require only test changes, not just a test failure.
FixPendingIssues that have a fix which has not yet been reviewed or submitted.
on Nov 20, 2024
added a commit that references this issue on Nov 20, 2024
5254e98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dmitshur@ianlancetaylor@qmuntal@gopherbot@gabyhelp

        Issue actions

          cmd/cgo/internal/testsanitizers: failures with `setarch: failed to set personality to x86_64: Operation not permitted` · Issue #70463 · golang/go