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

Panic in cursor Close deadlocks

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.18
    • Affects Version/s: None
    • Component/s: CRUD
    • Labels:

      Passing a nil context to cursor.Close triggered a panic that then caused the application to hang. The Go tracer identified the following stack trace:

      noformat
      runtime.selectgo:392
      github.com/mongodb/mongo-go-driver/vendor/golang.org/x/sync/semaphore.(*Weighted).Acquire:64
      github.com/mongodb/mongo-go-driver/core/connection.(*pool).Disconnect:131
      github.com/mongodb/mongo-go-driver/core/topology.(*Server).Disconnect:164
      github.com/mongodb/mongo-go-driver/core/topology.(*Topology).removeServer:422
      github.com/mongodb/mongo-go-driver/core/topology.(*Topology).Disconnect:155
      github.com/mongodb/mongo-go-driver/mongo.(*Client).Disconnect:109
      github.com/mongodb/mongo-tools-common/db.(*SessionProvider).Close:124
      runtime.call32:573
      runtime.gopanic:502
      runtime.panicmem:63
      runtime.sigpanic:388
      github.com/mongodb/mongo-go-driver/core/connection.(*pool).get:176
      github.com/mongodb/mongo-go-driver/core/connection.(*pool).Get:163
      github.com/mongodb/mongo-go-driver/core/topology.(*Server).Connection:180
      github.com/mongodb/mongo-go-driver/core/topology.(*cursor).Close:148
      github.com/mongodb/mongo-tools/mongodump.(*MongoDump).CreateIntentsForDatabase:379
      github.com/mongodb/mongo-tools/mongodump.(*MongoDump).CreateAllIntents:416
      github.com/mongodb/mongo-tools/mongodump.(*MongoDump).Dump:263
      main.main:92
      noformat

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: