Skip to content

Instantly share code, notes, and snippets.

@muzi502
Created March 5, 2020 01:41
Show Gist options
  • Save muzi502/7874c257632ad04e636b2edb4dea6d6d to your computer and use it in GitHub Desktop.
Save muzi502/7874c257632ad04e636b2edb4dea6d6d to your computer and use it in GitHub Desktop.
Prefetch will convert all your images to webp, it may take some time and consume a lot of CPU resource. Do you want to proceed(Y/n)
y
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x9f6ee19 pc=0x864169]
runtime stack:
runtime.throw(0x96edc3, 0x2a)
/usr/local/go/src/runtime/panic.go:1112 +0x72
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:671 +0x46a
goroutine 1866 [syscall]:
runtime.cgocall(0x81ef60, 0xc000065d78, 0x807f01)
/usr/local/go/src/runtime/cgocall.go:133 +0x5b fp=0xc000065d48 sp=0xc000065d10 pc=0x40d81b
github.com/chai2010/webp._Cfunc_webpEncodeRGB(0xc01bf00000, 0xbdb00000865, 0x42a000000000192f, 0xc0009a9708, 0x0)
_cgo_gotypes.go:357 +0x4e fp=0xc000065d78 sp=0xc000065d48 pc=0x708c4e
github.com/chai2010/webp.webpEncodeRGB(0xc01bf00000, 0x12a9035, 0x12a9035, 0x865, 0xbdb, 0x192f, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:186 +0x14b fp=0xc000065dd8 sp=0xc000065d78 pc=0x70963b
github.com/chai2010/webp.EncodeRGB(0xa076c0, 0xc0030ae000, 0x42a00000, 0xc0030ae000, 0x80, 0x0, 0x0, 0xda00000000000001)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:114 +0x8e fp=0xc000065e48 sp=0xc000065dd8 pc=0x7070be
github.com/chai2010/webp.encode(0x9ff040, 0xc00a5ba0f0, 0xa07a80, 0xc0099fe180, 0xc000065f24, 0xc0099fe180, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:81 +0x16f fp=0xc000065ea0 sp=0xc000065e48 pc=0x7076ff
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc004b47e80, 0xc, 0xc00224e6c0, 0x38, 0x42a00000, 0xc000266000, 0xc00224e6c0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d fp=0xc000065fa0 sp=0xc000065ea0 pc=0x81c93d
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000065fa8 sp=0xc000065fa0 pc=0x46ca11
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1 [chan receive]:
main.prefetchImages.func1(0xc01088e040, 0xc, 0xa0a7e0, 0xc03b35e000, 0x0, 0x0, 0x4e660f, 0xc03b35e000)
/root/webp_server_go/webp-server.go:257 +0x266
path/filepath.walk(0xc01088e040, 0xc, 0xa0a7e0, 0xc03b35e000, 0xc00025dd08, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:360 +0x425
path/filepath.walk(0x95cf4b, 0x1, 0xa0a7e0, 0xc0003420d0, 0xc00025dd08, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:384 +0x2ff
path/filepath.Walk(0x95cf4b, 0x1, 0xc00025dd08, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:406 +0xff
main.prefetchImages(0x95cf4b, 0x1, 0xc0000246ec, 0x2)
/root/webp_server_go/webp-server.go:246 +0x303
main.main()
/root/webp_server_go/webp-server.go:281 +0x40d
goroutine 1909 [syscall]:
github.com/chai2010/webp._Cfunc_webpEncodeRGBA(0xc00b700000, 0x4cf000007d0, 0x42a0000000001f40, 0xc0086433e0, 0x0)
_cgo_gotypes.go:375 +0x4e
github.com/chai2010/webp.webpEncodeRGBA(0xc00b700000, 0x9644c0, 0x9644c0, 0x7d0, 0x4cf, 0x1f40, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:213 +0x14b
github.com/chai2010/webp.EncodeRGBA(0xa07a00, 0xc0030ae0c0, 0x42a00000, 0xc0030ae0c0, 0x417058, 0xc00402a040, 0x90e820, 0x1)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:120 +0x8e
github.com/chai2010/webp.encode(0x9ff040, 0xc000a72000, 0xa07a00, 0xc0030ae040, 0xc00a7b7f24, 0x0, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:85 +0xb2
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc008642030, 0xc, 0xc00224e1c0, 0x38, 0x42a00000, 0xc000266000, 0xc00224e1c0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1834 [syscall]:
github.com/chai2010/webp._Cfunc_webpEncodeRGB(0xc01d1aa000, 0x87000000f00, 0x42a0000000002d00, 0xc005c7e570, 0x0)
_cgo_gotypes.go:357 +0x4e
github.com/chai2010/webp.webpEncodeRGB(0xc01d1aa000, 0x17bb000, 0x17bb000, 0xf00, 0x870, 0x2d00, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:186 +0x14b
github.com/chai2010/webp.EncodeRGB(0xa076c0, 0xc000020180, 0x42a00000, 0xc000020180, 0x80, 0x0, 0x0, 0xda000000009f0f01)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:114 +0x8e
github.com/chai2010/webp.encode(0x9ff040, 0xc0041f45a0, 0xa07a80, 0xc00c0cc080, 0xc00a7bbf24, 0xc00c0cc080, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:81 +0x16f
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc0041b7b70, 0xc, 0xc0041f0880, 0x38, 0x42a00000, 0xc000266000, 0xc0041f0880, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1896 [runnable]:
github.com/chai2010/webp.NewRGBImageFrom(0xa07a80, 0xc014afe080, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/rgb.go:148 +0x179
github.com/chai2010/webp.adjustImage(0xa07a80, 0xc014afe080, 0xc009c3f370, 0x2)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:135 +0x353
github.com/chai2010/webp.encode(0x9ff040, 0xc000a72180, 0xa07a80, 0xc014afe080, 0xc00a7b9f24, 0xc014afe080, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:75 +0x60
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc009c3acd0, 0xc, 0xc007e09240, 0x38, 0x42a00000, 0xc000266000, 0xc007e09240, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1819 [syscall]:
github.com/chai2010/webp._Cfunc_webpEncodeRGBA(0xc002250000, 0x6d4000004d8, 0x42a0000000001360, 0xc01088e008, 0x0)
_cgo_gotypes.go:375 +0x4e
github.com/chai2010/webp.webpEncodeRGBA(0xc002250000, 0x844b80, 0x844b80, 0x4d8, 0x6d4, 0x1360, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:213 +0x14b
github.com/chai2010/webp.EncodeRGBA(0xa07a00, 0xc005e92040, 0x42a00000, 0xc005e92040, 0x417058, 0xc000068000, 0x90e820, 0x1)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:120 +0x8e
github.com/chai2010/webp.encode(0x9ff040, 0xc0001107e0, 0xa07a00, 0xc005e92000, 0xc009077f24, 0x0, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:85 +0xb2
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc00c158030, 0xc, 0xc014c33dc0, 0x38, 0x42a00000, 0xc000266000, 0xc014c33dc0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1804 [runnable]:
hash/adler32.update(0xc035ad58d7, 0xc0009ce000, 0x287d, 0x287d, 0xc0009bb0e8)
/usr/local/go/src/hash/adler32/adler32.go:102 +0x2e
hash/adler32.(*digest).Write(0xc0009a979c, 0xc0009ce000, 0x287d, 0x287d, 0x287d, 0x0, 0x0)
/usr/local/go/src/hash/adler32/adler32.go:122 +0x4a
compress/zlib.(*reader).Read(0xc0009b6000, 0xc0009ce000, 0x287d, 0x287d, 0x287d, 0x0, 0x0)
/usr/local/go/src/compress/zlib/reader.go:95 +0xe7
io.ReadAtLeast(0x7f09086c00f0, 0xc0009b6000, 0xc0009ce000, 0x287d, 0x287d, 0x287d, 0x287d, 0x0, 0x0)
/usr/local/go/src/io/io.go:310 +0x87
io.ReadFull(...)
/usr/local/go/src/io/io.go:329
image/png.(*decoder).readImagePass(0xc0009b2000, 0x7f09086c00f0, 0xc0009b6000, 0x0, 0xc0009b6000, 0xa03280, 0xc0009b6000, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:508 +0x4b4
image/png.(*decoder).decode(0xc0009b2000, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:371 +0x5de
image/png.(*decoder).parseIDAT(0xc0009b2000, 0x2000, 0x95d6ef, 0x4)
/usr/local/go/src/image/png/reader.go:845 +0x36
image/png.(*decoder).parseChunk(0xc0009b2000, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:905 +0x3a4
image/png.Decode(0x9ff060, 0xc007b220c0, 0x95d435, 0x3, 0x6, 0x0)
/usr/local/go/src/image/png/reader.go:964 +0x13f
main.webpEncoder(0xc0009a9740, 0xc, 0xc004cb0100, 0x38, 0x42a00000, 0xc000266000, 0xc004cb0100, 0x38)
/root/webp_server_go/webp-server.go:85 +0x784
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1897 [syscall]:
github.com/chai2010/webp._Cfunc_webpEncodeRGB(0xc02d5f0000, 0x69800000bb8, 0x42a0000000002328, 0xc006698fa0, 0x0)
_cgo_gotypes.go:357 +0x4e
github.com/chai2010/webp.webpEncodeRGB(0xc02d5f0000, 0xe7cfc0, 0xe7cfc0, 0xbb8, 0x698, 0x2328, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:186 +0x14b
github.com/chai2010/webp.EncodeRGB(0xa076c0, 0xc0030ae080, 0x42a00000, 0xc0030ae080, 0x80, 0x0, 0x0, 0xda00000000000001)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:114 +0x8e
github.com/chai2010/webp.encode(0x9ff040, 0xc0060d2000, 0xa07a80, 0xc00c0cc180, 0xc00d228f24, 0xc00c0cc180, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:81 +0x16f
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc004313fd0, 0xc, 0xc0030840c0, 0x38, 0x42a00000, 0xc000266000, 0xc0030840c0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1869 [runnable]:
compress/flate.(*decompressor).huffSym(0xc004031300, 0xc004031328, 0x0, 0x0, 0x0)
/usr/local/go/src/compress/flate/inflate.go:707 +0x25c
compress/flate.(*decompressor).huffmanBlock(0xc004031300)
/usr/local/go/src/compress/flate/inflate.go:494 +0xcc
compress/flate.(*decompressor).Read(0xc004031300, 0xc00117c598, 0xa09, 0xa09, 0x598, 0x0, 0x0)
/usr/local/go/src/compress/flate/inflate.go:347 +0x77
compress/zlib.(*reader).Read(0xc00402e050, 0xc00117c598, 0xa09, 0xa09, 0x598, 0x0, 0x0)
/usr/local/go/src/compress/zlib/reader.go:94 +0x73
io.ReadAtLeast(0x7f09086c00f0, 0xc00402e050, 0xc00117c000, 0xfa1, 0xfa1, 0xfa1, 0x4, 0x0, 0x0)
/usr/local/go/src/io/io.go:310 +0x87
io.ReadFull(...)
/usr/local/go/src/io/io.go:329
image/png.(*decoder).readImagePass(0xc00402c400, 0x7f09086c00f0, 0xc00402e050, 0x0, 0xc00402e000, 0xa03280, 0xc00402e050, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:508 +0x4b4
image/png.(*decoder).decode(0xc00402c400, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:371 +0x5de
image/png.(*decoder).parseIDAT(0xc00402c400, 0x100000, 0x95d6ef, 0x4)
/usr/local/go/src/image/png/reader.go:845 +0x36
image/png.(*decoder).parseChunk(0xc00402c400, 0x0, 0x0)
/usr/local/go/src/image/png/reader.go:905 +0x3a4
image/png.Decode(0x9ff060, 0xc0041f4090, 0x95d435, 0x3, 0x6, 0x0)
/usr/local/go/src/image/png/reader.go:964 +0x13f
main.webpEncoder(0xc01088e040, 0xc, 0xc007e08280, 0x38, 0x42a00000, 0xc000266000, 0xc007e08280, 0x38)
/root/webp_server_go/webp-server.go:85 +0x784
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1868 [runnable]:
image.(*RGBA).Set(0xc0012d4000, 0x7d, 0x3d1, 0x9ffc60, 0xc00b6de6f0)
/usr/local/go/src/image/image.go:93 +0x162
github.com/chai2010/webp.toRGBAImage(0xa07940, 0xc000020040, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:181 +0x1fe
github.com/chai2010/webp.adjustImage(0xa07940, 0xc000020040, 0xa0a600, 0xc000061e90)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:142 +0x199
github.com/chai2010/webp.encode(0x9ff040, 0xc0041f4030, 0xa07940, 0xc000020040, 0xc00025bf24, 0x0, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:75 +0x60
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc004029f40, 0xc, 0xc00224e0c0, 0x38, 0x42a00000, 0xc000266000, 0xc00224e0c0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1908 [syscall]:
github.com/chai2010/webp._Cfunc_webpEncodeRGBA(0xc022cb8000, 0xa2800000708, 0x42a0000000001c20, 0xc0080677c0, 0x0)
_cgo_gotypes.go:375 +0x4e
github.com/chai2010/webp.webpEncodeRGBA(0xc022cb8000, 0x11da500, 0x11da500, 0x708, 0xa28, 0x1c20, 0x42a00000, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/capi.go:213 +0x14b
github.com/chai2010/webp.EncodeRGBA(0xa07a00, 0xc0030ae040, 0x42a00000, 0xc0030ae040, 0x417058, 0xc0052dc000, 0x90e820, 0x1)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/webp.go:120 +0x8e
github.com/chai2010/webp.encode(0x9ff040, 0xc00a5ba030, 0xa07a00, 0xc012744040, 0xc000062f24, 0x0, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:85 +0xb2
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc00223e880, 0xc, 0xc00cd8c100, 0x38, 0x42a00000, 0xc000266000, 0xc00cd8c100, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1738 [runnable]:
image.(*RGBA).Set(0xc014f6e080, 0x142, 0x573, 0x9ffc60, 0xc003378100)
/usr/local/go/src/image/image.go:93 +0x162
github.com/chai2010/webp.toRGBAImage(0xa07940, 0xc014f6e000, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:181 +0x1fe
github.com/chai2010/webp.adjustImage(0xa07940, 0xc014f6e000, 0xa0a600, 0xc00d22be90)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:142 +0x199
github.com/chai2010/webp.encode(0x9ff040, 0xc0060d2060, 0xa07940, 0xc014f6e000, 0xc0018b7f24, 0x0, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:75 +0x60
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc01081c030, 0xc, 0xc00475c0c0, 0x38, 0x42a00000, 0xc000266000, 0xc00475c0c0, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1739 [runnable]:
image/jpeg.(*decoder).decodeHuffman(0xc00c0c2000, 0xc00c0c4060, 0xffffffff, 0x0, 0x0)
/usr/local/go/src/image/jpeg/huffman.go:178 +0x374
image/jpeg.(*decoder).processSOS(0xc00c0c2000, 0xa, 0x2, 0x80)
/usr/local/go/src/image/jpeg/scan.go:254 +0x954
image/jpeg.(*decoder).decode(0xc00c0c2000, 0x9ff060, 0xc0060d20c0, 0x0, 0x6, 0x0, 0x0, 0x0)
/usr/local/go/src/image/jpeg/reader.go:630 +0x2fa
image/jpeg.Decode(...)
/usr/local/go/src/image/jpeg/reader.go:779
main.webpEncoder(0xc01081c0d0, 0xc, 0xc00475c200, 0x38, 0x42a00000, 0xc000266000, 0xc00475c200, 0x38)
/root/webp_server_go/webp-server.go:83 +0x1f8
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
goroutine 1878 [runnable]:
github.com/chai2010/webp.NewRGBImageFrom(0xa07a80, 0xc00015a300, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/rgb.go:148 +0x179
github.com/chai2010/webp.adjustImage(0xa07a80, 0xc00015a300, 0xc00c0c8870, 0x2)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:135 +0x353
github.com/chai2010/webp.encode(0x9ff040, 0xc0038b0000, 0xa07a80, 0xc00015a300, 0xc00a7b8f24, 0xc00015a300, 0x0)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:75 +0x60
github.com/chai2010/webp.Encode(...)
/root/go/pkg/mod/github.com/chai2010/webp@v1.1.0/writer.go:42
main.webpEncoder(0xc0089cd3f0, 0xc, 0xc00024e100, 0x38, 0x42a00000, 0xc000266000, 0xc00024e100, 0x38)
/root/webp_server_go/webp-server.go:99 +0x27d
created by main.prefetchImages.func1
/root/webp_server_go/webp-server.go:256 +0x242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment