go: runtime: segfault in sync.Pool when using a shared runtime

QPlease answer these questions before submitting your issue. Thanks!

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

1.10

Does this issue reproduce with the latest release?

Yes.

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

Reproducible on ARM and x86_64 under Linux

What did you do?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=12631#c10

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (11 by maintainers)

Commits related to this issue

Most upvoted comments

There’s some repro steps in the original ticket. It may help with debugging.

I can reproduce this now on an ARMv7 target, provided the image also includes the ca-certificates package.  Also, you have to wait until /dev/random has enough entropy.

I can also reproduce this natively by building go 1.10 from source, building a shared runtime with 'go install -linkshared -buildmode=shared std',  and doing a 'go get -linkshared github.com/gustavosbarreto/go-crazy'.  So it's not ARM-specific.

It's a panic due to a segfault, always appearing to happen around a sync.Pool request in logrus's Entry.log function.  However, it only seems to happen if the https request is also getting processed in other goroutines.  Panic tracebacks always point to the logrus package as the running thread, sometimes with and sometimes without other goroutines being active.

It does seem to happen only when the program is linked against shared runtime, not when linked statically.

Definitely an upstream issue, just not 100% sure that it's really in the Go runtime, or if logrus is misusing the sync package.