cihub/seelog

bus error

beibeiabeibei opened this issue · 0 comments

my program is running in K8S,and it core dump once a week to three weeks.

//main.go
func main() {
        initLog()
       ....
       ....
} 

func initLog() {
        logger, err := seelog.LoggerFromConfigAsFile(startcfg.GetWSerLogPath())
        if err != nil {
                panic(err)
        }
        if err = seelog.ReplaceLogger(logger); err != nil {
                panic(err)
        }
}
unexpected fault address 0x67f8e0
fatal error: fault
[signal SIGBUS: bus error code=0x2 addr=0x67f8e0 pc=0x67f8e0]

goroutine 83 [running]:
runtime.throw(0x9096e7, 0x5)
        /usr/local/go/src/runtime/panic.go:608 +0x72 fp=0xc000505b98 sp=0xc000505b68 pc=0x42c5a2
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:387 +0x2d7 fp=0xc000505be8 sp=0xc000505b98 pc=0x441127
github.com/kingbuffalo/seelog.(*rollTimeFileTailsSlice).Len(0xc000551b60, 0xc000551b60)
        <autogenerated>:1 fp=0xc000505bf0 sp=0xc000505be8 pc=0x67f8e0
sort.Sort(0x987f80, 0xc000551b60)
        /usr/local/go/src/sort/sort.go:217 +0x31 fp=0xc000505c30 sp=0xc000505bf0 pc=0x55ce31
github.com/kingbuffalo/seelog.(*rollingFileWriterTime).sortFileRollNamesAsc(0xc0001f5440, 0xc0003b0400, 0x1e, 0x20, 0x1, 0xc000505d68, 0xa, 0x20, 0x0)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_rollingfilewriter.go:739 +0xc8 fp=0xc000505cb0 sp=0xc000505c30 pc=0x678878
github.com/kingbuffalo/seelog.(*rollingFileWriter).getSortedLogHistory(0xc000274000, 0x0, 0x0, 0xa, 0xc000505e40, 0xa)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_rollingfilewriter.go:297 +0x129 fp=0xc000505e08 sp=0xc000505cb0 pc=0x675949
github.com/kingbuffalo/seelog.(*rollingFileWriter).roll(0xc000274000, 0x926001, 0xc000274080)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_rollingfilewriter.go:523 +0x7d fp=0xc000505ed8 sp=0xc000505e08 pc=0x6771fd
github.com/kingbuffalo/seelog.(*rollingFileWriter).Write(0xc000274000, 0xc000276000, 0x38d, 0x2710, 0x0, 0x0, 0x0)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_rollingfilewriter.go:561 +0x172 fp=0xc000505f28 sp=0xc000505ed8 pc=0x677752
bufio.(*Writer).Flush(0xc000206bc0, 0x926088, 0xc000212350)
        /usr/local/go/src/bufio/bufio.go:575 +0x75 fp=0xc000505f88 sp=0xc000505f28 pc=0x4cff55
github.com/kingbuffalo/seelog.(*bufferedWriter).flushBuffer(0xc0001f5470)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_bufferedwriter.go:146 +0x6b fp=0xc000505fb0 sp=0xc000505f88 pc=0x67432b
github.com/kingbuffalo/seelog.(*bufferedWriter).flushPeriodically(0xc0001f5470)
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_bufferedwriter.go:154 +0x60 fp=0xc000505fd8 sp=0xc000505fb0 pc=0x6743c0
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000505fe0 sp=0xc000505fd8 pc=0x4589e1
created by github.com/kingbuffalo/seelog.NewBufferedWriter
        /opt/applications/go/pkg/mod/github.com/kingbuffalo/seelog@v0.0.0-20180626064034-ea380b2c6fc6/writers_bufferedwriter.go:76 +0x16c