2

I'm trying to get hugo to work on my Alpine distro that's running on my Intel gallileo(Quark CPU).

I've overcome a few hurdles already.

This CPU Doesn't have MMX so gcc-go was needed to compile hugo into a binary (in a virtual machine)

But after copying the hugo binary to the galileo Hugo doesn't work. I get the following error:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x44 pc=0xb7658e62]

goroutine 1 [running]:
runtime.dopanic_m
    :0
runtime.throw
    :0
runtime.sigpanic
    :0
runtime.sigtrampgo
    :0
runtime.sigtramp
    :0

    :0

goroutine 4 [select]:
go.x2eopencensus.x2eio..z2fstats..z2fview.worker.start
    /root/go/pkg/mod/go.opencensus.io@v0.22.0/stats/view/worker.go:154
created by go.x2eopencensus.x2eio..z2fstats..z2fview.go.x2eopencensus.x2eio..z2fstats..z2fview..init0
    /root/go/pkg/mod/go.opencensus.io@v0.22.0/stats/view/worker.go:32 +0x17a

This could be:

  1. Quark has 256MB of ram, The executable is 127MB, perhaps there simply isn't enough memory?
  2. Quark has a well known bug. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738575%22 that means it mishandles LOCK instructions and causes a segfault.

On a normal C toolchain, the assembler can strip the LOCK operation using "-Xassembler '-momit-lock-prefix=yes'" CFLAG (Galileo is single core so it's not needed)

However I'm not sure what the equivalent would be on a go build toolchain, perhaps it's simply not possible?

The compiled binary works perfectly in the virtual machine.

dmarkey
  • 193
  • 2
  • 8
  • «the assembler can strip the LOCK operation» how the thread synchronization is to be performed then? Or does it have a single core and so there is no cache coherence problem? – kostix Apr 15 '21 at 12:11
  • All in all, I'd recommend you to turn to [the mailing list](https://groups.google.com/forum/#!forum/golang-nuts) instead: to my knowledge, neither of the Go core devs reads the `go` tag on SO, and your question anyway is likely to require multiple backs-and-forths to even attempt to be solved; hence it's not really fit for SO. (And by the way, the author of the GCC's front-end for Go is quite active on the ML). – kostix Apr 15 '21 at 12:12
  • 2
    @kostix yes It's a single core only. – dmarkey Apr 15 '21 at 12:24
  • @kostix will try the ML if this doesn't get much traction soon. Thanks! – dmarkey Apr 15 '21 at 12:26

0 Answers0