Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive fatally fails with "Concurrent map writes" #676

Closed
zimmski opened this issue Apr 8, 2022 · 1 comment
Closed

Revive fatally fails with "Concurrent map writes" #676

zimmski opened this issue Apr 8, 2022 · 1 comment

Comments

@zimmski
Copy link
Contributor

zimmski commented Apr 8, 2022

Describe the bug

Revive has a fatal error sometimes that says "concurrent map writes". I would expect revive not to fail.

Here is the very long stack trace output:

fatal error: concurrent map writes
fatal error: concurrent map writes

goroutine 27 [running]:
runtime.throw({0x74757b?, 0x71b2c0?})
        runtime/panic.go:992 +0x71 fp=0xc000d8fad0 sp=0xc000d8faa0 pc=0x433731
runtime.mapassign_faststr(0x6fb220, 0xc0014197d0, {0xc0000266d8, 0xf})
        runtime/map_faststr.go:295 +0x38b fp=0xc000d8fb38 sp=0xc000d8fad0 pc=0x412c2b
github.com/mgechev/revive/rule.(*UnhandledErrorRule).Apply(0xc00000e0a8, 0xc00028db80, {0xc0000c4580, 0x8, 0x0?})
        github.com/mgechev/revive/rule/unhandled-error.go:29 +0x1e7 fp=0xc000d8fba0 sp=0xc000d8fb38 pc=0x6a8ea7
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b fp=0xc000d8ff08 sp=0xc000d8fba0 pc=0x647a3b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85 fp=0xc000d8ffc8 sp=0xc000d8ff08 pc=0x64b4a5
github.com/mgechev/revive/lint.(*Package).lint.func2()
        github.com/mgechev/revive/lint/package.go:175 +0x2a fp=0xc000d8ffe0 sp=0xc000d8ffc8 pc=0x64b3ea
runtime.goexit()
        runtime/asm_amd64.s:1571 +0x1 fp=0xc000d8ffe8 sp=0xc000d8ffe0 pc=0x461da1
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 1 [chan receive]:
github.com/mgechev/revive/revivelib.(*Revive).Format(0xc00019db60?, {0x0, 0x0}, 0x0?)
        github.com/mgechev/revive/revivelib/core.go:135 +0x205
github.com/mgechev/revive/cli.RunRevive({0x0, 0x0, 0x0})
        github.com/mgechev/revive/cli/main.go:62 +0x171
main.main()
        github.com/mgechev/revive/main.go:6 +0x25

goroutine 6 [semacquire]:
sync.runtime_Semacquire(0xc0008d8558?)
        runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0xc0004cbd70?)
        sync/waitgroup.go:136 +0x52
github.com/mgechev/revive/lint.(*Package).lint(0xc0001d0780, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/package.go:177 +0x229
github.com/mgechev/revive/lint.(*Linter).lintPackage(0xc0001da170, {0xc0000d9e00, 0x17, 0x0?}, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, ...}, ...}, ...)
        github.com/mgechev/revive/lint/linter.go:107 +0x17b
github.com/mgechev/revive/lint.(*Linter).Lint.func1({0xc0000d9e00?, 0x0?, 0x0?})
        github.com/mgechev/revive/lint/linter.go:64 +0xa7
created by github.com/mgechev/revive/lint.(*Linter).Lint
        github.com/mgechev/revive/lint/linter.go:63 +0x297

goroutine 7 [semacquire]:
sync.runtime_Semacquire(0x0?)
        runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0x0?)
        sync/waitgroup.go:136 +0x52
github.com/mgechev/revive/lint.(*Linter).Lint.func2()
        github.com/mgechev/revive/lint/linter.go:73 +0x26
created by github.com/mgechev/revive/lint.(*Linter).Lint
        github.com/mgechev/revive/lint/linter.go:72 +0xd9

goroutine 8 [chan receive]:
github.com/mgechev/revive/formatter.(*Default).Format(0x0?, 0x0?, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, 0x0, 0x0, ...})
        github.com/mgechev/revive/formatter/default.go:22 +0x14e
