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

test/fixedbugs: issue11656.go fails on s390x/z13 with SIGILL #44028

Closed
jcajka opened this issue Jan 31, 2021 · 3 comments
Closed

test/fixedbugs: issue11656.go fails on s390x/z13 with SIGILL #44028

jcajka opened this issue Jan 31, 2021 · 3 comments
Labels
arch-s390x Issues solely affecting the s390x architecture. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@jcajka
Copy link
Contributor

jcajka commented Jan 31, 2021

What version of Go are you using (go version)?

go1.16beta1
go1.15.6
as bootstrap compiler.

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

linux/s390x on z13

What did you do?

./run.bash

What did you expect to see?

Go testsuite passes.

What did you see instead?

##### ../test
# go tool dist test -run=^test:0_1$
run: go list -gcflags=all= -ldflags=all= -f={{if .Stale}}	STALE {{.ImportPath}}: {{.StaleReason}}{{end}} std DONE
/tmp/runtest-658454220.exe --shard=0 --shards=1
# go run run.go -- fixedbugs/issue11656.go
exit status 2
SIGILL: illegal instruction
PC=0xc0000b2082 m=0 sigcode=1
instruction bytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
goroutine 1 [running]:
runtime: unknown pc 0xc0000b2082
stack: frame={sp:0xc000093238, fp:0x0} stack=[0xc000092000,0xc000094000)
000000c000093138:  0000000000000000  0000000000000000 
000000c000093148:  0000000000000000  000000000005c1ea <runtime.growslice+298> 
000000c000093158:  0000000000000000  0000000000000000 
000000c000093168:  0000000000000000  0000000000000000 
000000c000093178:  0000000000000000  0000000000000000 
000000c000093188:  0100000000000000  0080000000000000 
000000c000093198:  000003ff9042d4d0  0000000000000000 
000000c0000931a8:  0000000000000080  000003ffb70be5b8 
000000c0000931b8:  0000000000000080  000000c0000b2080 
000000c0000931c8:  0000000000144680  0000000000000000 
000000c0000931d8:  0000000000000000  000000000009436e <main.f+94> 
000000c0000931e8:  000000c0000b2080  000000c000093298 
000000c0000931f8:  0000000000000040  000000c0000b2080 
000000c000093208:  0000000000000044  0000000000000080 
000000c000093218:  0000000000000040  0000000000000080 
000000c000093228:  000000c0000b2080  000000c0000b2080 
000000c000093238: <000000000009441e <main.f+270>  00000000000a9fa0 
000000c000093248:  000000c000093298  0000000000000040 
000000c000093258:  0000000000000040  0000000000000044 
000000c000093268:  000000c0000b2080  0000000000000040 
000000c000093278:  0000000000000080  0000000000000000 
000000c000093288:  0000000000000000  000000c0000b2080 
000000c000093298:  0000000000000000  0000000000000000 
000000c0000932a8:  0000000000000000  0000000000000000 
000000c0000932b8:  0000000000000000  0000000000000000 
000000c0000932c8:  0000000000000000  0000000000000000 
000000c0000932d8:  000000000009441e <main.f+270>  0000000000000000 
000000c0000932e8:  0000000000000000  0000000000000000 
000000c0000932f8:  0000000000000000  0000000000000000 
000000c000093308:  0000000000000000  0000000000000000 
000000c000093318:  0000000000000000  0000000000000000 
000000c000093328:  0000000000000000  0000000000000000 
runtime: unknown pc 0xc0000b2082
stack: frame={sp:0xc000093238, fp:0x0} stack=[0xc000092000,0xc000094000)
000000c000093138:  0000000000000000  0000000000000000 
000000c000093148:  0000000000000000  000000000005c1ea <runtime.growslice+298> 
000000c000093158:  0000000000000000  0000000000000000 
000000c000093168:  0000000000000000  0000000000000000 
000000c000093178:  0000000000000000  0000000000000000 
000000c000093188:  0100000000000000  0080000000000000 
000000c000093198:  000003ff9042d4d0  0000000000000000 
000000c0000931a8:  0000000000000080  000003ffb70be5b8 
000000c0000931b8:  0000000000000080  000000c0000b2080 
000000c0000931c8:  0000000000144680  0000000000000000 
000000c0000931d8:  0000000000000000  000000000009436e <main.f+94> 
000000c0000931e8:  000000c0000b2080  000000c000093298 
000000c0000931f8:  0000000000000040  000000c0000b2080 
000000c000093208:  0000000000000044  0000000000000080 
000000c000093218:  0000000000000040  0000000000000080 
000000c000093228:  000000c0000b2080  000000c0000b2080 
000000c000093238: <000000000009441e <main.f+270>  00000000000a9fa0 
000000c000093248:  000000c000093298  0000000000000040 
000000c000093258:  0000000000000040  0000000000000044 
000000c000093268:  000000c0000b2080  0000000000000040 
000000c000093278:  0000000000000080  0000000000000000 
000000c000093288:  0000000000000000  000000c0000b2080 
000000c000093298:  0000000000000000  0000000000000000 
000000c0000932a8:  0000000000000000  0000000000000000 
000000c0000932b8:  0000000000000000  0000000000000000 
000000c0000932c8:  0000000000000000  0000000000000000 
000000c0000932d8:  000000000009441e <main.f+270>  0000000000000000 
000000c0000932e8:  0000000000000000  0000000000000000 
000000c0000932f8:  0000000000000000  0000000000000000 
000000c000093308:  0000000000000000  0000000000000000 
000000c000093318:  0000000000000000  0000000000000000 
000000c000093328:  0000000000000000  0000000000000000 
r0   0xc0000b2080	r1   0xc0000b2080
r2   0xc0000b2080	r3   0xc0000b20c4
r4   0xffffffffe3000000	r5   0x0
r6   0xc0000b20c0	r7   0xc0000932d8
r8   0x1	r9   0x3ff9042d4d0
r10  0x17f600	r11  0x3ff9042d4d0
r12  0xc000093290	r13  0xc000000180
r14  0x943ca	r15  0xc000093238
pc   0xc0000b2082	link 0x943ca
FAIL	fixedbugs/issue11656.go	0.151s

This seems to be regression in the rc1, beta1 has been without this issue. There seems to be significant changes in the test case https://github.com/golang/go/blob/master/test/fixedbugs/issue11656.go pulled in to the rc1. Also it is isolated to the z13. On z14 the test passes.

@seankhliao seankhliao added arch-s390x Issues solely affecting the s390x architecture. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 31, 2021
@randall77
Copy link
Contributor

Strange that the instruction bytes are all zeroes, and not the ones written in the test.
The pc is also odd, in that it is 2 mod 8, which means it probably executed the two instructions (which total 10 bytes) successfully. Can you print &ill[0] in the test, and check that the faulting pc is really &ill[0]+10?

If that's the case, then it successfully wrote a value to address 0. How could it do that?

You might double-check the bytes used in the s390x code.

@gopherbot
Copy link

Change https://golang.org/cl/288278 mentions this issue: test: fix incorrectly laid out instructions in issue11656.go

@odeke-em odeke-em changed the title fixedbugs/issue11656.go fails on s390x/z13 with SIGIIL test/fixedbugs: issue11656.go fails on s390x/z13 with SIGILL Feb 1, 2021
@jcajka
Copy link
Contributor Author

jcajka commented Feb 1, 2021

@randall77 it really all seem to be zeroed.

0xc0000a0080 [0 0 0 0 0 0 0 0 0 0]
0xc0000a008a [0 0 0 0 0 0 0 0 0 0]
SIGILL: illegal instruction
PC=0xc0000a0082 m=0 sigcode=1
instruction bytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

goroutine 1 [running]:
runtime: unknown pc 0xc0000a0082
stack: frame={sp:0xc0000b3040, fp:0x0} stack=[0xc0000b2000,0xc0000b4000)
000000c0000b2f40:  000000c0000b6040  000000c0000a8060 
000000c0000b2f50:  00000000000da070  00000000000a287e <fmt.Fprintln+126> 
000000c0000b2f60:  000000c0000a8060  000000c0000b6040 
000000c0000b2f70:  0000000000000023  0000000000000040 
000000c0000b2f80:  000000000007dff6 <sync.(*Pool).Put+54>  0000000000000001 
000000c0000b2f90:  0000000000000000  0000000000000001 
000000c0000b2fa0:  00000000000a254a <fmt.(*pp).free+154>  000000000015ef40 
000000c0000b2fb0:  000000c0000b8080  0000000000000001 
000000c0000b2fc0:  00000000000a28b4 <fmt.Fprintln+180>  000000000015ef40 
000000c0000b2fd0:  00000000000cd1e0  000000c00008e680 
000000c0000b2fe0:  00000000000a8fe4 <main.f+484>  000000c00008e680 
000000c0000b2ff0:  000000c0000b6040  0000000000000023 
000000c0000b3000:  0000000000000040  0000000000000023 
000000c0000b3010:  0000000000000000  0000000000000000 
000000c0000b3020:  0000000000000023  000000c00008e680 
000000c0000b3030:  0000000000000000  0000000000000000 
000000c0000b3040: <00000000000a905a <main.f+602>  00000000000f1790 
000000c0000b3050:  000000c0000a6008  000000c0000b30b8 
000000c0000b3060:  0000000000000002  0000000000000002 
000000c0000b3070:  0000000000000023  0000000000000000 
000000c0000b3080:  0000000000000000  0000000000000000 
000000c0000b3090:  000000000000004a  0000000000000080 
000000c0000b30a0:  000000c0000a0080  000000c0000a008a 
000000c0000b30b0:  000000c0000a0080  00000000000b8600 
000000c0000b30c0:  000000c0000a008a  00000000000b9640 
000000c0000b30d0:  000000c00009a030  00000000000b8600 
000000c0000b30e0:  000000c0000a0080  00000000000b9640 
000000c0000b30f0:  000000c00009a018  00000000000a905a <main.f+602> 
000000c0000b3100:  0000000000000000  0000000000000000 
000000c0000b3110:  0000000000000000  0000000000000000 
000000c0000b3120:  0000000000000000  0000000000000000 
000000c0000b3130:  0000000000000000  0000000000000000 
runtime: unknown pc 0xc0000a0082
stack: frame={sp:0xc0000b3040, fp:0x0} stack=[0xc0000b2000,0xc0000b4000)
000000c0000b2f40:  000000c0000b6040  000000c0000a8060 
000000c0000b2f50:  00000000000da070  00000000000a287e <fmt.Fprintln+126> 
000000c0000b2f60:  000000c0000a8060  000000c0000b6040 
000000c0000b2f70:  0000000000000023  0000000000000040 
000000c0000b2f80:  000000000007dff6 <sync.(*Pool).Put+54>  0000000000000001 
000000c0000b2f90:  0000000000000000  0000000000000001 
000000c0000b2fa0:  00000000000a254a <fmt.(*pp).free+154>  000000000015ef40 
000000c0000b2fb0:  000000c0000b8080  0000000000000001 
000000c0000b2fc0:  00000000000a28b4 <fmt.Fprintln+180>  000000000015ef40 
000000c0000b2fd0:  00000000000cd1e0  000000c00008e680 
000000c0000b2fe0:  00000000000a8fe4 <main.f+484>  000000c00008e680 
000000c0000b2ff0:  000000c0000b6040  0000000000000023 
000000c0000b3000:  0000000000000040  0000000000000023 
000000c0000b3010:  0000000000000000  0000000000000000 
000000c0000b3020:  0000000000000023  000000c00008e680 
000000c0000b3030:  0000000000000000  0000000000000000 
000000c0000b3040: <00000000000a905a <main.f+602>  00000000000f1790 
000000c0000b3050:  000000c0000a6008  000000c0000b30b8 
000000c0000b3060:  0000000000000002  0000000000000002 
000000c0000b3070:  0000000000000023  0000000000000000 
000000c0000b3080:  0000000000000000  0000000000000000 
000000c0000b3090:  000000000000004a  0000000000000080 
000000c0000b30a0:  000000c0000a0080  000000c0000a008a 
000000c0000b30b0:  000000c0000a0080  00000000000b8600 
000000c0000b30c0:  000000c0000a008a  00000000000b9640 
000000c0000b30d0:  000000c00009a030  00000000000b8600 
000000c0000b30e0:  000000c0000a0080  00000000000b9640 
000000c0000b30f0:  000000c00009a018  00000000000a905a <main.f+602> 
000000c0000b3100:  0000000000000000  0000000000000000 
000000c0000b3110:  0000000000000000  0000000000000000 
000000c0000b3120:  0000000000000000  0000000000000000 
000000c0000b3130:  0000000000000000  0000000000000000 

r0   0xc0000a0080	r1   0xc0000a0080
r2   0x0	r3   0x0
r4   0xc00008e680	r5   0x0
r6   0x0	r7   0x0
r8   0xc0000a6008	r9   0xd3ce8
r10  0x0	r11  0x43
r12  0xc0000b30a0	r13  0xc000000180
r14  0xa9000	r15  0xc0000b3040
pc   0xc0000a0082	link 0xa9000

FAIL	fixedbugs/issue11656.go	0.159s

The CL288278 fixes the issue for me. I have built/"tested" it via Fedora's build system(it will get eventually GCed) without any issue(bootstrapped by beta1), including arm. I have seen the test fail for the first time there.

@golang golang locked and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-s390x Issues solely affecting the s390x architecture. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants
@randall77 @jcajka @gopherbot @seankhliao and others