dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.86k stars 235 forks source link

panic: runtime error: runtime.Pinner.Pin: argument is not a Go pointer #567

Closed Danielss89 closed 8 months ago

Danielss89 commented 8 months ago

What happened?

I've build a custom Dockerfile which can be seen here: https://gist.github.com/Danielss89/6d4615be83d9c9cb6a6cadc1dedc8fad

But when opening whenever page, i just get a blank page and the error attached in logs.

Build Type

Docker (Debian Bookworm)

Worker Mode

No

Operating System

macOS

CPU Architecture

Apple Silicon

Relevant log output

app-1  | {"level":"info","ts":1707597659.815327,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
app-1  | {"level":"warn","ts":1707597659.8159642,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":16}
app-1  | {"level":"info","ts":1707597659.8204947,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
app-1  | {"level":"warn","ts":1707597659.8206863,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
app-1  | {"level":"info","ts":1707597659.8210263,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
app-1  | {"level":"info","ts":1707597659.8211262,"msg":"FrankenPHP started 🐘","php_version":"8.2.15"}
app-1  | {"level":"info","ts":1707597659.821406,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
app-1  | {"level":"info","ts":1707597659.8214118,"msg":"serving initial configuration"}
app-1  | {"level":"info","ts":1707597659.8216128,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x4000460180"}
app-1  | {"level":"info","ts":1707597659.8229058,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/data/caddy"}
app-1  | {"level":"info","ts":1707597659.8230755,"logger":"tls","msg":"finished cleaning storage units"}
app-1  | panic: runtime error: runtime.Pinner.Pin: argument is not a Go pointer
app-1  |
app-1  | goroutine 98 [running, locked to thread]:
app-1  | github.com/dunglas/frankenphp.go_apache_request_headers(0x16e8e20?)
app-1  |    /go/src/app/frankenphp.go:595 +0x15c
app-1  | github.com/dunglas/frankenphp._Cfunc_frankenphp_execute_script(0xfffefc109350)
app-1  |    _cgo_gotypes.go:790 +0x34
app-1  | github.com/dunglas/frankenphp.go_execute_script(0x40005cce01?)
app-1  |    /go/src/app/frankenphp.go:510 +0x11c
ma4nn commented 8 months ago

Yep, same error message here using images dunglas/frankenphp:latest-php8.2-alpine or dunglas/frankenphp:latest-php8.3-alpine (also on MacOS+Silicon)

dunglas commented 8 months ago

This looks like a bug introduced in the newly supported apache_request_headers function.

Could you temporarily downgrade to the previous version or don't call this function?

Danielss89 commented 8 months ago

Yes, downgrading to 1.0.3 seems to be working

ma4nn commented 8 months ago

@dunglas thanks, yes seems like this is the reason - dunglas/frankenphp:1.0.3-php8.3-alpine is also working fine for me 👍