Closed skmirajbn closed 2 months ago
Could you please:
Thank you!
This bug is very real and was likely introduced in v1.1.5 ! @dunglas
<? sleep(2); echo "hello";
Caddyfile
{
frankenphp {
num_threads 1000
}
order php_server before file_server
}
:9999 { root * . php_server }
Then: `./frankenphp run --watch`
Page loads fine, but CTRL+R a few times quickly, the bug manifests itself as the dreaded spinning worm, and frankenphp no longer serving requets.
Triggers when doing some work, **THEN** sending output to the client.
Only tested normal PHP mode.
Caddy can still be shut down, but otherwise it will no longer respond to PHP requests.
### Versions tested
* v1.2.0 - :red_circle: Hangs on repeated overlapping requests.
* v1.1.5 - :red_circle: Hangs on repeated overlapping requests.
* v1.1.4 - :green_circle: No bug. Works!
* v1.1.2 - :green_circle: No bug. Works!
* v1.1.1 - :green_circle: No bug. Works!
In the short term people should stick to v1.1.4 to avoid this.
Tested on Ubuntu Linux 24.04
Thank you very much. I'll take a look. This can be a bug in FrankenPHP itself or a new version of an extension. Could you check, for instance by using the Docker image instead of the static binary, if the issue persists with all extensions disabled?
The only thing I can think of in the changelog that may cause the issue is "feat: add ftp, gettext, gmp, imagick, mbregex, parallel, protobuf, shmop, soap, ssh2, sysmsg, sysvshm, tidy, xlswriter, yaml and zstd extensions to the static builds", which would confirm this theory.
The next step is to identify and fix (or unbundle) the buggy extension.
I managed to reproduce the issue but didn't get a stack trace because the program freezes but doesn't crash. I'll try to disable the extensions that have been added in 1.1.5 one by one to find the offending one.
I updated the frankenphp version to 1.2.0 but the application still hangs.
Updating didn't solve the problem. Please check.
Logs:
5 goroutine 19 gp=0xc000102540 m=nil [GC scavenge wait]:
2024-06-22 12:43:45 runtime.gopark(0x10000?, 0x7facd77f9ca8?, 0x0?, 0x0?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000080f78 sp=0xc000080f58 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.goparkunlock(...)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:408
2024-06-22 12:43:45 runtime.(scavengerState).park(0x7face362a540)
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000080fa8 sp=0xc000080f78 pc=0x7facd460c809
2024-06-22 12:43:45 runtime.bgscavenge(0xc00010e000)
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc000080fc8 sp=0xc000080fa8 pc=0x7facd460cdb9
2024-06-22 12:43:45 runtime.gcenable.gowrap2()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:204 +0x25 fp=0xc000080fe0 sp=0xc000080fc8 pc=0x7facd46036e5
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000080fe8 sp=0xc000080fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcenable in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:204 +0xa5
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 34 gp=0xc000182700 m=nil [finalizer wait]:
2024-06-22 12:43:45 runtime.gopark(0x0?, 0x7facdacd32b0?, 0x0?, 0x60?, 0x1000000010?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000084620 sp=0xc000084600 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.runfinq()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mfinal.go:194 +0x107 fp=0xc0000847e0 sp=0xc000084620 pc=0x7facd4602787
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000847e8 sp=0xc0000847e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.createfing in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mfinal.go:164 +0x3d
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 35 gp=0xc0002d16c0 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc0004f2750 sp=0xc0004f2730 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0004f27e0 sp=0xc0004f2750 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004f27e8 sp=0xc0004f27e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 20 gp=0xc000102700 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x5aed6530d9e?, 0x1?, 0xf?, 0x16?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000081750 sp=0xc000081730 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0000817e0 sp=0xc000081750 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000817e8 sp=0xc0000817e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 3 gp=0xc000007500 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x5acae2cd1c8?, 0x3?, 0x62?, 0x13?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000085750 sp=0xc000085730 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0000857e0 sp=0xc000085750 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000857e8 sp=0xc0000857e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 21 gp=0xc0001028c0 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x5ac4d27d6cc?, 0x1?, 0xb0?, 0x4?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000081f50 sp=0xc000081f30 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc000081fe0 sp=0xc000081f50 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000081fe8 sp=0xc000081fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 4 gp=0xc0000076c0 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x5acae41927c?, 0x0?, 0x0?, 0x0?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000085f50 sp=0xc000085f30 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc000085fe0 sp=0xc000085f50 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000085fe8 sp=0xc000085fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 5 gp=0xc000007880 m=nil [GC worker (idle)]:
2024-06-22 12:43:45 runtime.gopark(0x5ac4d27df64?, 0x1?, 0xbc?, 0x2?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000086750 sp=0xc000086730 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.gcBgMarkWorker()
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0000867e0 sp=0xc000086750 pc=0x7facd4605845
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000867e8 sp=0xc0000867e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.gcBgMarkStartWorkers in goroutine 1
2024-06-22 12:43:45 /usr/local/go/src/runtime/mgc.go:1234 +0x1c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 6 gp=0xc000103c00 m=nil [select]:
2024-06-22 12:43:45 runtime.gopark(0xc0004f5f80?, 0x2?, 0x31?, 0x70?, 0xc0004f5f74?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc0004f5e18 sp=0xc0004f5df8 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.selectgo(0xc0004f5f80, 0xc0004f5f70, 0x0?, 0x0, 0x0?, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/select.go:327 +0x725 fp=0xc0004f5f38 sp=0xc0004f5e18 pc=0x7facd4638185
2024-06-22 12:43:45 github.com/golang/glog.(fileSink).flushDaemon(0x7face3629f98)
2024-06-22 12:43:45 /go/pkg/mod/github.com/golang/glog@v1.2.1/glog_file.go:351 +0xb9 fp=0xc0004f5fc8 sp=0xc0004f5f38 pc=0x7facd500f3b9
2024-06-22 12:43:45 github.com/golang/glog.init.1.gowrap1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/golang/glog@v1.2.1/glog_file.go:166 +0x25 fp=0xc0004f5fe0 sp=0xc0004f5fc8 pc=0x7facd500e445
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004f5fe8 sp=0xc0004f5fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/golang/glog.init.1 in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/golang/glog@v1.2.1/glog_file.go:166 +0x126
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 23 gp=0xc000885880 m=nil [sync.Cond.Wait]:
2024-06-22 12:43:45 runtime.gopark(0x7facdad11e40?, 0xc0003983c0?, 0x0?, 0x0?, 0x0?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc0004f5470 sp=0xc0004f5450 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.goparkunlock(...)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:408
2024-06-22 12:43:45 sync.runtime_notifyListWait(0xc00001d518, 0x3)
2024-06-22 12:43:45 /usr/local/go/src/runtime/sema.go:569 +0x15a fp=0xc0004f54c0 sp=0xc0004f5470 pc=0x7facd465a61a
2024-06-22 12:43:45 sync.(Cond).Wait(0xc0004f5538?)
2024-06-22 12:43:45 /usr/local/go/src/sync/cond.go:70 +0x85 fp=0xc0004f5500 sp=0xc0004f54c0 pc=0x7facd467b5a5
2024-06-22 12:43:45 github.com/maypok86/otter/internal/queue.(Growable[...]).Pop(0x7facdad0b040)
2024-06-22 12:43:45 /go/pkg/mod/github.com/maypok86/otter@v1.2.1/internal/queue/growable.go:71 +0x74 fp=0xc0004f5598 sp=0xc0004f5500 pc=0x7facd587fdb4
2024-06-22 12:43:45 github.com/maypok86/otter/internal/core.(Cache[...]).process(0x7facdad29220)
2024-06-22 12:43:45 /go/pkg/mod/github.com/maypok86/otter@v1.2.1/internal/core/cache.go:386 +0xe8 fp=0xc0004f57c0 sp=0xc0004f5598 pc=0x7facd587dc48
2024-06-22 12:43:45 github.com/maypok86/otter/internal/core.NewCache[...].gowrap2()
2024-06-22 12:43:45 /go/pkg/mod/github.com/maypok86/otter@v1.2.1/internal/core/cache.go:167 +0x25 fp=0xc0004f57e0 sp=0xc0004f57c0 pc=0x7facd5874e85
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004f57e8 sp=0xc0004f57e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/maypok86/otter/internal/core.NewCache[...] in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/maypok86/otter@v1.2.1/internal/core/cache.go:167 +0x6b3
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 26 gp=0xc00070b340 m=nil [select]:
2024-06-22 12:43:45 runtime.gopark(0xc0000826e8?, 0x3?, 0x0?, 0x0?, 0xc0000826da?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000082580 sp=0xc000082560 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.selectgo(0xc0000826e8, 0xc0000826d4, 0xc0000826d0?, 0x2, 0xc00076e500?, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/select.go:327 +0x725 fp=0xc0000826a0 sp=0xc000082580 pc=0x7facd4638185
2024-06-22 12:43:45 github.com/caddyserver/certmagic.(RingBufferRateLimiter).permit(0xc000770280)
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/ratelimiter.go:217 +0x86 fp=0xc000082728 sp=0xc0000826a0 pc=0x7facd4b0e886
2024-06-22 12:43:45 github.com/caddyserver/certmagic.(RingBufferRateLimiter).loop(0xc000770280)
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/ratelimiter.go:89 +0x8b fp=0xc0000827c8 sp=0xc000082728 pc=0x7facd4b0e24b
2024-06-22 12:43:45 github.com/caddyserver/certmagic.NewRateLimiter.gowrap1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/ratelimiter.go:45 +0x25 fp=0xc0000827e0 sp=0xc0000827c8 pc=0x7facd4b0e185
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000827e8 sp=0xc0000827e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/caddyserver/certmagic.NewRateLimiter in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/ratelimiter.go:45 +0x13c
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 28 gp=0xc00070b500 m=nil [chan receive]:
2024-06-22 12:43:45 runtime.gopark(0x7facd4cb41e5?, 0x7facdaa9bbc0?, 0x1?, 0x80?, 0xc000082ed8?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000082e48 sp=0xc000082e28 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.chanrecv(0xc0007344e0, 0x0, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/chan.go:583 +0x3bf fp=0xc000082ec0 sp=0xc000082e48 pc=0x7facd45eee3f
2024-06-22 12:43:45 runtime.chanrecv1(0xc0007344e0?, 0xc000082fa8?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/chan.go:442 +0x12 fp=0xc000082ee8 sp=0xc000082ec0 pc=0x7facd45eea52
2024-06-22 12:43:45 github.com/caddyserver/caddy/v2.trapSignalsCrossPlatform.func1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/sigtrap.go:43 +0xe5 fp=0xc000082fe0 sp=0xc000082ee8 pc=0x7facd4cd7ac5
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000082fe8 sp=0xc000082fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/caddyserver/caddy/v2.trapSignalsCrossPlatform in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/sigtrap.go:38 +0x1a
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 29 gp=0xc00070b6c0 m=nil [chan receive]:
2024-06-22 12:43:45 runtime.gopark(0x7facd4cb41c5?, 0x7facdaa9bbc0?, 0x1?, 0x0?, 0xc000093da8?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000093d18 sp=0xc000093cf8 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.chanrecv(0xc000734e40, 0xc000093f70, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/chan.go:583 +0x3bf fp=0xc000093d90 sp=0xc000093d18 pc=0x7facd45eee3f
2024-06-22 12:43:45 runtime.chanrecv2(0xc000734e40?, 0xc0004f3f80?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/chan.go:447 +0x12 fp=0xc000093db8 sp=0xc000093d90 pc=0x7facd45eea72
2024-06-22 12:43:45 github.com/caddyserver/caddy/v2.trapSignalsPosix.func1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/sigtrap_posix.go:35 +0x105 fp=0xc000093fe0 sp=0xc000093db8 pc=0x7facd4cd7365
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000093fe8 sp=0xc000093fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/caddyserver/caddy/v2.trapSignalsPosix in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/sigtrap_posix.go:31 +0x1a
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 52 gp=0xc000103a40 m=nil [select, locked to thread]:
2024-06-22 12:43:45 runtime.gopark(0xc0004ef7a8?, 0x2?, 0x60?, 0xf6?, 0xc0004ef794?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc0004ef638 sp=0xc0004ef618 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.selectgo(0xc0004ef7a8, 0xc0004ef790, 0x0?, 0x0, 0x0?, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/select.go:327 +0x725 fp=0xc0004ef758 sp=0xc0004ef638 pc=0x7facd4638185
2024-06-22 12:43:45 runtime.ensureSigM.func1()
2024-06-22 12:43:45 /usr/local/go/src/runtime/signal_unix.go:1034 +0x1a5 fp=0xc0004ef7e0 sp=0xc0004ef758 pc=0x7facd46550e5
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004ef7e8 sp=0xc0004ef7e0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by runtime.ensureSigM in goroutine 28
2024-06-22 12:43:45 /usr/local/go/src/runtime/signal_unix.go:1017 +0xc8
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 53 gp=0xc000884000 m=10 mp=0xc000181808 [syscall]:
2024-06-22 12:43:45 runtime.notetsleepg(0x7face36c4320, 0xffffffffffffffff)
2024-06-22 12:43:45 /usr/local/go/src/runtime/lock_futex.go:246 +0x29 fp=0xc0004effa0 sp=0xc0004eff78 pc=0x7facd45f4ec9
2024-06-22 12:43:45 os/signal.signal_recv()
2024-06-22 12:43:45 /usr/local/go/src/runtime/sigqueue.go:152 +0x29 fp=0xc0004effc0 sp=0xc0004effa0 pc=0x7facd465aa09
2024-06-22 12:43:45 os/signal.loop()
2024-06-22 12:43:45 /usr/local/go/src/os/signal/signal_unix.go:23 +0x13 fp=0xc0004effe0 sp=0xc0004effc0 pc=0x7facd4cb4973
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004effe8 sp=0xc0004effe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by os/signal.Notify.func1.1 in goroutine 28
2024-06-22 12:43:45 /usr/local/go/src/os/signal/signal.go:151 +0x1f
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 30 gp=0xc00070bc00 m=nil [select]:
2024-06-22 12:43:45 runtime.gopark(0xc000613f40?, 0x3?, 0x0?, 0x0?, 0xc000613e3a?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc000613ce0 sp=0xc000613cc0 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.selectgo(0xc000613f40, 0xc000613e34, 0x1?, 0x0, 0x0?, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/select.go:327 +0x725 fp=0xc000613e00 sp=0xc000613ce0 pc=0x7facd4638185
2024-06-22 12:43:45 github.com/caddyserver/certmagic.(Cache).maintainAssets(0xc0002a8280, 0x0)
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/maintain.go:69 +0x31f fp=0xc000613fc0 sp=0xc000613e00 pc=0x7facd4b0091f
2024-06-22 12:43:45 github.com/caddyserver/certmagic.NewCache.gowrap1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/cache.go:127 +0x25 fp=0xc000613fe0 sp=0xc000613fc0 pc=0x7facd4ad9745
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000613fe8 sp=0xc000613fe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/caddyserver/certmagic.NewCache in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/certmagic@v0.21.3/cache.go:127 +0x1f6
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 31 gp=0xc00070bdc0 m=nil [select]:
2024-06-22 12:43:45 runtime.gopark(0xc000067fa8?, 0x2?, 0x0?, 0x0?, 0xc000067f9c?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc00060ee40 sp=0xc00060ee20 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.selectgo(0xc00060efa8, 0xc000067f98, 0x0?, 0x0, 0x0?, 0x1)
2024-06-22 12:43:45 /usr/local/go/src/runtime/select.go:327 +0x725 fp=0xc00060ef60 sp=0xc00060ee40 pc=0x7facd4638185
2024-06-22 12:43:45 github.com/caddyserver/caddy/v2/modules/caddytls.(TLS).keepStorageClean.func1()
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/modules/caddytls/tls.go:613 +0x93 fp=0xc00060efe0 sp=0xc00060ef60 pc=0x7facd52d1033
2024-06-22 12:43:45 runtime.goexit({})
2024-06-22 12:43:45 /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00060efe8 sp=0xc00060efe0 pc=0x7facd465e7a1
2024-06-22 12:43:45 created by github.com/caddyserver/caddy/v2/modules/caddytls.(TLS).keepStorageClean in goroutine 1
2024-06-22 12:43:45 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.8.4/modules/caddytls/tls.go:605 +0xe5
2024-06-22 12:43:45
2024-06-22 12:43:45 goroutine 32 gp=0xc000505340 m=nil [IO wait]:
2024-06-22 12:43:45 runtime.gopark(0x1?, 0xc00060fca0?, 0x31?, 0xf6?, 0x2000?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/proc.go:402 +0xce fp=0xc00060fc20 sp=0xc00060fc00 pc=0x7facd46262ae
2024-06-22 12:43:45 runtime.netpollblock(0x0?, 0xd45ebf06?, 0xac?)
2024-06-22 12:43:45 /usr/local/go/src/runtime/netpoll.go:573 +0xf7 fp=0xc00060fc58 sp=0xc00060fc20 pc=0x7facd461e397
2024-06-22 12:43:45 internal/poll.runtime_pollWait(0x7face4469e40, 0x72)
2024-06-22 12:43:45 /usr/local/go/src/runtime/netpoll.go:345 +0x85 fp=0xc00060fc78 sp=0xc00060fc58 pc=0x7facd46587c5
2024-06-22 12:43:45 internal/poll.(pollDesc).wait(0x3?, 0x7facd460bba5?, 0x0)
2024-06-22 12:43:45 /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x27 fp=0xc00060fca0 sp=0xc00060fc78 pc=0x7facd46d44e7
2024-06-22 12:43:45 internal/poll.(pollDesc).waitRead(...)
2024-06-22 12:43:45 /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
2024-06-22 12:43:45 internal/poll.(FD).Accept(0xc0002a9800)
2024-06-22 12:43:45 /usr/local/go/src/internal/poll/fd_unix.go:611 +0x2ac fp=0xc00060fd48 sp=0xc00060fca0 pc=0x7facd46d988c
2024-06-22 12:43:45 net.(netFD).accept(0xc0002a9800)
2024-06-22 12:43:45 /usr/local/go/src/net/fd_unix.go:172 +0x29 fp=0xc00060fe00 sp=0xc00060fd48 pc=0x7facd475c529
2024-06-22 12:43:45 net.(TCPListener).accept(0xc0003629c0)
2024-06-22 12:43:45 /usr/local/go/src/net/tcpsock_posix.go:159 +0x1e fp=0xc00060fe28 sp=0xc00060fe00 pc=0x7facd477687e
2024-06-22 12:43:45 net.(TCPListener).Accept(0xc0003629c0)
2024-06-22 12:43:45 /usr/local/go/src/net/tcpsock.go:327 +0x30 fp=0xc00060fe58 sp=0xc00060fe28 pc=0x7facd4775a70
2024-06-22 12:43:45 github.com/caddyserver/caddy/v2.(deleteListener).Accept(0x7facd4999f74?)
2024-06-22 12:43:45
Yes, we have to revert #773.
In the meantime, compiling a custom binary with PHP_EXTENSIONS
set and excluding the new one should fix the issue.
I'm working on finding the buggy one.
The offender is parallel. I'm working on a patch to remove this extension.
The problem has been reported upstream and parallel has been unbundled from FrankenPHP. https://github.com/krakjoe/parallel/issues/308
Can confirm the issue no longer exists in 1.2.1 thank you very much tracking this down and for the quick resolution @dunglas !!
Hey @skmirajbn π
can you also confirm that with FrankenPHP 1.2.1 the segfaults are gone? I see you are using PHP_EXTENSIONS
already and you were building FrankenPHP standalone binary without ext-parallel
. In case you are building with ext-parallel
, are you making use of parallel
in your code?
I just want to make sure if this PR has anything todo with ext-parallel
at all, so far it looks like it does not. from my perspective, but I might be wrong.
Happy to hear from you.
Hey @skmirajbn π
can you also confirm that with FrankenPHP 1.2.1 the segfaults are gone? I see you are using
PHP_EXTENSIONS
already and you were building FrankenPHP standalone binary withoutext-parallel
. In case you are building withext-parallel
, are you making use ofparallel
in your code?I just want to make sure if this PR has anything todo with
ext-parallel
at all, so far it looks like it does not. from my perspective, but I might be wrong.Happy to hear from you.
First, I was thinking about that, even I select the extensions but the bugs are still there. After removing the parallel at 1.2 version I can see the freeze problem is fixed.
Can you confirm that you had ext-parallel
active/bundled (by running phpinfo()
) with your FrankenPHP 1.2.0 container?
From what I am seeing your 1.2.0 version was running without ext-parallel
already, just double checking.
I could reproduce and find the problem. https://github.com/krakjoe/parallel/issues/313
What happened?
I created the Self-contained binary using Frankenphp of my Laravel app. The binary is created successfully and running fine. But the problem I noticed is that after handling a number of requests it hangs out. The browsers keep loading but nothing is loaded. Until I restart the container the problem don't fix. At first I thought it was the problem of the docker but I checked another app on docker which ran smoothly.
I noticed that if there concurrent requests then it hangs earlier and once hangs it remains unresponsive until restarts.
Here I created the binary file using this dockerfile and docker compose file
FROM --platform=linux/amd64 dunglas/frankenphp:static-builder as builder
Using the below code I generated the binary inside the image
Then I extracted the binary file and used this docker compose to run the app in environment
Sometimes the get restarts which is fine but when it handle no extra line printed on terminal so I am not including any terminal logs.
Can anyone have any information how to fix it?
Build Type
Standalone binary
Worker Mode
Yes
Operating System
Other (tell us more in the description)
CPU Architecture
x86_64
PHP configuration
Relevant log output