go-clog/clog

Panic triggered when running multiple replica containers

Opened this issue · 0 comments

Panic triggered when multiple pods with log directory mounted as NFS

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7b19ec]

goroutine 15 [running]:
unknwon.dev/clog/v2.(*fileLogger).deleteOutdatedFiles.func1({0xc0010ef7a0, 0x21}, {0x0, 0x0}, {0xc0006a0e08?, 0xffffffffffffff9c?})
	unknwon.dev/clog/v2@v2.2.0/file.go:104 +0x2c
path/filepath.walk({0xc0005fd848, 0xd}, {0x274cf28, 0xc002222d00}, 0xc0006a0e08)
	path/filepath/path.go:497 +0x1d4
path/filepath.Walk({0xc0005fd848, 0xd}, 0xc0006a0e08)
	path/filepath/path.go:572 +0x66
unknwon.dev/clog/v2.(*fileLogger).deleteOutdatedFiles(0xc00040e540)
	unknwon.dev/clog/v2@v2.2.0/file.go:103 +0x4b
unknwon.dev/clog/v2.(*fileLogger).write(0xc00040e540, {0x27437c0, 0xc00165c078})
	unknwon.dev/clog/v2@v2.2.0/file.go:203 +0x465
unknwon.dev/clog/v2.(*fileLogger).Write(0xc0006a0fb0?, {0x27437c0?, 0xc00165c078?})
	unknwon.dev/clog/v2@v2.2.0/file.go:212 +0x1d
unknwon.dev/clog/v2.New.func1()
	unknwon.dev/clog/v2@v2.2.0/logger.go:204 +0x54
created by unknwon.dev/clog/v2.New in goroutine 1
	unknwon.dev/clog/v2@v2.2.0/logger.go:199 +0x5a9