Runtime error: invalid memory address or nil pointer dereference

(Ferdinand Mütsch) #1

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]:*certChain).getCertForSNI(0xc0000900e0, 0xc0003de4f4, 0x9, 0xc000631ea0, 0xd75f6efa, 0x921245233647abf8)
/tmp/gopath_01-04-0752.693637488/src/ +0x6c*certChain).GetLeafCert(0xc0000900e0, 0xc0003de4f4, 0x9, 0xc000000000, 0xc0003de400, 0x9, 0xc000631f90, 0x10)
/tmp/gopath_01-04-0752.693637488/src/ +0x43*cryptoSetupServer).handleMessage(0xc0000f6500, 0xc000540680, 0x410, 0x51f, 0xc00058e150, 0x1, 0x5ac, 0x5ac)
/tmp/gopath_01-04-0752.693637488/src/ +0x18f*cryptoSetupServer).HandleCryptoStream(0xc0000f6500, 0x1a08900, 0xc00041c9e8)
/tmp/gopath_01-04-0752.693637488/src/ +0x21a*session).run.func1(0xc000230000)
/tmp/gopath_01-04-0752.693637488/src/ +0x3a
created by*session).run
/tmp/gopath_01-04-0752.693637488/src/ +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.

(Matthew Fay) #2

Hmm. Did you update Caddy recently?

Does this happen if you grab a fresh binary from

(Ferdinand Mütsch) #3

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

(Matthew Fay) #4

No worries - go ahead and fill out the relevant parts of the issue template at so we can look into reproducing this and tracking it down.