Runtime error: invalid memory address or nil pointer dereference

Since yesterday, my Caddy instance keeps crashing at random intervals. The logs show the following error message.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x8c4e6c]
goroutine 12 [running]:
github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/crypto.(*certChain).getCertForSNI(0xc0000900e0, 0xc0003de4f4, 0x9, 0xc000631ea0, 0xd75f6efa, 0x921245233647abf8)
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/crypto/cert_chain.go:66 +0x6c
github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/crypto.(*certChain).GetLeafCert(0xc0000900e0, 0xc0003de4f4, 0x9, 0xc000000000, 0xc0003de400, 0x9, 0xc000631f90, 0x10)
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/crypto/cert_chain.go:51 +0x43
github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/handshake.(*cryptoSetupServer).handleMessage(0xc0000f6500, 0xc000540680, 0x410, 0x51f, 0xc00058e150, 0x1, 0x5ac, 0x5ac)
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup_server.go:162 +0x18f
github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/handshake.(*cryptoSetupServer).HandleCryptoStream(0xc0000f6500, 0x1a08900, 0xc00041c9e8)
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup_server.go:119 +0x21a
github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go.(*session).run.func1(0xc000230000)
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/session.go:452 +0x3a
created by github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go.(*session).run
/tmp/gopath_01-04-0752.693637488/src/github.com/mholt/caddy/vendor/github.com/lucas-clemente/quic-go/session.go:451 +0x8a

Any ideas? I’m running Caddy 0.11.1 on Debian 8.
For now, I disabled QUIC and so far it didn’t crash again.

Hmm. Did you update Caddy recently?

Does this happen if you grab a fresh binary from Download Caddy?

Yes, I’ve got the very latest binary.
Without QUIC enabled it doesn’t seem to crash anymore.

No worries - go ahead and fill out the relevant parts of the issue template at https://github.com/mholt/caddy/issues/new so we can look into reproducing this and tracking it down.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.