github.com/mgechev/revive/revivelib.(*Revive).Format.func1()
        github.com/mgechev/revive/revivelib/core.go:128 +0x97
created by github.com/mgechev/revive/revivelib.(*Revive).Format
        github.com/mgechev/revive/revivelib/core.go:127 +0x18a

goroutine 17 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00024f500, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 18 [runnable]:
go/ast.Walk({0x7afa98?, 0xc000162d38?}, {0x7b1428?, 0xc0003c4100?})
        go/ast/walk.go:59 +0x972
go/ast.walkDeclList({0x7afa98, 0xc000162d38}, {0xc0000d9800?, 0x19, 0x0?})
        go/ast/walk.go:38 +0x91
go/ast.Walk({0x7afa98?, 0xc000162d20?}, {0x7b1360?, 0xc0000c5080?})
        go/ast/walk.go:367 +0x1890
github.com/mgechev/revive/rule.(*ContextKeysType).Apply(0x6f31c0?, 0xc0003c5240, {0x745a1e?, 0x11?, 0x1?})
        github.com/mgechev/revive/rule/context-keys-type.go:28 +0xe5
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 19 [runnable]:
go/ast.Walk({0x7afa98?, 0xc000639dd0?}, {0x7b1310?, 0xc000855d80?})
        go/ast/walk.go:381 +0x1eee
go/ast.Walk({0x7afa98?, 0xc000639db8?}, {0x7b1338?, 0xc0008680c0?})
        go/ast/walk.go:86 +0x227a
go/ast.Walk({0x7afa98?, 0xc000639da0?}, {0x7b1400?, 0xc0008607c0?})
        go/ast/walk.go:176 +0x1451
go/ast.Walk({0x7afa98?, 0xc000639d58?}, {0x7b13d8?, 0xc0003fdb70?})
        go/ast/walk.go:99 +0x1c14
go/ast.walkExprList({0x7afa98, 0xc000639d58}, {0xc0003fdb90?, 0x1, 0xc00086d680?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc000638630?}, {0x7b0ff0?, 0xc000855f80?})
        go/ast/walk.go:218 +0x1548
go/ast.walkStmtList({0x7afa98, 0xc000638630}, {0xc00086c940?, 0x4, 0x7f5359726548?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afa98?, 0xc000638468?}, {0x7b10e0?, 0xc000869650?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afa98?, 0xc0006382a0?}, {0x7b13b0?, 0xc000869680?})
        go/ast/walk.go:358 +0x4b0
go/ast.walkDeclList({0x7afa98, 0xc0006382a0}, {0xc000870000?, 0x2, 0x0?})
        go/ast/walk.go:38 +0x91
go/ast.Walk({0x7afa98?, 0xc000638288?}, {0x7b1360?, 0xc000436980?})
        go/ast/walk.go:367 +0x1890
github.com/mgechev/revive/rule.(*ContextKeysType).Apply(0x6f31c0?, 0xc00086d680, {0x745a1e?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/context-keys-type.go:28 +0xe5
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 20 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc000882f80, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 21 [runnable]:
go/ast.Walk({0x7afa98?, 0xc001362810?}, {0x7b1130?, 0xc0008d5b80?})
        go/ast/walk.go:381 +0x1eee
go/ast.walkExprList({0x7afa98, 0xc001362810}, {0xc0008da560?, 0x2, 0x7f5332865860?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc0013627f8?}, {0x7b1130?, 0xc0008d5bc0?})
        go/ast/walk.go:145 +0xa8b
go/ast.Walk({0x7afa98?, 0xc001362000?}, {0x7b12e8?, 0xc0008bbdb0?})
        go/ast/walk.go:207 +0x1154
go/ast.walkStmtList({0x7afa98, 0xc001362000}, {0xc0002b5c00?, 0x5, 0x7f53328655b8?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afa98?, 0xc001361e60?}, {0x7b10e0?, 0xc0008cd8f0?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afa98?, 0xc001361d88?}, {0x7b13d8?, 0xc0008bbdc0?})
        go/ast/walk.go:100 +0x1c36
go/ast.walkExprList({0x7afa98, 0xc001361d88}, {0xc0008da580?, 0x2, 0x7f53328655b8?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc001361d70?}, {0x7b1130?, 0xc0008d5c00?})
        go/ast/walk.go:145 +0xa8b
go/ast.Walk({0x7afa98?, 0xc001361098?}, {0x7b12e8?, 0xc0008bbde0?})
        go/ast/walk.go:207 +0x1154
go/ast.walkStmtList({0x7afa98, 0xc001361098}, {0xc0008da5a0?, 0x2, 0x7f53328655b8?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afa98?, 0xc001360f00?}, {0x7b10e0?, 0xc0008cd920?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afa98?, 0xc001360e28?}, {0x7b13d8?, 0xc0008bbdf0?})
        go/ast/walk.go:100 +0x1c36
go/ast.walkExprList({0x7afa98, 0xc001360e28}, {0xc0008da5c0?, 0x2, 0x7f53328655b8?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc001360e10?}, {0x7b1130?, 0xc0008d5c40?})
        go/ast/walk.go:145 +0xa8b
go/ast.Walk({0x7afa98?, 0xc00135fa70?}, {0x7b12e8?, 0xc0008bbe10?})
        go/ast/walk.go:207 +0x1154
go/ast.walkStmtList({0x7afa98, 0xc00135fa70}, {0xc0008da5e0?, 0x2, 0x7f53328654a8?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afa98?, 0xc00135f8a8?}, {0x7b10e0?, 0xc0008cd950?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afa98?, 0xc0009b0420?}, {0x7b13b0?, 0xc0008cd980?})
        go/ast/walk.go:358 +0x4b0
go/ast.walkDeclList({0x7afa98, 0xc0009b0420}, {0xc0008d4f80?, 0x4, 0x0?})
        go/ast/walk.go:38 +0x91
go/ast.Walk({0x7afa98?, 0xc0009b0408?}, {0x7b1360?, 0xc00035a200?})
        go/ast/walk.go:367 +0x1890
github.com/mgechev/revive/rule.(*ContextKeysType).Apply(0x6f31c0?, 0xc0008d5cc0, {0x745a1e?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/context-keys-type.go:28 +0xe5
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 22 [runnable]:
go/ast.Walk({0x7afa98?, 0xc000a44810?}, {0x7b1748?, 0xc000242ae0?})
        go/ast/walk.go:148 +0x18de
go/ast.Walk({0x7afa98?, 0xc000a447c8?}, {0x7b0fc8?, 0xc000262990?})
        go/ast/walk.go:166 +0x1e85
go/ast.walkExprList({0x7afa98, 0xc000a447c8}, {0xc000451640?, 0x2, 0xc0007915c0?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc000a44780?}, {0x7b1130?, 0xc0004194c0?})
        go/ast/walk.go:145 +0xa8b
go/ast.walkExprList({0x7afa98, 0xc000a44780}, {0xc000077370?, 0x1, 0xc0000d2a80?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afa98?, 0xc000a44768?}, {0x7b0ff0?, 0xc0004222c0?})
        go/ast/walk.go:218 +0x1548
go/ast.walkStmtList({0x7afa98, 0xc000a44768}, {0xc000486c00?, 0xb, 0x7f53328c5a88?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afa98?, 0xc000a44030?}, {0x7b10e0?, 0xc0002630e0?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afa98?, 0xc00052c5d0?}, {0x7b13b0?, 0xc000263110?})
        go/ast/walk.go:358 +0x4b0
go/ast.walkDeclList({0x7afa98, 0xc00052c5d0}, {0xc0000d25c0?, 0x4, 0x0?})
        go/ast/walk.go:38 +0x91
go/ast.Walk({0x7afa98?, 0xc00052c5b8?}, {0x7b1360?, 0xc000437b80?})
        go/ast/walk.go:367 +0x1890
github.com/mgechev/revive/rule.(*ContextKeysType).Apply(0x6f31c0?, 0xc0000d2a80, {0x745a1e?, 0x11?, 0x1?})
        github.com/mgechev/revive/rule/context-keys-type.go:28 +0xe5
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 23 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc000855ac0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 24 [running]:
        goroutine running on other thread; stack unavailable
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 25 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0006104c0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 26 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00088fec0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 28 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00001e400, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 29 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0003e9e40, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 30 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0000d3d00, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 31 [semacquire]:
sync.runtime_SemacquireMutex(0x2000?, 0x0?, 0x1006fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00077af80, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 32 [semacquire]:
sync.runtime_SemacquireMutex(0x2000?, 0x0?, 0x1006fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0002b0bc0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 33 [runnable]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc000843580, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 34 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0008c3680, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 35 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0001fb9c0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 36 [semacquire]:
sync.runtime_SemacquireMutex(0x2000?, 0x0?, 0x1006fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00028d3c0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 37 [semacquire]:
sync.runtime_SemacquireMutex(0x2000?, 0x0?, 0x1006fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc00030a140, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 38 [semacquire]:
sync.runtime_SemacquireMutex(0x40aed6?, 0xe0?, 0x6fe160?)
        runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc0001d07b0)
        sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
github.com/mgechev/revive/lint.(*Package).TypeCheck(0xc0001d0780)
        github.com/mgechev/revive/lint/package.go:56 +0x57
github.com/mgechev/revive/rule.(*UnexportedReturnRule).Apply(0x6f31c0?, 0xc0005a81c0, {0x745dc5?, 0x11?, 0x0?})
        github.com/mgechev/revive/rule/unexported-return.go:27 +0x93
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 39 [runnable]:
github.com/mgechev/revive/rule.lintElse.Visit({0xc000fc0000?, 0xc000fbc030?}, {0x0?, 0x0?})
        github.com/mgechev/revive/rule/indent-error-flow.go:36 +0x485
go/ast.Walk({0x7afb38?, 0xc000fcab00?}, {0x7b16d0?, 0xc00000c390?})
        go/ast/walk.go:381 +0x1eee
go/ast.Walk({0x7afb38?, 0xc000fcaaf0?}, {0x7b16d0?, 0xc00000c3a8?})
        go/ast/walk.go:112 +0x16d0
go/ast.Walk({0x7afb38?, 0xc000fcaa40?}, {0x7b1720?, 0xc000114480?})
        go/ast/walk.go:126 +0x1ca6
go/ast.walkExprList({0x7afb38, 0xc000fcaa40}, {0xc0004b76d0?, 0x1, 0xc000fbc030?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afb38?, 0xc000fcaa30?}, {0x7b0ff0?, 0xc00028df00?})
        go/ast/walk.go:218 +0x1548
go/ast.walkStmtList({0x7afb38, 0xc000fcaa30}, {0xc0004b76e0?, 0x1, 0xc001344ff0?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afb38?, 0xc000fca9e0?}, {0x7b10e0?, 0xc0001fe840?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afb38?, 0xc000fca9d0?}, {0x7b13d8?, 0xc0004b76f0?})
        go/ast/walk.go:100 +0x1c36
go/ast.Walk({0x7afb38?, 0xc000fca9c0?}, {0x7b1130?, 0xc0002b6300?})
        go/ast/walk.go:144 +0xa65
go/ast.Walk({0x7afb38?, 0xc000fc96d0?}, {0x7b1270?, 0xc0004b7700?})
        go/ast/walk.go:224 +0x12b5
go/ast.walkStmtList({0x7afb38, 0xc000fc96d0}, {0xc0000d8600?, 0x16, 0xc001345458?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afb38?, 0xc000fc9580?}, {0x7b10e0?, 0xc0001feb10?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afb38?, 0xc000fc9570?}, {0x7b13d8?, 0xc0004b79b0?})
        go/ast/walk.go:100 +0x1c36
go/ast.Walk({0x7afb38?, 0xc000fc9520?}, {0x7b1130?, 0xc0002cbc00?})
        go/ast/walk.go:144 +0xa65
go/ast.walkExprList({0x7afb38, 0xc000fc9520}, {0xc0004b79c0?, 0x1, 0xc000fbc030?})
        go/ast/walk.go:26 +0x91
go/ast.Walk({0x7afb38?, 0xc000fc8d10?}, {0x7b0ff0?, 0xc0002cbf00?})
        go/ast/walk.go:218 +0x1548
go/ast.walkStmtList({0x7afb38, 0xc000fc8d10}, {0xc0000d8800?, 0x11, 0x10?})
        go/ast/walk.go:32 +0x91
go/ast.Walk({0x7afb38?, 0xc000fc8900?}, {0x7b10e0?, 0xc0001fedb0?})
        go/ast/walk.go:235 +0x10e5
go/ast.Walk({0x7afb38?, 0xc000fbc050?}, {0x7b13b0?, 0xc0001fede0?})
        go/ast/walk.go:358 +0x4b0
go/ast.walkDeclList({0x7afb38, 0xc000fbc050}, {0xc000486800?, 0x9, 0x0?})
        go/ast/walk.go:38 +0x91
go/ast.Walk({0x7afb38?, 0xc000fbc040?}, {0x7b1360?, 0xc000437580?})
        go/ast/walk.go:367 +0x1890
github.com/mgechev/revive/rule.(*IndentErrorFlowRule).Apply(0x6f31c0?, 0xc0002f7840, {0x745b1d?, 0x11?, 0x1?})
        github.com/mgechev/revive/rule/indent-error-flow.go:22 +0xba
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

goroutine 24 [running]:
runtime.throw({0x74757b?, 0x71b2c0?})
        runtime/panic.go:992 +0x71 fp=0xc0005cdad0 sp=0xc0005cdaa0 pc=0x433731
runtime.mapassign_faststr(0x6fb220, 0xc0014197d0, {0xc0000266d8, 0xf})
        runtime/map_faststr.go:295 +0x38b fp=0xc0005cdb38 sp=0xc0005cdad0 pc=0x412c2b
github.com/mgechev/revive/rule.(*UnhandledErrorRule).Apply(0xc00000e0a8, 0xc00086d980, {0xc0000c4580, 0x8, 0x0?})
        github.com/mgechev/revive/rule/unhandled-error.go:29 +0x1e7 fp=0xc0005cdba0 sp=0xc0005cdb38 pc=0x6a8ea7
github.com/mgechev/revive/lint.(*File).lint(0x0?, {0xc000065800, 0x30, 0x40}, {0x0, 0x3fe999999999999a, {0x0, 0x0}, 0x1, 0xc00019c960, ...}, ...)
        github.com/mgechev/revive/lint/file.go:105 +0x19b fp=0xc0005cdf08 sp=0xc0005cdba0 pc=0x647a3b
github.com/mgechev/revive/lint.(*Package).lint.func1(0x0?)
        github.com/mgechev/revive/lint/package.go:173 +0x85 fp=0xc0005cdfc8 sp=0xc0005cdf08 pc=0x64b4a5
github.com/mgechev/revive/lint.(*Package).lint.func2()
        github.com/mgechev/revive/lint/package.go:175 +0x2a fp=0xc0005cdfe0 sp=0xc0005cdfc8 pc=0x64b3ea
runtime.goexit()
        runtime/asm_amd64.s:1571 +0x1 fp=0xc0005cdfe8 sp=0xc0005cdfe0 pc=0x461da1
created by github.com/mgechev/revive/lint.(*Package).lint
        github.com/mgechev/revive/lint/package.go:172 +0xac

To Reproduce
Steps to reproduce the behavior:

  1. Using Go 1.18.0. Did not try with other versions
  2. I think one needs only a repository with the right error reports. I can reproduce it (after lots of runs)
  3. untilfail revive github.com/...
@zimmski zimmski changed the title Concurrent map writes Revive fatally fails with "Concurrent map writes" Apr 8, 2022
@chavacava
Copy link
Collaborator

duplicated of #677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants