Skip to content

misc/cgo/testplugin: test consistently failing on android-arm-corellium and android-arm64-corellium #58170

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

Closed
bcmills opened this issue Jan 31, 2023 · 2 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done. OS-Android
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 31, 2023

https://build.golang.org/log/f536915f21090bf85a867d60e5e0a62652429986:

##### ../misc/cgo/testplugin
mkdir -p $TMPDIR/src/testplugin
rsync -a testdata/ $TMPDIR/src/testplugin
echo 'module testplugin' > $TMPDIR/src/testplugin/go.mod
mkdir -p $TMPDIR/alt/src/testplugin
rsync -a altpath/testdata/ $TMPDIR/alt/src/testplugin
echo 'module testplugin' > $TMPDIR/alt/src/testplugin/go.mod
cd $TMPDIR/alt/src/testplugin
( GOPATH=$TMPDIR/alt PWD=$TMPDIR/alt/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin -o $TMPDIR/src/testplugin/plugin-mismatch.so ./plugin-mismatch )
cd $TMPDIR/src/testplugin
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin ./plugin1 )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin ./plugin2 )
cp plugin2.so plugin2-dup.so
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin -o=sub/plugin1.so ./sub/plugin1 )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin -o=unnamed1.so ./unnamed1/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin -o=unnamed2.so ./unnamed2/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -o host.exe ./host )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go run -gcflags '' ./checkdwarf/main.go plugin2.so plugin2.UnexportedNameReuse )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go run -gcflags '' ./checkdwarf/main.go ./host.exe main.main )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./host.exe )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin ./iface_a )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -buildmode=plugin ./iface_b )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/bin/go build -gcflags '' -o iface.exe ./iface )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./iface.exe )
--- FAIL: TestUniqueTypesAndItabs (2.35s)
    plugin_test.go:201: ./iface.exe: exit status 2
        panic: empty interfaces not equal
        
        goroutine 1 [running]:
        panic({0x555cb2d180?, 0x555cb4b000?})
        	/data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/src/runtime/panic.go:1015 +0x3fc fp=0x40000b5e60 sp=0x40000b5d90 pc=0x555ca7a07c
        main.main()
        	/data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/tmp/plugin_test261215192/src/testplugin/iface/main.go:33 +0x5fc fp=0x40000b5f70 sp=0x40000b5e60 pc=0x555cb1d8bc
        runtime.main()
        	/data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/src/runtime/proc.go:250 +0x200 fp=0x40000b5fd0 sp=0x40000b5f70 pc=0x555ca7cd00
        runtime.goexit()
        	/data/data/com.termux/files/home/tmpdir/workdir-host-android-arm64-corellium-android/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x40000b5fd0 sp=0x40000b5fd0 pc=0x555caaa0e4
@bcmills
Copy link
Contributor Author

bcmills commented Jan 31, 2023

I think this started failing as of CL 463992, which made cmd/dist consistent with the rest of the toolchain w.r.t. whether plugin mode is supported.

It appears that plugin mode doesn't work on these platforms after all.

(attn @ianlancetaylor @golang/android)

@bcmills bcmills added OS-Android NeedsFix The path to resolution is known, but the work has not been done. mobile Android, iOS, and x/mobile labels Jan 31, 2023
@bcmills bcmills added this to the Go1.21 milestone Jan 31, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/464339 mentions this issue: cmd/dist, internal/platform: remove some target modes that fail

johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
Before CL 463992 there were some cases that cmd/dist did not test
but that platform.BuildModeSupport permitted. In CL 463992 those
conflicts were resolved in favor of platform.BuildModeSupport.
However, further testing has uncovered some cases that do not in
fact work. Adjust those in both cmd/dist and internal/platform.

In particular, mark android-arm and android-arm64 as not supporting
plugin mode.  Sample failure:
    https://build.golang.org/log/ebba858ea9f94f076966d8cfd42348a0e9345095

Mark ios as not supporting c-archive mode.  Sample failure:
    https://build.golang.org/log/e78a58189d94b90dc6d4b2e01a1b4a0b35d63792

Fixes golang#58170
Fixes golang#58172

Change-Id: Ic1bd18e36382cac0779aad48cb6e7b1de8eeb10d
Reviewed-on: https://go-review.googlesource.com/c/go/+/464339
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
@golang golang locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done. OS-Android
Projects
None yet
Development

No branches or pull requests

2 participants