Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-496

panic in mongoimport related to tomb package

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.8.0-rc3
    • Affects Version/s: 2.8.0-rc2
    • Component/s: None
    • None
    • 2014 Last MCI Iteration

      Repro'ed by running the query.js test for mongoexport a number of times, which uses mongoimport on a small dataset. The panic is:

      sh89285| panic: tomb.Go called after all goroutines terminated
      sh89285|
      sh89285| goroutine 48 [running]:
      sh89285| runtime.panic(0x1f2b80, 0xc20809a140)
      sh89285| 	/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
      sh89285| gopkg.in/tomb%2ev2.(*Tomb).Go(0xc2080a2210, 0xc20809e1e0)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/tomb.v2/tomb.go:145 +0xe8
      sh89285| github.com/mongodb/mongo-tools/mongoimport.streamDocuments(0x265900, 0x8, 0xc2080b20e0, 0xc2080f0000, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/common.go:219 +0x286
      sh89285| github.com/mongodb/mongo-tools/mongoimport.(*JSONInputReader).StreamDocument(0xc2080780f0, 0x0, 0xc2080f0000, 0xc2080ce2a0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/json.go:120 +0x110
      sh89285| created by github.com/mongodb/mongo-tools/mongoimport.(*MongoImport).importDocuments
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:320 +0xaa3
      sh89285|
      sh89285| goroutine 16 [chan receive]:
      sh89285| gopkg.in/tomb%2ev2.(*Tomb).Wait(0xc2080c0300, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/tomb.v2/tomb.go:116 +0x5d
      sh89285| github.com/mongodb/mongo-tools/mongoimport.(*MongoImport).IngestDocuments(0xc2080840c0, 0xc2080f0000, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:358 +0x146
      sh89285| github.com/mongodb/mongo-tools/mongoimport.(*MongoImport).importDocuments(0xc2080840c0, 0x4b1670, 0xc2080780f0, 0x0, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:328 +0xae7
      sh89285| github.com/mongodb/mongo-tools/mongoimport.(*MongoImport).ImportDocuments(0xc2080840c0, 0x0, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:255 +0x1e9
      sh89285| main.main()
      sh89285| 	/Users/sam/tengen/mongo-tools/mongoimport/main/mongoimport.go:68 +0x691
      sh89285|
      sh89285| goroutine 19 [finalizer wait]:
      sh89285| runtime.park(0x14de0, 0x4045c8, 0x403929)
      sh89285| 	/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
      sh89285| runtime.parkunlock(0x4045c8, 0x403929)
      sh89285| 	/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
      sh89285| runfinq()
      sh89285| 	/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
      sh89285| runtime.goexit()
      sh89285| 	/usr/local/go/src/pkg/runtime/proc.c:1445
      sh89285|
      sh89285| goroutine 20 [sleep]:
      sh89285| time.Sleep(0x1dcd6500)
      sh89285| 	/private/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/makerelease910109054/go/src/pkg/runtime/time.goc:39 +0x31
      sh89285| gopkg.in/mgo%2ev2.(*mongoCluster).syncServersLoop(0xc208026000)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/cluster.go:355 +0x249
      sh89285| created by gopkg.in/mgo%2ev2.newCluster
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/cluster.go:73 +0x153
      sh89285|
      sh89285| goroutine 21 [IO wait]:
      sh89285| net.runtime_pollWait(0x4b2720, 0x72, 0x0)
      sh89285| 	/private/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/makerelease910109054/go/src/pkg/runtime/netpoll.goc:146 +0x66
      sh89285| net.(*pollDesc).Wait(0xc2080ae1b0, 0x72, 0x0, 0x0)
      sh89285| 	/usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
      sh89285| net.(*pollDesc).WaitRead(0xc2080ae1b0, 0x0, 0x0)
      sh89285| 	/usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
      sh89285| net.(*netFD).Read(0xc2080ae150, 0xc2080a21e0, 0x24, 0x24, 0x0, 0x4ad3a0, 0x23)
      sh89285| 	/usr/local/go/src/pkg/net/fd_unix.go:242 +0x34c
      sh89285| net.(*conn).Read(0xc208036060, 0xc2080a21e0, 0x24, 0x24, 0x0, 0x0, 0x0)
      sh89285| 	/usr/local/go/src/pkg/net/net.go:122 +0xe7
      sh89285| gopkg.in/mgo%2ev2.fill(0x4b2828, 0xc208036060, 0xc2080a21e0, 0x24, 0x24, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:502 +0x7f
      sh89285| gopkg.in/mgo%2ev2.(*mongoSocket).readLoop(0xc20809c0e0)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:519 +0x11f
      sh89285| created by gopkg.in/mgo%2ev2.newSocket
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:166 +0x2ee
      sh89285|
      sh89285| goroutine 22 [sleep]:
      sh89285| time.Sleep(0x12a05f200)
      sh89285| 	/private/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/makerelease910109054/go/src/pkg/runtime/time.goc:39 +0x31
      sh89285| gopkg.in/mgo%2ev2.(*mongoServer).pinger(0xc2080b2000, 0xc2080b2001)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/server.go:296 +0x11e
      sh89285| created by gopkg.in/mgo%2ev2.newServer
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/mgo.v2/server.go:89 +0xf1
      sh89285|
      sh89285| goroutine 49 [select]:
      sh89285| github.com/mongodb/mongo-tools/mongoimport.(*MongoImport).ingestDocs(0xc2080840c0, 0xc2080f0000, 0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:401 +0xaf8
      sh89285| github.com/mongodb/mongo-tools/mongoimport.funcĀ·006(0x0, 0x0)
      sh89285| 	/Users/sam/tengen/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongoimport/mongoimport.go:355 +0x47
      sh89285| gopkg.in/tomb%2ev2.(*Tomb).run(0xc2080c0300, 0xc2080bc660)
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/tomb.v2/tomb.go:153 +0x23
      sh89285| created by gopkg.in/tomb%2ev2.(*Tomb).Go
      sh89285| 	/Users/sam/tengen/mongo-tools/vendor/src/gopkg.in/tomb.v2/tomb.go:149 +0x110
       m31000| 2014-12-11T09:41:50.891-0500 I NETWORK  [conn3] end connection 127.0.0.1:52662 (1 connection now open)
      

            Assignee:
            adinoyi.omuya@mongodb.com Adinoyi Omuya
            Reporter:
            sam.helman@10gen.com sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: