Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1382

fatal error: concurrent map writes

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.1.2
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      Google App Engine Go 1.11

      Hi guys,

      I get the follow fatal error when running some code inside goroutines and it looks like the BSON package has an issue:

      2019-10-31 14:07:07 fatal error: concurrent map writes
      2019-10-31 14:07:07
      2019-10-31 14:07:07 goroutine 8075 [running]:
      2019-10-31 14:07:07 runtime.throw(0x133c910, 0x15)
      2019-10-31 14:07:07 /usr/local/go/src/runtime/panic.go:608 +0x72 fp=0xc003623008 sp=0xc003622fd8 pc=0x42c792
      2019-10-31 14:07:07 runtime.mapassign(0x111d7a0, 0xc000dbeb70, 0xc003376cd0, 0xc003376cd0)
      2019-10-31 14:07:07 /usr/local/go/src/runtime/map.go:563 +0x560 fp=0xc003623090 sp=0xc003623008 pc=0x40fa10
      2019-10-31 14:07:07 reflect.mapassign(0x111d7a0, 0xc000dbeb70, 0xc003376cd0, 0xc004056420)
      2019-10-31 14:07:07 /usr/local/go/src/runtime/map.go:1259 +0x3f fp=0xc0036230c0 sp=0xc003623090 pc=0x4112bf
      2019-10-31 14:07:07 reflect.Value.SetMapIndex(0x111d7a0, 0xc0008f34c8, 0x195, 0x10c3580, 0xc003376cd0, 0x98, 0x12dbae0, 0xc004056420, 0x199)
      2019-10-31 14:07:07 /usr/local/go/src/reflect/value.go:1545 +0x22f fp=0xc003623128 sp=0xc0036230c0 pc=0x4b776f
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec.DefaultValueDecoders.MapDecodeValue(0xc000483ab0, 0x21d1600, 0x0, 0x0, 0x1748ca0, 0xc0016c5300, 0x111d7a0, 0xc0008f34c8, 0x195, 0x0, ...)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go:699 +0x427 fp=0xc0036232c0 sp=0xc003623128 pc=0xbc5cc7
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec.DefaultValueDecoders.MapDecodeValue-fm(0xc000483ab0, 0x0, 0x0, 0x0, 0x1748ca0, 0xc0016c5300, 0x111d7a0, 0xc0008f34c8, 0x195, 0x111d7a0, ...)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go:79 +0x96 fp=0xc003623328 sp=0xc0036232c0 pc=0xbdcdb6
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec.ValueDecoderFunc.DecodeValue(0xc000469830, 0xc000483ab0, 0x0, 0x0, 0x0, 0x1748ca0, 0xc0016c5300, 0x111d7a0, 0xc0008f34c8, 0x195, ...)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/bsoncodec.go:156 +0x98 fp=0xc003623390 sp=0xc003623328 pc=0xbbd2d8
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec.(*StructCodec).DecodeValue(0xc0003ff3e0, 0xc000483ab0, 0x1303600, 0x0, 0x0, 0x1748ca0, 0xc0016c5300, 0x1303640, 0xc0008f3400, 0x199, ...)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_codec.go:212 +0x5c3 fp=0xc0036236b8 sp=0xc003623390 pc=0xbd72d3
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson.(*Decoder).Decode(0xc0017865a0, 0x112a5a0, 0xc0008f3400, 0x11a0fc0, 0xc0017865a0)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/decoder.go:92 +0x231 fp=0xc003623788 sp=0xc0036236b8 pc=0xbe3391
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson.unmarshalFromReader(0xc000483ab0, 0xc0016c5300, 0x0, 0x0, 0x1748ca0, 0xc0016c5300, 0x112a5a0, 0xc0008f3400, 0x0, 0x0)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/unmarshal.go:100 +0xfd fp=0xc0036237c8 sp=0xc003623788 pc=0xbe8fad
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson.UnmarshalWithRegistry(0xc000483ab0, 0xc0010b2acf, 0x8be, 0x948, 0x112a5a0, 0xc0008f3400, 0x1, 0xc001c3b2c0)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/bson/unmarshal.go:45 +0x12d fp=0xc003623840 sp=0xc0036237c8 pc=0xbe8e3d
      2019-10-31 14:07:07 github.com/.../api/vendor/go.mongodb.org/mongo-driver/mongo.(*SingleResult).Decode(0xc0016c5240, 0x112a5a0, 0xc0008f3400, 0x114eb80, 0xc0034e4c00)
      2019-10-31 14:07:07 /tmp/staging652131288/srv/gopath/src/github.com/.../api/vendor/go.mongodb.org/mongo-driver/mongo/single_result.go:46 +0xbe fp=0xc003623890 sp=0xc003623840 pc=0xd193fe
      2019-10-31 14:07:07 github.com/.../api/services/segmentation.(*Service).RecomputeOneSegmentForUser(0xc001f236b0, 0x173edc0, 0xc0034e4ae0, 0xc0002b16b0, 0xc0008f3400, 0xc0005e52c0, 0xc003efca80, 0xc0017fd300, 0xbf66d882f3ed8f04, 0x952a922ad, ...)

      Any idea please?
      Thanks

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            pierre@captainmetrics.com Pierre Bazoge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: