Invariant failure !driverName.empty() && !driverVersion.empty() ...

135 views
Skip to first unread message

Christopher Baines

unread,
Aug 23, 2017, 6:12:51 PM8/23/17
to mongod...@googlegroups.com
Hey,

I'm having a problem with the mongo command, I've included the details
[1] below. looking at the source code for this I think it's the OS name
that is empty, as it can't open any of the files listed in the source
code [2].

Any ideas on working around this? Also, does anyone know why this
information is being collected, and what is done with it?

Thanks,

Chris


1:

→ mongo localhost:57017
MongoDB shell version v3.4.4
connecting to: localhost:57017
2017-08-23T09:07:03.105+0100 I - [thread1] Invariant failure !driverName.empty() && !driverVersion.empty() && !osType.empty() && !osName.empty() && !osArchitecture.empty() && !osVersion.empty() src/mongo/rpc/metadata/client_metadata.cpp 350
2017-08-23T09:07:03.105+0100 I - [thread1]

***aborting after invariant() failure


2017-08-23T09:07:03.112+0100 F - [thread1] Got signal: 6 (Aborted).

0xd64e7afa41 0xd64e7aeb59 0xd64e7af03d 0x7f86db6fca80 0x7f86db37f2c4 0x7f86db38072a 0xd64e448c8a 0xd64e6764bd 0xd64e676810 0xd64e4ebdf1 0xd64e4ec6f5 0xd64e4dd86d 0xd64e51c041 0xd64e6c9032 0xd64e6bc003 0xd64ede08ff 0xd64eddc5da 0xd64ede0303 0xd64ede6dff 0xd64ede6f81 0xd64ec8f32a 0xd64ec8f3d0 0xd64e6b7581 0xd64e7180bd 0xd64e6ba458 0xd64e6e69f2 0xd64e69bd0c 0x7f86dbee84a0 0x7f86db6f2454 0x7f86db4347bf
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"D64DFC2000","o":"7EDA41","s":"_ZN5mongo15printStackTraceERSo"},{"b":"D64DFC2000","o":"7ECB59"},{"b":"D64DFC2000","o":"7ED03D"},{"b":"7F86DB6EB000","o":"11A80"},{"b":"7F86DB34C000","o":"332C4","s":"gsignal"},{"b":"7F86DB34C000","o":"3472A","s":"abort"},{"b":"D64DFC2000","o":"486C8A","s":"_ZN5mongo17invariantOKFailedEPKcRKNS_6StatusES1_j"},{"b":"D64DFC2000","o":"6B44BD","s":"_ZN5mongo14ClientMetadata16serializePrivateENS_10StringDataES1_S1_S1_S1_S1_S1_PNS_14BSONObjBuilderE"},{"b":"D64DFC2000","o":"6B4810","s":"_ZN5mongo14ClientMetadata9serializeENS_10StringDataES1_S1_PNS_14BSONObjBuilderE"},{"b":"D64DFC2000","o":"529DF1","s":"_ZN5mongo18DBClientConnection7connectERKNS_11HostAndPortENS_10StringDataE"},{"b":"D64DFC2000","o":"52A6F5","s":"_ZN5mongo18DBClientConnection7connectERKNS_11HostAndPortENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},{"b":"D64DFC2000","o":"51B86D","s":"_ZNK5mongo16ConnectionString7connectENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdPKNS_8MongoURIE"},{"b":"D64DFC2000","o":"55A041","s":"_ZNK5mongo8MongoURI7connectENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5boost8optionalIdEE"},{"b":"D64DFC2000","o":"707032","s":"_ZN5mongo5mozjs17MongoExternalInfo9constructEP9JSContextN2JS8CallArgsE"},{"b":"D64DFC2000","o":"6FA003","s":"_ZN5mongo5mozjs7smUtils9constructINS0_17MongoExternalInfoEEEbP9JSContextjPN2JS5ValueE"},{"b":"D64DFC2000","o":"E1E8FF"},{"b":"D64DFC2000","o":"E1A5DA"},{"b":"D64DFC2000","o":"E1E303","s":"_ZN2js9RunScriptEP9JSContextRNS_8RunStateE"},{"b":"D64DFC2000","o":"E24DFF","s":"_ZN2js13ExecuteKernelEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectRKNS2_5ValueENS_11ExecuteTypeENS_16AbstractFramePtrEPS9_"},{"b":"D64DFC2000","o":"E24F81","s":"_ZN2js7ExecuteEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectPNS2_5ValueE"},{"b":"D64DFC2000","o":"CCD32A"},{"b":"D64DFC2000","o":"CCD3D0","s":"_Z16JS_ExecuteScriptP9JSContextN2JS6HandleIP8JSScriptEENS1_13MutableHandleINS1_5ValueEEE"},{"b":"D64DFC2000","o":"6F5581","s":"_ZN5mongo5mozjs14MozJSImplScope4execENS_10StringDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbbbi"},{"b":"D64DFC2000","o":"7560BD","s":"_ZN5mongo11shell_utils9initScopeERNS_5ScopeE"},{"b":"D64DFC2000","o":"6F8458","s":"_ZN5mongo5mozjs14MozJSImplScopeC1EPNS0_17MozJSScriptEngineE"},{"b":"D64DFC2000","o":"7249F2","s":"_ZN5mongo5mozjs15MozJSProxyScope10implThreadEPv"},{"b":"D64DFC2000","o":"6D9D0C","s":"_ZN4nspr6Thread13ThreadRoutineEPv"},{"b":"7F86DBE32000","o":"B64A0"},{"b":"7F86DB6EB000","o":"7454"},{"b":"7F86DB34C000","o":"E87BF","s":"clone"}],"processInfo":{ "mongodbVersion" : "3.4.4", "gitVersion" : "nogitversion", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "4.9.44-gnu", "version" : "#1 SMP 1", "machine" : "x86_64" }, "somap" : [ { "b" : "D64DFC2000", "elfType" : 3, "buildId" : "64938EB328B5F2600C09750DAEB910E82DB2DC10" }, { "b" : "7FFD82BCA000", "path" : "linux-vdso.so.1", "elfType" : 3, "buildId" : "883DD2FCEED79AD31D8B0B74D24FDBCDFBE6CE33" }, { "b" : "7F86DC3B0000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/librt.so.1", "elfType" : 3 }, { "b" : "7F86DC1AC000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libdl.so.2", "elfType" : 3 }, { "b" : "7F86DBE32000", "path" : "/gnu/store/dhc2iy059hi91fk55dcv79z09kp6500y-gcc-5.4.0-lib/lib/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F86DBB20000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libm.so.6", "elfType" : 3 }, { "b" : "7F86DB909000", "path" : "/gnu/store/dhc2iy059hi91fk55dcv79z09kp6500y-gcc-5.4.0-lib/lib/libgcc_s.so.1", "elfType" : 3 }, { "b" : "7F86DB6EB000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libpthread.so.0", "elfType" : 3 }, { "b" : "7F86DB34C000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libc.so.6", "elfType" : 3 }, { "b" : "7F86DC5B8000", "path" : "/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
mongo(_ZN5mongo15printStackTraceERSo+0x41) [0xd64e7afa41]
mongo(+0x7ECB59) [0xd64e7aeb59]
mongo(+0x7ED03D) [0xd64e7af03d]
libpthread.so.0(+0x11A80) [0x7f86db6fca80]
libc.so.6(gsignal+0x104) [0x7f86db37f2c4]
libc.so.6(abort+0x16A) [0x7f86db38072a]
mongo(_ZN5mongo17invariantOKFailedEPKcRKNS_6StatusES1_j+0x0) [0xd64e448c8a]
mongo(_ZN5mongo14ClientMetadata16serializePrivateENS_10StringDataES1_S1_S1_S1_S1_S1_PNS_14BSONObjBuilderE+0x22AD) [0xd64e6764bd]
mongo(_ZN5mongo14ClientMetadata9serializeENS_10StringDataES1_S1_PNS_14BSONObjBuilderE+0xA0) [0xd64e676810]
mongo(_ZN5mongo18DBClientConnection7connectERKNS_11HostAndPortENS_10StringDataE+0x2F1) [0xd64e4ebdf1]
mongo(_ZN5mongo18DBClientConnection7connectERKNS_11HostAndPortENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x35) [0xd64e4ec6f5]
mongo(_ZNK5mongo16ConnectionString7connectENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdPKNS_8MongoURIE+0xBBD) [0xd64e4dd86d]
mongo(_ZNK5mongo8MongoURI7connectENS_10StringDataERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5boost8optionalIdEE+0xC1) [0xd64e51c041]
mongo(_ZN5mongo5mozjs17MongoExternalInfo9constructEP9JSContextN2JS8CallArgsE+0x6A2) [0xd64e6c9032]
mongo(_ZN5mongo5mozjs7smUtils9constructINS0_17MongoExternalInfoEEEbP9JSContextjPN2JS5ValueE+0x33) [0xd64e6bc003]
mongo(+0xE1E8FF) [0xd64ede08ff]
mongo(+0xE1A5DA) [0xd64eddc5da]
mongo(_ZN2js9RunScriptEP9JSContextRNS_8RunStateE+0x113) [0xd64ede0303]
mongo(_ZN2js13ExecuteKernelEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectRKNS2_5ValueENS_11ExecuteTypeENS_16AbstractFramePtrEPS9_+0xCF) [0xd64ede6dff]
mongo(_ZN2js7ExecuteEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectPNS2_5ValueE+0xB1) [0xd64ede6f81]
mongo(+0xCCD32A) [0xd64ec8f32a]
mongo(_Z16JS_ExecuteScriptP9JSContextN2JS6HandleIP8JSScriptEENS1_13MutableHandleINS1_5ValueEEE+0x60) [0xd64ec8f3d0]
mongo(_ZN5mongo5mozjs14MozJSImplScope4execENS_10StringDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbbbi+0x181) [0xd64e6b7581]
mongo(_ZN5mongo11shell_utils9initScopeERNS_5ScopeE+0x4BD) [0xd64e7180bd]
mongo(_ZN5mongo5mozjs14MozJSImplScopeC1EPNS0_17MozJSScriptEngineE+0x1968) [0xd64e6ba458]
mongo(_ZN5mongo5mozjs15MozJSProxyScope10implThreadEPv+0x92) [0xd64e6e69f2]
mongo(_ZN4nspr6Thread13ThreadRoutineEPv+0x1C) [0xd64e69bd0c]
libstdc++.so.6(+0xB64A0) [0x7f86dbee84a0]
libpthread.so.0(+0x7454) [0x7f86db6f2454]
libc.so.6(clone+0x3F) [0x7f86db4347bf]
----- END BACKTRACE -----
Aborted


2:

stat("/etc/lsb-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/system-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/redhat-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/gentoo-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/novell-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/gentoo-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/SuSE-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/SUSE-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/sles-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/debian_release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/slackware-version", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/centos-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)
stat("/etc/os-release", 0x7fffa09702d0) = -1 ENOENT (No such file or directory)


Andrew Morrow

unread,
Aug 24, 2017, 9:41:48 AM8/24/17
to mongod...@googlegroups.com

Hi -

Thanks for letting us know that you are experiencing this crash.

On Wed, Aug 23, 2017 at 4:20 AM, Christopher Baines <ma...@cbaines.net> wrote:
Hey,

I'm having a problem with the mongo command, I've included the details
[1] below. looking at the source code for this I think it's the OS name
that is empty, as it can't open any of the files listed in the source
code [2].

That seems plausible. Since you seem comfortable running strace, I think you could confirm your hypothesis by running under GDB and printing the values for the various values. If you confirm that it is in fact he OS value that is missing (or some other one), I'd suggest filing a ticket in the SERVER project describing your findings, since I would consider this a bug.

I think it would also be valuable to include information on what OS you are running.

 

Any ideas on working around this?

Well, you could, temporarily, as a workaround, create one of those files and populate it with something, but I realize that may not be very satisfactory.

 
Also, does anyone know why this
information is being collected, and what is done with it?

This is a new feature in MongoDB 3.4 and associated drivers.

Information about the local system is collected by the shell (and other drivers) and sent to the server on connection establishment. The server logs that information, and also makes some of it programmatically available via the currentOp command, and I think also for slow queries.

As an example, if you look in your database logs, for each connection established to the server you should see lines that look like:
2017-08-24T04:10:59.461+0000 d20761| 2017-08-24T04:10:59.460+0000 I NETWORK  [conn4] received client metadata from www.xxx.yyy.zzz:NNNNN conn: { driver: { name: "Something", version: "x.y.z" }, os: { type: "Linux", name: "Red Hat Enterprise Linux Server release 6.2 (Santiago)", architecture: "x86_64", version: "Kernel 2.6.32-220.el6.x86_64" } }

Documentation is available:

You can read the client side specification here:


You may find the motivation section of that specification useful:


This information is diagnostic only, and is scoped to your database instance, so you control if/how it is used.

Please let me know if I can provide any more information.

Thanks,
Andrew



 


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/20170823092001.025cd80a%40cbaines.net.
For more options, visit https://groups.google.com/d/optout.

Christopher Baines

unread,
Sep 15, 2017, 1:19:12 PM9/15/17
to 'Andrew Morrow' via mongodb-user
On Thu, 24 Aug 2017 09:41:19 -0400
"'Andrew Morrow' via mongodb-user" <mongod...@googlegroups.com>
wrote:

> Hi -
>
> Thanks for letting us know that you are experiencing this crash.
>
> On Wed, Aug 23, 2017 at 4:20 AM, Christopher Baines <ma...@cbaines.net>
> wrote:
>
> > Hey,
> >
> > I'm having a problem with the mongo command, I've included the
> > details [1] below. looking at the source code for this I think it's
> > the OS name that is empty, as it can't open any of the files listed
> > in the source code [2].
> >
>
> That seems plausible. Since you seem comfortable running strace, I
> think you could confirm your hypothesis by running under GDB and
> printing the values for the various values. If you confirm that it is
> in fact he OS value that is missing (or some other one), I'd suggest
> filing a ticket in the SERVER project
> <https://jira.mongodb.org/projects/SERVER> describing your findings,
Thanks for your prompt response Andrew and all the information you've
provided, I've now got around to looking at this again, and creating a
ticket [1].

https://jira.mongodb.org/browse/SERVER-31105

Andrew Morrow

unread,
Sep 16, 2017, 6:13:15 PM9/16/17
to mongod...@googlegroups.com

Hi -

Thanks for filing that ticket. We ended up closing is a duplicate, because between when you posted first here and when you filed the ticket, someone else encountered the same issue. I recommend watching https://jira.mongodb.org/browse/SERVER-30857 for a fix (one is already in code review for master, and we will backport this to an upcoming 3.4 release).

Thanks,
Andrew


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.

Christopher Baines

unread,
Sep 18, 2017, 2:58:06 AM9/18/17
to 'Andrew Morrow' via mongodb-user
On Sat, 16 Sep 2017 18:12:47 -0400
"'Andrew Morrow' via mongodb-user" <mongod...@googlegroups.com>
wrote:

> Thanks for filing that ticket. We ended up closing is a duplicate,
> because between when you posted first here and when you filed the
> ticket, someone else encountered the same issue. I recommend watching
> https://jira.mongodb.org/browse/SERVER-30857 for a fix (one is
> already in code review for master, and we will backport this to an
> upcoming 3.4 release).

Sounds good, thanks Andrew :)
Reply all
Reply to author
Forward
0 new messages