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/link: TestRuntimeTypeAttr broken on ppc64, solaris #24983

Closed
josharian opened this issue Apr 21, 2018 · 8 comments
Closed

cmd/link: TestRuntimeTypeAttr broken on ppc64, solaris #24983

josharian opened this issue Apr 21, 2018 · 8 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

Introduced in https://golang.org/cl/106775.

cc @heschik

@gopherbot
Copy link

Change https://golang.org/cl/108575 mentions this issue: cmd/link: skip TestRuntimeTypeAttr to fix build

gopherbot pushed a commit that referenced this issue Apr 21, 2018
Updates #24983 

Change-Id: I417453364346106d4ff4c99549175cef7df724e3
Reviewed-on: https://go-review.googlesource.com/108575
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
@gopherbot
Copy link

Change https://golang.org/cl/108955 mentions this issue: cmd/link: fix TestRuntimeTypeAttr on ppc64,solaris

@FiloSottile FiloSottile added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 24, 2018
@FiloSottile FiloSottile added this to the Go1.11 milestone Apr 24, 2018
@randall77
Copy link
Contributor

I think I'm still running into this problem. When I do GOARCH=386 ./all.bash on Darwin, I get:

--- FAIL: TestRuntimeTypeAttr (0.43s)
    --- FAIL: TestRuntimeTypeAttr/flags=-ldflags=-linkmode=external (0.27s)
    	dwarf_test.go:856: could not run test program: exit status 2
FAIL
FAIL	cmd/link/internal/ld	17.431s

@randall77 randall77 reopened this Apr 25, 2018
@randall77
Copy link
Contributor

I've verified that this works on Darwin 1.11 but not 1.12. That's why the builder isn't failing, it is 1.11.
Presumably the host linker is barfing on something?

@heschi
Copy link
Contributor

heschi commented Apr 25, 2018

I see:

fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x40a73f8, 0x21)
        /Users/heschi/go/src/runtime/panic.go:589 +0x5b fp=0xbffffb5c sp=0xbffffb48 pc=0x4023ccb
runtime.goenvs()
        /Users/heschi/go/src/runtime/os_darwin.go:129 +0x63 fp=0xbffffb70 sp=0xbffffb5c pc=0x4022043
runtime.schedinit()
        /Users/heschi/go/src/runtime/proc.go:505 +0xaf fp=0xbffffba0 sp=0xbffffb70 pc=0x402612f
runtime.rt0_go(0xbffffc48, 0xc, 0x4194306, 0x0, 0x41b598a, 0x57e5003b, 0x4000000, 0xbffffca0, 0xbffffc50, 0xbffffc18, ...)
        /Users/heschi/go/src/runtime/asm_386.s:268 +0x1bc fp=0xbffffba4 sp=0xbffffba0 pc=0x40452bc

when I try to run a hello world program built with -linkmode=external. I can skip the test, but it seems like this is worth its own bug, presuming that we want external linking to work on darwin-386.

@randall77
Copy link
Contributor

I can get external linking to work (on 10.12).

$ GOARCH=386 go build -ldflags=-linkmode=external helloworld.go
$ ./helloworld
hello, world!
$ file helloworld
helloworld: Mach-O executable i386
$ otool -L helloworld
helloworld:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

@heschi
Copy link
Contributor

heschi commented Apr 25, 2018

Filed #25083, though I still don't know why it works for your helloworld but not the test.

@heschi
Copy link
Contributor

heschi commented May 1, 2018

I think Keith fixed this by switching to libc to create threads.

@heschi heschi closed this as completed May 1, 2018
@golang golang locked and limited conversation to collaborators May 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants