itchio / boar

🐗 boar will sniff and dismantle most archives you throw at it
MIT License
8 stars 4 forks source link

Crash: concurrent map read & write #2

Closed fasterthanlime closed 6 years ago

fasterthanlime commented 6 years ago

Occured while running lilboar on a bunch of files

fatal error: concurrent map read and map write

goroutine 1 [running, locked to thread]:
runtime.throw(0x790019, 0x21)
        C:/Go/src/runtime/panic.go:616 +0x88 fp=0xc0425b15a8 sp=0xc0425b1588 pc=0x42c8e8
runtime.mapaccess2_fast64(0x716d20, 0xc04216eed0, 0x860, 0xc04226c708, 0xc042237601)
        C:/Go/src/runtime/hashmap_fast.go:141 +0x1b1 fp=0xc0425b15d0 sp=0xc0425b15a8 pc=0x40b751
github.com/itchio/sevenzip-go/sz.inSeekGo(0x860, 0x0, 0x1, 0x3fdf9c0, 0x28)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/sevenzip-go/sz/glue.go:490 +0x4e fp=0xc0425b1648 sp=0xc0425b15d0 pc=0x6a31ee
github.com/itchio/sevenzip-go/sz._cgoexpwrap_96ddeab26c29_inSeekGo(0x860, 0x0, 0x1, 0x3fdf9c0, 0x0)
        _cgo_gotypes.go:583 +0x4e fp=0xc0425b1680 sp=0xc0425b1648 pc=0x6a154e
runtime.call64(0x0, 0x3fdf790, 0x3fdf900, 0x28)
        C:/Go/src/runtime/asm_amd64.s:574 +0x42 fp=0xc0425b16d0 sp=0xc0425b1680 pc=0x453df2
runtime.cgocallbackg1(0x0)
        C:/Go/src/runtime/cgocall.go:316 +0x1aa fp=0xc0425b1750 sp=0xc0425b16d0 pc=0x402d0a
runtime.cgocallbackg(0x0)
        C:/Go/src/runtime/cgocall.go:194 +0xef fp=0xc0425b17b8 sp=0xc0425b1750 pc=0x402abf
runtime.cgocallback_gofunc(0x402970, 0x9216e0, 0xc0425b1858, 0x20)
        C:/Go/src/runtime/asm_amd64.s:826 +0xb2 fp=0xc0425b17d8 sp=0xc0425b17b8 pc=0x4553c2
runtime.asmcgocall(0x9216e0, 0xc0425b1858)
        C:/Go/src/runtime/asm_amd64.s:673 +0x47 fp=0xc0425b17e0 sp=0xc0425b17d8 pc=0x455237
runtime.cgocall(0x9216e0, 0xc0425b1858, 0x29)
        C:/Go/src/runtime/cgocall.go:131 +0x80 fp=0xc0425b1818 sp=0xc0425b17e0 pc=0x402970
github.com/itchio/sevenzip-go/sz._Cfunc_libc7zip_archive_open(0x5b909d0, 0x5b8d4d0, 0x1, 0x0)
        _cgo_gotypes.go:302 +0x55 fp=0xc0425b1858 sp=0xc0425b1818 pc=0x6a0915
github.com/itchio/sevenzip-go/sz.(*Lib).OpenArchive.func1(0x5b909d0, 0x5b8d4d0, 0x1, 0xc042054500)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/sevenzip-go/sz/glue.go:248 +0x9e fp=0xc0425b1890 sp=0xc0425b1858 pc=0x6a486e
github.com/itchio/sevenzip-go/sz.(*Lib).OpenArchive(0xc0424ae1c0, 0xc042096f50, 0x1, 0x1, 0x2, 0xc042054500)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/sevenzip-go/sz/glue.go:248 +0x5c fp=0xc0425b1910 sp=0xc0425b1890 pc=0x6a257c
github.com/itchio/boar/szextractor.New(0x7c8a60, 0xc0424ae1b8, 0xc04216efc0, 0x0, 0xc042046000, 0x100c0746e6572, 0x190000)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/szextractor/szextractor.go:99 +0x489 fp=0xc0425b1aa8 sp=0xc0425b1910 pc=0x6a7359
github.com/itchio/boar.(*ArchiveInfo).GetExtractor(0xc0420c6ae0, 0x7c8a60, 0xc0424ae1b8, 0xc04216efc0, 0xc042237bc8, 0x49597c, 0xc04217b680, 0x7849f8)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/probe.go:244 +0x4bf fp=0xc0425b1b48 sp=0xc0425b1aa8 pc=0x6c3a3f
github.com/itchio/boar.Probe(0xc0425b1ec8, 0x7c8a78, 0xc0424ae1b8, 0x0)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/probe.go:100 +0xde fp=0xc0425b1e18 sp=0xc0425b1b48 pc=0x6c231e
main.main.func3(0xc042078e10, 0x2c)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/cmd/lilboar/main.go:42 +0x1c6 fp=0xc0425b1f00 sp=0xc0425b1e18 pc=0x6c47e6
main.main()
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/cmd/lilboar/main.go:55 +0x110 fp=0xc0425b1f88 sp=0xc0425b1f00 pc=0x6c43d0
runtime.main()
        C:/Go/src/runtime/proc.go:198 +0x20e fp=0xc0425b1fe0 sp=0xc0425b1f88 pc=0x42e18e
runtime.goexit()
        C:/Go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc0425b1fe8 sp=0xc0425b1fe0 pc=0x4565d1

goroutine 18 [runnable]:
github.com/itchio/sevenzip-go/sz._Cfunc_libc7zip_archive_free(0x5bd2e30)
        _cgo_gotypes.go:249 +0x48
github.com/itchio/sevenzip-go/sz.(*Archive).Free.func1(0x5bd2e30)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/sevenzip-go/sz/glue.go:267 +0x5d
github.com/itchio/sevenzip-go/sz.(*Archive).Free(0xc042002700)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/sevenzip-go/sz/glue.go:267 +0x35
github.com/itchio/boar/szextractor.(*szExtractor).free(0xc0421720e0)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/szextractor/szextractor.go:410 +0x109
github.com/itchio/boar/szextractor.New.func1(0xc0421720e0)
        C:/msys64/home/amos/Dev/go/src/github.com/itchio/boar/szextractor/szextractor.go:59 +0x32

goroutine 19 [select]:
github.com/efarrer/iothrottler.throttlerPoolDriver(0xc04206ef60)
        C:/msys64/home/amos/Dev/go/src/github.com/efarrer/iothrottler/iothrottler.go:119 +0x21f
created by github.com/efarrer/iothrottler.NewIOThrottlerPool
        C:/msys64/home/amos/Dev/go/src/github.com/efarrer/iothrottler/iothrottler.go:58 +0x158