Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57228 - [go] Slow JIT compilation

Attached to Project: Arch Linux
Opened by Luke Yeager (lukeyeager) - Thursday, 25 January 2018, 19:09 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 26 January 2018, 15:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

go jit compilation (e.g. "go run main.go") is suddenly MUCH slower for me. Like, >10sec instead of <1sec. In top, I see that this process is taking up 100% CPU for a few seconds: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/cc1.

I presume this might be related to the compiler updates a few days ago? I can try to provide some more detailed feedback if needed.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 26 January 2018, 15:27 GMT
Reason for closing:  Not a bug
Comment by Dave Reisner (falconindy) - Thursday, 25 January 2018, 19:16 GMT
There's no such thing as JIT in Go. "go run" builds to a temporary file and executes it. If "go run" is slow, then likely "go build" is slow too. Examples of what takes a long time to compile would probably be good information.
Comment by Daniel M. Capella (polyzen) - Thursday, 25 January 2018, 19:33 GMT
Perhaps you have go-pie installed and that's the cause.
Comment by Luke Yeager (lukeyeager) - Thursday, 25 January 2018, 19:43 GMT
Sorry about the misleading title - I'm new to go. Indeed, building the code is slow, too:

$ time go build webserver/main.go
real 0m17.610s
user 0m22.847s
sys 0m0.770s

Building hello-world is very fast, though:

$ time go build main.go
real 0m0.102s
user 0m0.105s
sys 0m0.019s

Here are my installed versions:

$ pacman -Q | egrep '^go |^gcc |^clang '
clang 5.0.1-2
gcc 7.2.1+20180116-1
go 2:1.9.3-1

I do not have "go-pie" installed.

I can try to install an older compiler and check the difference if that would help. I had hoped to hear you say something like "Oh yeah, everybody's hitting that issue right now, hang on for a fix." Since you're not saying that, I'm inclined to think maybe something else changed on my side besides the compiler update.

Loading...