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/objdump: TestDisasmCode fails with "no runtime.symtab symbol found" on AIX #40972

Closed
alexbrainman opened this issue Aug 22, 2020 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-AIX
Milestone

Comments

@alexbrainman
Copy link
Member

I just submitted https://go-review.googlesource.com/c/go/+/240957

The CL broke aix-ppc64 build https://build.golang.org/log/75e953b5afd44cd7dc7cd40db4f7c3d5ab0f853b

--- FAIL: TestDisasmCode (4.49s)
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-7f184b50e2cba293836d4b2309588185.exe fmthello.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -S -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-7f184b50e2cba293836d4b2309588185.exe]
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-50c34f7265eea30b52665e483079b0c1.exe fmthellocgo.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -S -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-50c34f7265eea30b52665e483079b0c1.exe]
    objdump_test.go:202: objdump "fmthellocgo.exe": exit status 1
        objdump: disassemble /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-50c34f7265eea30b52665e483079b0c1.exe: no runtime.symtab symbol found
--- FAIL: TestDisasm (4.50s)
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-ea6f791f716c96f8441f99ba474a41f0.exe fmthello.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-ea6f791f716c96f8441f99ba474a41f0.exe]
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-a6acfb7e9d32782fea9814ad1314bef1.exe fmthellocgo.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-a6acfb7e9d32782fea9814ad1314bef1.exe]
    objdump_test.go:202: objdump "fmthellocgo.exe": exit status 1
        objdump: disassemble /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-a6acfb7e9d32782fea9814ad1314bef1.exe: no runtime.symtab symbol found
--- FAIL: TestDisasmGnuAsm (4.51s)
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-a2fdf6fa5e30e7eb2b8d7d63be13b362.exe fmthello.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -gnu -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-a2fdf6fa5e30e7eb2b8d7d63be13b362.exe]
    objdump_test.go:145: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/bin/go build -o /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-739d837da95c25909d2915651b14619d.exe fmthellocgo.go]
    objdump_test.go:198: Running [/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/testobjdump.exe -gnu -s main.main /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-739d837da95c25909d2915651b14619d.exe]
    objdump_test.go:202: objdump "fmthellocgo.exe": exit status 1
        objdump: disassemble /ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/TestObjDump902713307/hello-739d837da95c25909d2915651b14619d.exe: no runtime.symtab symbol found
FAIL
FAIL	cmd/objdump	6.060s
FAIL
go tool dist: Failed: exit status 1

The CL changes Windows specific code. But it extended the test to include testing against cgo binaries. And that feature appears to broken on AIX. I don't know how to fix the feature, but I will disable new test code for AIX in the meantime.

Alex

@gopherbot
Copy link

Change https://golang.org/cl/249760 mentions this issue: cmd/objdump: skip cgo test in testGoAndCgoDisasm on AIX

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 22, 2020
@dmitshur dmitshur added this to the Go1.16 milestone Aug 22, 2020
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. OS-AIX Testing An issue that has been verified to require only test changes, not just a test failure. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 22, 2020
gopherbot pushed a commit that referenced this issue Aug 22, 2020
Updates #40972.

Change-Id: Id2092f0bef4fb4bdc4178e7bc9730716136f7b8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/249760
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed 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. labels Aug 22, 2020
@Helflym
Copy link
Contributor

Helflym commented Sep 17, 2020

These errors are expected. Cgo programs are linked using external linker on AIX, and objdump doesn't seem to work with ppc64 and external linker (cf TestDisasmExtld)

@aclements
Copy link
Member

Is there an actual bug to track at this point? If this isn't expected to work, then we should close this since the test is now disabled on AIX. Or is the bug that objdump doesn't work with externally linked binaries on AIX?

@Helflym
Copy link
Contributor

Helflym commented Dec 8, 2020

I didn't have time to investigate further. But the bug is triggered because runtime.symtab is not found. AIX linker seems to think this symbol along with runtime.esymtab is not needed (or at least not reached), thus it removes it from the final link.
Thus, the whole command objdump doesn't work with AIX externally linked programs.

@aclements
Copy link
Member

I've confirmed this is still happening by reverting CL 249760 (had to be done by hand) and running

VM=$(gomote create  aix-ppc64) && \
gomote push $VM && \
gomote run $VM go/src/make.bash && \
gomote run $VM go/bin/go test cmd/objdump

I think the error bubbles up from cmd/internal/objfile, so it probably affects all of the inspection tools.

@jeremyfaller , I'm guessing this is in your wheelhouse because of the pclntab redesign. A lot of your pclntab changes landed after this failure, but the failure is the same.

@gopherbot
Copy link

Change https://golang.org/cl/279995 mentions this issue: cmd/internal/objfile: don't require runtime.symtab symbol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-AIX
Projects
None yet
Development

No branches or pull requests

5 participants