Closed califlower closed 3 weeks ago
This is still an issue in 0.18.4 and wasn't fixed by the data race fix release. Throwing in the log in case there's any differences
WARNING: DATA RACE
--
| Read at 0x00c0001fc2d0 by goroutine 625:
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas()
| /workdir/vendor/github.com/pb33f/libopenapi/index/spec_index.go:331 +0x44
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas-fm()
| <autogenerated>:1 +0x33
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:88 +0x661
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Previous write at 0x00c0001fc2d0 by goroutine 612:
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas()
| /workdir/vendor/github.com/pb33f/libopenapi/index/spec_index.go:335 +0xa4
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas-fm()
| <autogenerated>:1 +0x33
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:88 +0x661
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Goroutine 625 (running) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*RequestBody).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/request_body.go:84 +0x499
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.RequestBody,go.shape.8b0ed3aa8fc3276e4074c301238ea35fc7fea99df9cec99a11e82872c7f7815e]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:121 +0x807
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
|
| Goroutine 612 (finished) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Response).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/response.go:113 +0x7a4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookupExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:560 +0xb18
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookup[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:600 +0x5e4
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Responses).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/responses.go:88 +0x5a8
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Responses,go.shape.c111d9ddc09c170ad49ebf29d7bcdb1b0c5e1d777a3c07dd0618481ab189fcc0]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:139 +0xba7
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
| ==================
| ==================
| WARNING: DATA RACE
| Read at 0x00c00037ced0 by goroutine 625:
| runtime.mapaccess1_faststr()
| /usr/local/go/src/runtime/map_faststr.go:13 +0x0
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:89 +0x68e
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Previous write at 0x00c00037ced0 by goroutine 612:
| runtime.mapassign_faststr()
| /usr/local/go/src/runtime/map_faststr.go:223 +0x0
| github.com/pb33f/libopenapi/index.syncMapToMap[go.shape.string,go.shape.*uint8].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/index/utility_methods.go:602 +0xcf
| sync.(*Map).Range()
| /usr/local/go/src/sync/map.go:501 +0x1e5
| github.com/pb33f/libopenapi/index.syncMapToMap[go.shape.string,go.shape.*uint8]()
| /workdir/vendor/github.com/pb33f/libopenapi/index/utility_methods.go:601 +0x95
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas()
| /workdir/vendor/github.com/pb33f/libopenapi/index/spec_index.go:334 +0x84
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas-fm()
| <autogenerated>:1 +0x33
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:88 +0x661
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Goroutine 625 (running) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*RequestBody).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/request_body.go:84 +0x499
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.RequestBody,go.shape.8b0ed3aa8fc3276e4074c301238ea35fc7fea99df9cec99a11e82872c7f7815e]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:121 +0x807
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
|
| Goroutine 612 (finished) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Response).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/response.go:113 +0x7a4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookupExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:560 +0xb18
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookup[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:600 +0x5e4
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Responses).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/responses.go:88 +0x5a8
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Responses,go.shape.c111d9ddc09c170ad49ebf29d7bcdb1b0c5e1d777a3c07dd0618481ab189fcc0]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:139 +0xba7
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
| ==================
| ==================
| WARNING: DATA RACE
| Read at 0x00c00037edb8 by goroutine 625:
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:89 +0x69b
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Previous write at 0x00c00037edb8 by goroutine 612:
| github.com/pb33f/libopenapi/index.syncMapToMap[go.shape.string,go.shape.*uint8].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/index/utility_methods.go:602 +0xdb
| sync.(*Map).Range()
| /usr/local/go/src/sync/map.go:501 +0x1e5
| github.com/pb33f/libopenapi/index.syncMapToMap[go.shape.string,go.shape.*uint8]()
| /workdir/vendor/github.com/pb33f/libopenapi/index/utility_methods.go:601 +0x95
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas()
| /workdir/vendor/github.com/pb33f/libopenapi/index/spec_index.go:334 +0x84
| github.com/pb33f/libopenapi/index.(*SpecIndex).GetAllComponentSchemas-fm()
| <autogenerated>:1 +0x33
| github.com/pb33f/libopenapi/datamodel/low.LocateRefNodeWithContext()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:88 +0x661
| github.com/pb33f/libopenapi/datamodel/low/base.ExtractSchema()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/base/schema.go:1301 +0x478
| github.com/pb33f/libopenapi/datamodel/low/v3.(*MediaType).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/media_type.go:110 +0x744
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429].func3()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:760 +0x302
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }].func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:237 +0x1f5
|
| Goroutine 625 (running) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*RequestBody).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/request_body.go:84 +0x499
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.RequestBody,go.shape.8b0ed3aa8fc3276e4074c301238ea35fc7fea99df9cec99a11e82872c7f7815e]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:121 +0x807
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
|
| Goroutine 612 (finished) created at:
| github.com/pb33f/libopenapi/datamodel.TranslatePipeline[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.label *gopkg.in/yaml%2ev3.Node; github.com/pb33f/libopenapi/datamodel/low.value *gopkg.in/yaml%2ev3.Node },go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.k github.com/pb33f/libopenapi/datamodel/low.KeyReference[string]; github.com/pb33f/libopenapi/datamodel/low.v github.com/pb33f/libopenapi/datamodel/low.ValueReference[go.shape.*uint8] }]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:229 +0x2b4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:784 +0xaa4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMap[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.MediaType,go.shape.250e0d0e7bcc99833342e881c9c85d52cc80b0350190b6a26640d56bd0fcd429]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:808 +0x9c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Response).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/response.go:113 +0x7a4
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookupExtensions[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:560 +0xb18
| github.com/pb33f/libopenapi/datamodel/low.ExtractMapNoLookup[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Response,go.shape.52dffc460753a55a8619192221d6f482d2521fefc8ef0824246678b2acd6d9a8]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:600 +0x5e4
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Responses).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/responses.go:88 +0x5a8
| github.com/pb33f/libopenapi/datamodel/low.ExtractObject[go.shape.*github.com/pb33f/libopenapi/datamodel/low/v3.Responses,go.shape.c111d9ddc09c170ad49ebf29d7bcdb1b0c5e1d777a3c07dd0618481ab189fcc0]()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/extraction_functions.go:330 +0x56c
| github.com/pb33f/libopenapi/datamodel/low/v3.(*Operation).Build()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/operation.go:139 +0xba7
| github.com/pb33f/libopenapi/datamodel/low/v3.(*PathItem).Build.func1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/low/v3/path_item.go:309 +0x11e
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.2()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:77 +0x155
| github.com/pb33f/libopenapi/datamodel.TranslateSliceParallel[go.shape.struct { github.com/pb33f/libopenapi/datamodel/low.Reference; Value *github.com/pb33f/libopenapi/datamodel/low/v3.Operation; ValueNode *gopkg.in/yaml%2ev3.Node; KeyNode *gopkg.in/yaml%2ev3.Node; Context context.Context },go.shape.interface {}].func1.gowrap1()
| /workdir/vendor/github.com/pb33f/libopenapi/datamodel/translate.go:93 +0xd4
I have not yet addressed this issue myself, please feel free to submit a PR! All are welcome.
Sure! I have a commit that fixes this. I'm running a few tests for this to ensure that it solves the issue (I think it does). I'll submit a fix soon. Sorry for posting giant logs.
@daveshanley Submitted #344
Can be unreliably triggered by SearchIndexForReference in a loop? But I think there needs to be a lock of some sort on SpecIndex. I assume multiple threads are checking if they're null, then initializing them. I can submit a PR if needed