klauspost/crc32

Crash on CircleCI

rasky opened this issue · 3 comments

rasky commented

While building my software on CircleCI, I get spurious crashes like this:

=== RUN   TestDownload
unexpected fault address 0xc820800000
fatal error: fault
[signal 0xb code=0x1 addr=0xc820800000 pc=0x7fded1]

goroutine 28 [running]:
runtime.throw(0x972920, 0x5)
    /tmp/workdir/go/src/runtime/panic.go:527 +0x90 fp=0xc8200abad0 sp=0xc8200abab8
runtime.sigpanic()
    /tmp/workdir/go/src/runtime/sigpanic_unix.go:27 +0x2ab fp=0xc8200abb20 sp=0xc8200abad0
dboard/vendor/github.com/klauspost/compress/flate.crc32sseAll(0xc8207fff9d, 0x63, 0x63, 0xc820328134, 0x60, 0x106, 0x1, 0x1, 0x0, 0x10000, ...)
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/compress/flate/crc32_amd64.s:38 +0x31 fp=0xc8200abb28 sp=0xc8200abb20
dboard/vendor/github.com/klauspost/compress/flate.(*compressor).deflateLazy(0xc820328000)
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/compress/flate/deflate.go:568 +0x11bc fp=0xc8200abcc0 sp=0xc8200abb28
dboard/vendor/github.com/klauspost/compress/flate.(*compressor).syncFlush(0xc820328000, 0x0, 0x0)
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/compress/flate/deflate.go:726 +0xd9 fp=0xc8200abce0 sp=0xc8200abcc0
dboard/vendor/github.com/klauspost/compress/flate.(*Writer).Flush(0xc820328000, 0x0, 0x0)
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/compress/flate/deflate.go:890 +0x42 fp=0xc8200abd10 sp=0xc8200abce0
dboard/vendor/github.com/klauspost/pgzip.compressBlock(0xc82045c000, 0x10000, 0x4c4b4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/pgzip/gzip.go:406 +0x2bd fp=0xc8200abe50 sp=0xc8200abd10
runtime.goexit()
    /tmp/workdir/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8200abe58 sp=0xc8200abe50
created by dboard/vendor/github.com/klauspost/pgzip.(*Writer).compressCurrent
    /home/ubuntu/.go_project/src/dboard/vendor/github.com/klauspost/pgzip/gzip.go:244 +0x515

I think it is related to pgzip. Is it possible for you to either share the problematic code, or run the test with -race enabled.

At first glance this crash shouldn't be possible, so it could indicate some sort of corruption.

I will try to set up a CircleCI account, but it might be specific to your use/test case setup.

I have found the error.

The fix is here: klauspost/compress#21 - and will be merged shortly.

rasky commented

Thanks!