Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongorestore random crash (fatal error)

I'm on macOS 10.12.

mongod --version
db version v3.2.8
git version: ed70e33130c977bda0024c125b56d159573dbaf0
OpenSSL version: OpenSSL 1.0.2h  3 May 2016
allocator: system
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64

When I use a mongorestore:

mongorestore --drop --db mydatabase /path/to/mongodump

The import starts but it crashes 90% of time:

fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x697d5fa61ae3 pc=0x40d9e00]

goroutine 46 [running]:
runtime.throw(0x4683ea0, 0x2a)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:547 +0x90 fp=0xc822235790 sp=0xc822235778
runtime.sigpanic()
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/sigpanic_unix.go:12 +0x5a fp=0xc8222357e0 sp=0xc822235790
sync.(*Pool).Get(0x4c00390, 0x0, 0x0)
    /usr/local/Cellar/go/1.6.2/libexec/src/sync/pool.go:102 +0x40 fp=0xc822235830 sp=0xc8222357e0
fmt.newPrinter(0x10)
    /usr/local/Cellar/go/1.6.2/libexec/src/fmt/print.go:133 +0x27 fp=0xc822235870 sp=0xc822235830
fmt.Fprintf(0x55043f8, 0xc820026018, 0x45cda88, 0x6, 0xc822235968, 0x2, 0x2, 0xc82007e3f0, 0x0, 0x0)
    /usr/local/Cellar/go/1.6.2/libexec/src/fmt/print.go:187 +0x30 fp=0xc8222358b8 sp=0xc822235870
github.com/mongodb/mongo-tools/common/log.(*ToolLogger).log(0xc8200145a0, 0xc82007e3f0, 0x8a)
    /private/tmp/mongodb-20160713-59015-85tgmi/mongodb-src-r3.2.8/src/github.com/mongodb/mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/log/tool_logger.go:84 +0x20e fp=0xc822235990 sp=0xc8222358b8

... (real log is very long)

Is it specific to my OS ?

Thanks.

like image 340
Julien Malige Avatar asked Sep 27 '16 08:09

Julien Malige


1 Answers

I can confirm that it is definitely something with the OS as I have updated and am running into this same exact issue as well. I am currently digging into it, if I find anything I will let you know!

UPDATE:

After doing some investigating it seems that it has to do with the Go dependency that MongoDB uses. Currently MongoDB is using v1.4.2. Turns out that there are problems with older versions of Go on macOS Sierra. https://github.com/golang/go/issues/16570 explains that the issue is resolved with v1.7. Unless there is a way that you can have MongoDB point to Go v1.7 I am not sure if this will be resolved until MongoDB upgrades their dependencies.

UPDATE 2: I was planning to file a bug with MongoDB relating to the issue until I stumbled onto this... https://jira.mongodb.org/browse/TOOLS-1450. It seems that MongoDB 3.2.10 will use Go v1.7 and should fix the issues that you and I are seeing.

like image 158
jarrodthibodeau Avatar answered Sep 19 '22 13:09

jarrodthibodeau