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

fatal error: bad stack size with mongorestore on openssl 1.0.2d

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.7, 3.2.0-rc5
    • Component/s: All Tools
    • Labels:
    • Environment:
      OSX 10.11.1
      mongodb: stable 3.0.7 (bottled)
      go: stable 1.5.1 (bottled)
      scons: stable 2.4.0 (bottled)
      openssl: stable 1.0.2d (bottled)

      I installed mongo on OSX 10.11.1 with brew as follows

      brew install mongodb --with-openssl
      

      Connecting to the db instance using --ssl ans --sslCAFile works as expected. So, it doesn't look like a certificate issue.

      I created a dump form a db (running without SSL) and then tried to import that dump to a db running with SSL. mongorestore fails witht he following error:

      fatal error: bad stack size
      
      runtime stack:
      runtime.throw(0x45231d0, 0xe)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:527 +0x90
      runtime.stackfree(0x4f08b00, 0xc820055fc0, 0x2000)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/stack1.go:281 +0x96
      runtime.gfput(0xc82001f500, 0xc820001b00)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/proc1.go:2316 +0x8e
      runtime.goexit0(0xc820001b00)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/proc1.go:1764 +0x19d
      runtime.mcall(0x70)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:204 +0x5b
      
      goroutine 1 [runnable]:
      gopkg.in/mgo%2ev2.(*mongoSocket).dropLogout(0xc8200e4460, 0x7fff5fbffb1a, 0x6, 0x7fff5fbffb24, 0x14, 0x4517740, 0x5, 0x0, 0x0, 0x0, ...)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/auth.go:458
      gopkg.in/mgo%2ev2.(*mongoSocket).Login(0xc8200e4460, 0x7fff5fbffb1a, 0x6, 0x7fff5fbffb24, 0x14, 0x4517740, 0x5, 0x0, 0x0, 0x0, ...)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/auth.go:173 +0x48e
      gopkg.in/mgo%2ev2.(*Session).socketLogin(0xc82011c340, 0xc8200e4460, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:685 +0xed
      gopkg.in/mgo%2ev2.(*Session).acquireSocket(0xc82011c340, 0x477c501, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:3947 +0x342
      gopkg.in/mgo%2ev2.(*Database).Run(0xc820053730, 0x43c07a0, 0xc820011130, 0x0, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:609 +0x3f
      gopkg.in/mgo%2ev2.(*Session).Run(0xc82011c340, 0x43c07a0, 0xc820011130, 0x0, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:1795 +0xbc
      gopkg.in/mgo%2ev2.(*Session).Ping(0xc82011c340, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:1824 +0x8d
      gopkg.in/mgo%2ev2.DialWithInfo(0xc82000a8f0, 0xc820053938, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:423 +0x755
      github.com/mongodb/mongo-tools/common/db/openssl.(*SSLDBConnector).GetNewSession(0xc82000e540, 0x45f19f8, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/openssl/openssl.go:72 +0x45
      github.com/mongodb/mongo-tools/common/db.(*SessionProvider).GetSession(0xc820017890, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/db.go:95 +0x115
      github.com/mongodb/mongo-tools/common/db.(*SessionProvider).GetNodeType(0xc820017890, 0x0, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/command.go:83 +0x54
      github.com/mongodb/mongo-tools/common/db.(*SessionProvider).IsMongos(0xc820017890, 0x4589700, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/command.go:121 +0x31
      github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).ParseAndValidateOptions(0xc820126000, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongorestore/mongorestore.go:84 +0x515
      github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).Restore(0xc820126000, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongorestore/mongorestore.go:144 +0x54
      main.main()
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/mongorestore/main/mongorestore.go:71 +0x810
      
      goroutine 17 [syscall, locked to thread]:
      runtime.goexit()
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1
      
      goroutine 20 [syscall]:
      os/signal.loop()
      	/usr/local/Cellar/go/1.5.1/libexec/src/os/signal/signal_unix.go:22 +0x18
      created by os/signal.init.1
      	/usr/local/Cellar/go/1.5.1/libexec/src/os/signal/signal_unix.go:28 +0x37
      
      goroutine 5 [chan receive]:
      github.com/mongodb/mongo-tools/common/signals.Handle()
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/signals/signals_unix.go:16 +0x1b8
      created by main.main
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/mongorestore/main/mongorestore.go:16 +0x49
      
      goroutine 34 [select, locked to thread]:
      runtime.gopark(0x45f1960, 0xc820116728, 0x4519d88, 0x6, 0x4031718, 0x2)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/proc.go:185 +0x163
      runtime.selectgoImpl(0xc820116728, 0x0, 0x18)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/select.go:392 +0xa64
      runtime.selectgo(0xc820116728)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/select.go:212 +0x12
      runtime.ensureSigM.func1()
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/signal1_unix.go:227 +0x323
      runtime.goexit()
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1
      
      goroutine 6 [runnable]:
      sync.runtime_Semacquire(0xc82001118c)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/sema.go:43 +0x26
      sync.(*WaitGroup).Wait(0xc820011180)
      	/usr/local/Cellar/go/1.5.1/libexec/src/sync/waitgroup.go:126 +0xb4
      gopkg.in/mgo%2ev2.(*mongoCluster).syncServersIteration(0xc8200e8100, 0x1)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/cluster.go:517 +0x45c
      gopkg.in/mgo%2ev2.(*mongoCluster).syncServersLoop(0xc8200e8100)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/cluster.go:355 +0x248
      created by gopkg.in/mgo%2ev2.newCluster
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/cluster.go:78 +0x1d0
      
      goroutine 12 [IO wait]:
      net.runtime_pollWait(0x4e8b1a0, 0x72, 0xc8200780a0)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/netpoll.go:157 +0x60
      net.(*pollDesc).Wait(0xc8200191e0, 0x72, 0x0, 0x0)
      	/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:73 +0x3a
      net.(*pollDesc).WaitRead(0xc8200191e0, 0x0, 0x0)
      	/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:78 +0x36
      net.(*netFD).Read(0xc820019180, 0xc820134000, 0x4000, 0x4000, 0x0, 0x5b60028, 0xc8200780a0)
      	/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_unix.go:232 +0x23a
      net.(*conn).Read(0xc820032138, 0xc820134000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
      	/usr/local/Cellar/go/1.5.1/libexec/src/net/net.go:172 +0xe4
      github.com/spacemonkeygo/openssl.(*readBio).ReadFromOnce(0xc820017d10, 0x4e8b368, 0xc820032138, 0x0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/github.com/spacemonkeygo/openssl/bio.go:298 +0x28d
      github.com/spacemonkeygo/openssl.(*Conn).fillInputBuffer(0xc8200148c0, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/github.com/spacemonkeygo/openssl/conn.go:146 +0x75
      github.com/spacemonkeygo/openssl.(*Conn).getErrorHandler.func3(0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/github.com/spacemonkeygo/openssl/conn.go:189 +0x7b
      github.com/spacemonkeygo/openssl.(*Conn).handleError(0xc8200148c0, 0xc8200a2720, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/github.com/spacemonkeygo/openssl/conn.go:226 +0x33
      github.com/spacemonkeygo/openssl.(*Conn).Read(0xc8200148c0, 0xc82007d5c0, 0x24, 0x24, 0x0, 0x5b60000, 0xc8200104e0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/github.com/spacemonkeygo/openssl/conn.go:415 +0xea
      gopkg.in/mgo%2ev2.fill(0x4e8b3b8, 0xc8200148c0, 0xc82007d5c0, 0x24, 0x24, 0x0, 0x0)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:504 +0x6c
      gopkg.in/mgo%2ev2.(*mongoSocket).readLoop(0xc8200e4460)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:521 +0x132
      created by gopkg.in/mgo%2ev2.newSocket
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/socket.go:168 +0x402
      
      goroutine 53 [sleep]:
      time.Sleep(0x12a05f200)
      	/usr/local/Cellar/go/1.5.1/libexec/src/runtime/time.go:59 +0xf9
      gopkg.in/mgo%2ev2.(*mongoServer).pinger(0xc8200e42a0, 0x1)
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/server.go:297 +0x1b4
      created by gopkg.in/mgo%2ev2.newServer
      	/private/tmp/mongodb20151119-36054-1lnyq8b/mongodb-src-r3.0.7/src/github.com/mongodb/mongo-tools/vendor/src/gopkg.in/mgo.v2/server.go:90 +0x162
      

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            afu@nezasa.com Andreas
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: