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/compile: WebAssembly built from fyne_demo command crashes browser optimizer in Chrome #51241

Closed
Bluebugs opened this issue Feb 17, 2022 · 2 comments
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-JS
Milestone

Comments

@Bluebugs
Copy link

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

go version go1.17.6 linux/amd64

Does this issue reproduce with the latest release?

yes.

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

This is a bug concerning the webassembly output and its use in Chrome.

go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/cedric/.cache/go-build"
GOENV="/home/cedric/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/cedric/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/cedric/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/cedric/go/src/fyne.io/fyne/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2399108240=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Running fyne_demo (https://github.com/fyne-io/fyne/tree/master/cmd/fyne_demo) from the develop branch as a web assembly application in Chrome lead to its optimizer crashing in version >100 and an infinite loop in nightly build. I have hosted a demo online at https://fyne.ddlm.me/ that will show the problem.

A bug has been opened for Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=1287331 , but in case there is something that can be done on the go side of the command, it would be interesting to know.

What did you expect to see?

I would expect the same result on Chrome as I get on Safari and Firefox, a running application.

What did you see instead?

It does crash on Chrome inside its optimization pass after 15s of the application running (it get disable when using the web dev tools) while it work on Firefox and Safari.

@Bluebugs Bluebugs changed the title affected/package: affected/package: go webassembly output Feb 17, 2022
@dmitshur dmitshur added arch-wasm WebAssembly issues NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-JS labels Feb 17, 2022
@dmitshur dmitshur added this to the Backlog milestone Feb 17, 2022
@dmitshur dmitshur changed the title affected/package: go webassembly output cmd/compile: WebAssembly built from fyne_demo command causes browser optimizer crashes in Chrome Feb 17, 2022
@dmitshur
Copy link
Contributor

CC @neelance, @cherrymui.

@dmitshur dmitshur changed the title cmd/compile: WebAssembly built from fyne_demo command causes browser optimizer crashes in Chrome cmd/compile: WebAssembly built from fyne_demo command crashes browser optimizer in Chrome Feb 18, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
@Bluebugs
Copy link
Author

Bluebugs commented Oct 7, 2022

Testing with Chrome Version 106.0.5249.91 (Official Build) (64-bit) today and not having rebuild with any different Go version, it does work. The bug was in Chrome somewhere and is now fixed. Thanks to anyone involved.

@Bluebugs Bluebugs closed this as completed Oct 7, 2022
@golang golang locked and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-JS
Projects
None yet
Development

No branches or pull requests

3 participants