go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.58k stars 994 forks source link

Unable to run lego on (old) FreeBSD 9 #2004

Closed ggiesen closed 11 months ago

ggiesen commented 11 months ago

Welcome

What did you expect to see?

The binary runs

What did you see instead?

runtime: pipe failed with 78
fatal error: runtime: pipe failed

How do you use lego?

Binary

Reproduction steps

Run lego client

Version of lego

# uname -a
FreeBSD hostname.example.com 9.1-RELEASE-p12 FreeBSD 9.1-RELEASE-p12 #0: Tue Apr 29 22:02:25 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Logs

```console # /usr/local/bin/lego runtime: pipe failed with 78 fatal error: runtime: pipe failed goroutine 1 [running, locked to thread]: runtime.throw({0x2dc31f2?, 0xffd5500000001?}) runtime/panic.go:1077 +0x5c fp=0xc0000c0a18 sp=0xc0000c09e8 pc=0x43839c runtime.netpollinit() runtime/netpoll_kqueue.go:35 +0x1c5 fp=0xc0000c0ac0 sp=0xc0000c0a18 pc=0x4348c5 runtime.netpollGenericInit() runtime/netpoll.go:216 +0x35 fp=0xc0000c0ad8 sp=0xc0000c0ac0 pc=0x433df5 internal/poll.runtime_pollServerInit() runtime/netpoll.go:208 +0xf fp=0xc0000c0ae8 sp=0xc0000c0ad8 pc=0x464d2f sync.(*Once).doSlow(0xc0000c0b78?, 0x4b5b9f?) sync/once.go:74 +0xbf fp=0xc0000c0b48 sp=0xc0000c0ae8 pc=0x48623f sync.(*Once).Do(...) sync/once.go:65 internal/poll.(*pollDesc).init(0xc0000ae1a0, 0xc0000ae180) internal/poll/fd_poll_runtime.go:39 +0x3c fp=0xc0000c0b68 sp=0xc0000c0b48 pc=0x4d51bc internal/poll.(*FD).Init(0xc0000ae180, {0x2da19b2?, 0xc0000c0be0?}, 0x26?) internal/poll/fd_unix.go:65 +0x45 fp=0xc0000c0b88 sp=0xc0000c0b68 pc=0x4d60a5 os.newFile(0x3, {0xc0000740a8, 0x13}, 0x1) os/file_unix.go:233 +0x1df fp=0xc0000c0cb0 sp=0xc0000c0b88 pc=0x4e34df os.openFileNolog({0xc0000740a8, 0x13}, 0x0, 0x0) os/file_unix.go:301 +0x1e8 fp=0xc0000c0d00 sp=0xc0000c0cb0 pc=0x4e3808 os.OpenFile({0xc0000740a8, 0x13}, 0x0, 0x8691e5?) os/file.go:334 +0x3e fp=0xc0000c0d38 sp=0xc0000c0d00 pc=0x4e1c1e os.Open(...) os/file.go:314 google.golang.org/protobuf/internal/detrand.binaryHash() google.golang.org/protobuf@v1.28.1/internal/detrand/rand.go:46 +0x53 fp=0xc0000c0e00 sp=0xc0000c0d38 pc=0xfdfc73 google.golang.org/protobuf/internal/detrand.init() google.golang.org/protobuf@v1.28.1/internal/detrand/rand.go:38 +0xf fp=0xc0000c0e10 sp=0xc0000c0e00 pc=0xfdfeef runtime.doInit1(0x4c35670) runtime/proc.go:6740 +0xca fp=0xc0000c0f40 sp=0xc0000c0e10 pc=0x447c2a runtime.doInit(...) runtime/proc.go:6707 runtime.main() runtime/proc.go:249 +0x373 fp=0xc0000c0fe0 sp=0xc0000c0f40 pc=0x43adf3 runtime.goexit() runtime/asm_amd64.s:1650 +0x1 fp=0xc0000c0fe8 sp=0xc0000c0fe0 pc=0x46a701 goroutine 2 [force gc (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) runtime/proc.go:398 +0xce fp=0xc00008cfa8 sp=0xc00008cf88 pc=0x43b16e runtime.goparkunlock(...) runtime/proc.go:404 runtime.forcegchelper() runtime/proc.go:322 +0xa5 fp=0xc00008cfe0 sp=0xc00008cfa8 pc=0x43b005 runtime.goexit() runtime/asm_amd64.s:1650 +0x1 fp=0xc00008cfe8 sp=0xc00008cfe0 pc=0x46a701 created by runtime.init.6 in goroutine 1 runtime/proc.go:310 +0x1a goroutine 3 [GC sweep wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) runtime/proc.go:398 +0xce fp=0xc00008d778 sp=0xc00008d758 pc=0x43b16e runtime.goparkunlock(...) runtime/proc.go:404 runtime.bgsweep(0x0?) runtime/mgcsweep.go:280 +0x94 fp=0xc00008d7c8 sp=0xc00008d778 pc=0x427854 runtime.gcenable.func1() runtime/mgc.go:200 +0x25 fp=0xc00008d7e0 sp=0xc00008d7c8 pc=0x41cac5 runtime.goexit() runtime/asm_amd64.s:1650 +0x1 fp=0xc00008d7e8 sp=0xc00008d7e0 pc=0x46a701 created by runtime.gcenable in goroutine 1 runtime/mgc.go:200 +0x66 goroutine 4 [GC scavenge wait]: runtime.gopark(0xc0000ac000?, 0x30f6bd8?, 0x1?, 0x0?, 0xc000006d00?) runtime/proc.go:398 +0xce fp=0xc00008df70 sp=0xc00008df50 pc=0x43b16e runtime.goparkunlock(...) runtime/proc.go:404 runtime.(*scavengerState).park(0x4e02b00) runtime/mgcscavenge.go:425 +0x49 fp=0xc00008dfa0 sp=0xc00008df70 pc=0x425109 runtime.bgscavenge(0x0?) runtime/mgcscavenge.go:653 +0x3c fp=0xc00008dfc8 sp=0xc00008dfa0 pc=0x42567c runtime.gcenable.func2() runtime/mgc.go:201 +0x25 fp=0xc00008dfe0 sp=0xc00008dfc8 pc=0x41ca65 runtime.goexit() runtime/asm_amd64.s:1650 +0x1 fp=0xc00008dfe8 sp=0xc00008dfe0 pc=0x46a701 created by runtime.gcenable in goroutine 1 runtime/mgc.go:201 +0xa5 goroutine 5 [finalizer wait]: runtime.gopark(0x804c3be78?, 0x100000000?, 0x0?, 0x0?, 0x0?) runtime/proc.go:398 +0xce fp=0xc00008c628 sp=0xc00008c608 pc=0x43b16e runtime.runfinq() runtime/mfinal.go:193 +0x107 fp=0xc00008c7e0 sp=0xc00008c628 pc=0x41bb47 runtime.goexit() runtime/asm_amd64.s:1650 +0x1 fp=0xc00008c7e8 sp=0xc00008c7e0 pc=0x46a701 created by runtime.createfing in goroutine 1 runtime/mfinal.go:163 +0x3d ```

Go environment (if applicable)

```console $ go version && go env # paste output here ```
ggiesen commented 11 months ago

I realize you're not likely to address any bugs related to such an old version of FreeBSD, but am I missing anything obvious? My understanding is go binaries should be self-contained. Is it may just too old a version of libc?

ldez commented 11 months ago

Hello,

where does the binary you are using come from?

Go build statically linked binaries, except if you are using CGO, so no need for libc.

Our binaries are statically linked, are you using it?

ldez commented 11 months ago

Based on the Go doc:

Go 1.12 is the last release that is supported on FreeBSD 10.x, which has already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD 12.0+.

https://tip.golang.org/doc/go1.12#freebsd

As announced in the Go 1.12 release notes, Go 1.13 now requires FreeBSD 11.2 or later; support for previous versions has been discontinued.

https://tip.golang.org/doc/go1.13#freebsd

So sorry but I will not be able to create a working binary for FreeBSD 9 because we are using language features that require Go after go1.13. Also, the 2 latest versions of Go (go1.20, go1.21) are supported by the Go team, as the security fixes are only applied on those versions, it's not a good idea to use the older versions of Go.