Summary: | Linuxulator: golang from Ubuntu Jammy is broken | ||
---|---|---|---|
Product: | Base System | Reporter: | Edward Tomasz Napierala <trasz> |
Component: | kern | Assignee: | Dmitry Chagin <dchagin> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | dchagin |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | amd64 | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 247219 |
Description
Edward Tomasz Napierala
![]() ![]() Additional data point: same distro on aarch64 works a bit better - it hangs the same way the older aarch64 golang does instead of crashing: root@v3:/# cd /usr/share/go/test && go run run.go -v ok 235.go 0.103s ok 64bit.go 1.270s ok alg.go 0.236s ok alias.go 0.007s ok alias1.go 0.033s ok alias2.go 0.009s ok alias3.go 0.141s ok align.go 0.031s ok append.go 0.139s ok append1.go 0.007s ok args.go 0.175s ok armimm.go 0.077s ok asmhdr.go 0.084s ok assign.go 0.012s ok assign1.go 0.008s ok atomicload.go 0.057s ok bigalg.go 0.083s ok bigmap.go 0.064s ok blank.go 0.092s ok blank1.go 0.009s ok bom.go 0.256s ok bombad.go 0.010s ok bounds.go 0.043s ok cannotassign.go 0.008s ok chancap.go 0.057s ok chanlinear.go 0.120s ok char_lit.go 0.054s ok char_lit1.go 0.007s ok checkbce.go 0.000s ok clearfat.go 2.069s ok closedchan.go 0.089s ok closure.go 0.067s ok closure1.go 0.048s ok closure2.go 0.045s ok closure3.go 0.098s ^Csignal: interrupt root@v3:/usr/share/go/test# dpkg -l | grep golang ii golang:arm64 2:1.18~0ubuntu2 arm64 Go programming language compiler - metapackage ii golang-1.18 1.18.1-1ubuntu1 all Go programming language compiler - metapackage ii golang-1.18-doc 1.18.1-1ubuntu1 all Go programming language - documentation ii golang-1.18-go 1.18.1-1ubuntu1 arm64 Go programming language compiler, linker, compiled stdlib ii golang-1.18-src 1.18.1-1ubuntu1 all Go programming language - source files ii golang-doc 2:1.18~0ubuntu2 all Go programming language - documentation ii golang-go:arm64 2:1.18~0ubuntu2 arm64 Go programming language compiler, linker, compiled stdlib ii golang-src 2:1.18~0ubuntu2 all Go programming language - source files root@v3:/usr/share/go/test# cat /etc/os-release PRETTY_NAME="Ubuntu 22.04 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04 (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy well, a quick look to trace shows that a problem in between go GC and a new go preemptive scheduler, i.e., we heve a problem in signals emulation. try env GODEBUG=asyncpreemtoff=1 (In reply to Dmitry Chagin from comment #2) env GODEBUG=asyncpreemptoff=1 Okay; the good news is, it seems to get rid of this problem; previously it would fail like above, or in another weird manner; with that env variable set things become reproducible again. The bad news is, it fails in a different way: # command-line-arguments /usr/lib/go-1.18/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument This appears to be caused by fallocate(2) returning EINVAL; not sure why it’s doing that. Okay, so the fallocate(2) problem is because it returns EINVAL instead of EOPNOTSUPP when running on ZFS, which doesn’t support fallocate(2). With that fixed and the env workaround the tests work :) (In reply to Edward Tomasz Napierala from comment #5) Nice) Im trying to find the reason why goroutines fails after SIGURG, which is sent by preemptive scheduler. it looks like sometimes pc is 0, that means cpu context is broken after sigreturn. btw1, im trying to run tools/test/avx_sig test, it fails on Ubuntu 22.04, and it looks like avx registers is not preserved across context switch. I don't see any Linux kernel config options for avx registers which is turned off in Ubuntu 22.04. Do you know anything about that? btw2, could you please check arm64 also? A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=cbbac560911521c0ded3e06e713107176855fae4 commit cbbac560911521c0ded3e06e713107176855fae4 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-06-08 22:33:26 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-06-08 22:33:26 +0000 linux(4): Preserve fpu xsave state across signal delivery on amd64 PR: 270247 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40444 MFC after: 2 weeks sys/amd64/linux/linux_sysvec.c | 99 ++++++++++++++++++++++++++++++++++++-- sys/x86/linux/linux_x86_sigframe.h | 20 +++++++- 2 files changed, 114 insertions(+), 5 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e40bcfdff7cc0596cd4e748e42a1947fd9f5d430 commit e40bcfdff7cc0596cd4e748e42a1947fd9f5d430 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-06-08 22:33:26 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-06-29 08:16:03 +0000 linux(4): Preserve fpu xsave state across signal delivery on amd64 PR: 270247 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40444 MFC after: 2 weeks (cherry picked from commit cbbac560911521c0ded3e06e713107176855fae4) sys/amd64/linux/linux_sysvec.c | 99 ++++++++++++++++++++++++++++++++++++-- sys/x86/linux/linux_x86_sigframe.h | 20 +++++++- 2 files changed, 114 insertions(+), 5 deletions(-) Merged to stable/13 |