Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qmuntal opened this issue Nov 20, 2024 · 3 comments
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@qmuntal
Copy link
Member

qmuntal commented Nov 20, 2024

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.

@qmuntal qmuntal added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 20, 2024
@qmuntal qmuntal 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 Nov 20, 2024
@ianlancetaylor
Copy link
Member

CC @mknyszek

@gabyhelp
Copy link

Related Code Changes

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

@gopherbot
Copy link
Contributor

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

@dmitshur dmitshur added this to the Go1.24 milestone Nov 20, 2024
@dmitshur dmitshur added Testing An issue that has been verified to require only test changes, not just a test failure. FixPending Issues that have a fix which has not yet been reviewed or submitted. labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants