[SERVER-17511] gcc5 s2 lib error Created: 09/Mar/15  Updated: 06/Dec/22  Resolved: 31/May/22

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.0.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Marek Skalický Assignee: Backlog - Build Team (Inactive)
Resolution: Done Votes: 0
Labels: build-jbr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Operating System: ALL
Steps To Reproduce:

On 32bit x86 machine (i686) build mongodb with gcc5 (-std=gnu11 enabled)
scons all \
--use-system-all \
--variant-dir=build \
--wiredtiger=off \
--nostrip \
--ssl \
--disable-warnings-as-errors

Participants:

 Description   

Hi,
I am trying to compile mongodb with gcc5. It build fine, but tests are failing.

There is problem with bundled s2 library on x86 system (i686). So it relate geo* staff.

For example utit test:

./build/linux2/ssl/use-system-all/wiredtiger_off/mongo/db/query/canonical_query_test
2015-03-05T08:28:05.943+0000 I -        going to run suite: CanonicalQueryTest
2015-03-05T08:28:05.943+0000 I -        	 going to run test: IsValidText
2015-03-05T08:28:05.947+0000 I -        	 going to run test: IsValidGeo
2015-03-05T08:28:05.948+0000 I -        	 going to run test: IsValidTextAndGeo
2015-03-05T08:28:05.949+0000 I -        	 going to run test: IsValidTextAndNaturalAscending
2015-03-05T08:28:05.949+0000 I -        	 going to run test: IsValidTextAndNaturalDescending
2015-03-05T08:28:05.949+0000 I -        	 going to run test: IsValidTextAndHint
2015-03-05T08:28:05.949+0000 I -        	 going to run test: IsValidGeoNearNaturalSort
2015-03-05T08:28:05.950+0000 I -        	 going to run test: IsValidGeoNearNaturalHint
2015-03-05T08:28:05.950+0000 I -        	 going to run test: IsValidTextAndSnapshot
2015-03-05T08:28:05.950+0000 I -        	 going to run test: RewriteNoDoubleOr
2015-03-05T08:28:05.950+0000 I -        	 going to run test: RewriteSingleOr
2015-03-05T08:28:05.950+0000 I -        	 going to run test: NormalizeQuerySort
2015-03-05T08:28:05.950+0000 I -        	 going to run test: NormalizeQueryTree
2015-03-05T08:28:05.951+0000 I -        	 DONE running tests
2015-03-05T08:28:05.951+0000 I -        going to run suite: PlanCacheTest
2015-03-05T08:28:05.951+0000 I -        	 going to run test: GetPlanCacheKey
2015-03-05T08:28:05.951+0000 I -        	 going to run test: GetPlanCacheKeyEscaped
2015-03-05T08:28:05.951+0000 I -        	 going to run test: GetPlanCacheKeyGeoWithin
2015-03-05T08:28:05.958+0000 I CONTROL  
 0xf7670919 0xf763aab1 0xf7683e06 0xf76a8fbe 0xf76aef3e 0xf76b5659 0xf76b6917 0xf76b6cd5 0xf76b6dda 0xf7535216 0xf7536878 0xf752d7be 0xf752eaa2 0xf756d6f5 0xf756da08 0xf758497d 0xf7583157 0xf757f028 0xf7580370 0xf7580d91 0xf7596fa4 0xf7597561 0xf749b8c5 0xf74a485e 0xf761cb5d 0xf749b489 0xf74a6ea9 0xf761ff88 0xf762262c 0xf7497840 0xf6b77797 0xf749a4ab
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"F740E000","o":"262919"},{"b":"F740E000","o":"22CAB1"},{"b":"F740E000","o":"275E06"},{"b":"F740E000","o":"29AFBE"},{"b":"F740E000","o":"2A0F3E"},{"b":"F740E000","o":"2A7659"},{"b":"F740E000","o":"2A8917"},{"b":"F740E000","o":"2A8CD5"},{"b":"F740E000","o":"2A8DDA"},{"b":"F740E000","o":"127216"},{"b":"F740E000","o":"128878"},{"b":"F740E000","o":"11F7BE"},{"b":"F740E000","o":"120AA2"},{"b":"F740E000","o":"15F6F5"},{"b":"F740E000","o":"15FA08"},{"b":"F740E000","o":"17697D"},{"b":"F740E000","o":"175157"},{"b":"F740E000","o":"171028"},{"b":"F740E000","o":"172370"},{"b":"F740E000","o":"172D91"},{"b":"F740E000","o":"188FA4"},{"b":"F740E000","o":"189561"},{"b":"F740E000","o":"8D8C5"},{"b":"F740E000","o":"9685E"},{"b":"F740E000","o":"20EB5D"},{"b":"F740E000","o":"8D489"},{"b":"F740E000","o":"98EA9"},{"b":"F740E000","o":"211F88"},{"b":"F740E000","o":"21462C"},{"b":"F740E000","o":"89840"},{"b":"F6B5F000","o":"18797"},{"b":"F740E000","o":"8C4AB"}],"processInfo":{ "mongodbVersion" : "3.0.0", "gitVersion" : "nogitversion", "uname" : { "sysname" : "Linux", "release" : "3.18.5-201.fc21.x86_64", "version" : "#1 SMP Mon Feb 2 21:00:58 UTC 2015", "machine" : "i686" }, "somap" : [ { "b" : "F740E000", "elfType" : 3, "buildId" : "A06CEDF3724C5A3B6D9BAF0F12768E1330A5A787" }, { "b" : "F73E7000", "path" : "linux-gate.so.1", "elfType" : 3, "buildId" : "20E597ED0059ED35B90FA3D12AEC41933D5A55D5" }, { "b" : "F7374000", "path" : "/lib/libtcmalloc.so.4", "elfType" : 3, "buildId" : "06F604FC695C582A24D128F07F5912B81269E410" }, { "b" : "F72F1000", "path" : "/lib/libyaml-cpp.so.0.5", "elfType" : 3, "buildId" : "EC2D0F033344983E7B0E7FC598B532D469B300AD" }, { "b" : "F727F000", "path" : "/lib/libpcre.so.1", "elfType" : 3, "buildId" : "33451CD8F911183F9463C95C608CBD1E7C5A40DA" }, { "b" : "F7274000", "path" : "/lib/libpcrecpp.so.0", "elfType" : 3, "buildId" : "25A632EAD5E7DCFC923381FEDCB5C2BAE3D52F86" }, { "b" : "F7205000", "path" : "/lib/libboost_program_options.so.1.57.0", "elfType" : 3, "buildId" : "0E52BBB4AFBA8DAB506A24742B51277AF6CA7EFF" }, { "b" : "F71EF000", "path" : "/lib/libboost_filesystem.so.1.57.0", "elfType" : 3, "buildId" : "F8271106A21B816B91D10ABF88803780C1266017" }, { "b" : "F71CB000", "path" : "/lib/libboost_thread.so.1.57.0", "elfType" : 3, "buildId" : "C6551F2AF022A75DC4D3755B4F26617FBB497BE3" }, { "b" : "F71C6000", "path" : "/lib/libboost_system.so.1.57.0", "elfType" : 3, "buildId" : "19876339BB27B2D0282D87F5DF1D276846F7B89A" }, { "b" : "F7188000", "path" : "/lib/libstemmer.so.0", "elfType" : 3, "buildId" : "0F2E7482A60C526D50AFE8B4C6ED48C6D7AA54C8" }, { "b" : "F711C000", "path" : "/lib/libssl.so.10", "elfType" : 3, "buildId" : "707C798B835A5D16FE246B4598EE61CDE0D59724" }, { "b" : "F6F46000", "path" : "/lib/libcrypto.so.10", "elfType" : 3, "buildId" : "50D488D8DB357A67AED1C59B151F74E8249429CB" }, { "b" : "F6F3D000", "path" : "/lib/librt.so.1", "elfType" : 3, "buildId" : "F2B9BFF313D784FC188CC2FF27751E546841C472" }, { "b" : "F6F38000", "path" : "/lib/libdl.so.2", "elfType" : 3, "buildId" : "E1F5B879ED170A3B75E41BF79BA23466EE1332CB" }, { "b" : "F6DC1000", "path" : "/lib/libstdc++.so.6", "elfType" : 3, "buildId" : "8102E4ECC85388238AF2CDFD38F5F6A7951D9030" }, { "b" : "F6D72000", "path" : "/lib/libm.so.6", "elfType" : 3, "buildId" : "0A497E0AC0F4161CA848120695FC9CD07685CBE7" }, { "b" : "F6D53000", "path" : "/lib/libgcc_s.so.1", "elfType" : 3, "buildId" : "28642F7138253D2258675FAA2AB61C55632AB9CD" }, { "b" : "F6D36000", "path" : "/lib/libpthread.so.0", "elfType" : 3, "buildId" : "EE0CBF308EDDB25DAF101D94170B31B1C01E8779" }, { "b" : "F6B5F000", "path" : "/lib/libc.so.6", "elfType" : 3, "buildId" : "33217031AC3355C4C614CF94202647C5C807ED0A" }, { "b" : "F6B4A000", "path" : "/lib/libunwind.so.8", "elfType" : 3, "buildId" : "AA14A9EE8B6A78772045024058A29285E7E03DBE" }, { "b" : "F73E8000", "path" : "/lib/ld-linux.so.2", "elfType" : 3, "buildId" : "16FFC39F694222373A3EAC28460041F2EAB0DCC1" }, { "b" : "F6AFD000", "path" : "/lib/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "4CB71B2CD915624CD20DA31C125F9007FEF85272" }, { "b" : "F6A26000", "path" : "/lib/libkrb5.so.3", "elfType" : 3, "buildId" : "63B0B6A145E0B70E1DD1671EFA9AB498C49FF6DE" }, { "b" : "F6A21000", "path" : "/lib/libcom_err.so.2", "elfType" : 3, "buildId" : "980961E8F64AA412B3A2D3802507D0A4F442DA3F" }, { "b" : "F69ED000", "path" : "/lib/libk5crypto.so.3", "elfType" : 3, "buildId" : "D14D29C5E67FCA7060ECBF79418155A25BE5E163" }, { "b" : "F69D1000", "path" : "/lib/libresolv.so.2", "elfType" : 3, "buildId" : "D53D3ED980E666E89A3D1978C464083EBC211F4A" }, { "b" : "F69B9000", "path" : "/lib/libz.so.1", "elfType" : 3, "buildId" : "61BD9738D3A26D072C40A50439A08A4B7DE9FCB1" }, { "b" : "F69A9000", "path" : "/lib/libkrb5support.so.0", "elfType" : 3, "buildId" : "6C5BBACFE4F91EEB9CFD8F6907AC14084EB66427" }, { "b" : "F69A4000", "path" : "/lib/libkeyutils.so.1", "elfType" : 3, "buildId" : "D72A0BB73DDF9B5A7B661A457A99FFED4C6E83D2" }, { "b" : "F697F000", "path" : "/lib/libselinux.so.1", "elfType" : 3, "buildId" : "DD60B8B038B7A8A3B438C5B2ADA6292E611649A0" }, { "b" : "F6954000", "path" : "/lib/liblzma.so.5", "elfType" : 3, "buildId" : "15366A2089431339D7722BA1FC96A0501986732A" } ] }}
 canonical_query_test(_ZN5mongo15printStackTraceERSo+0x39) [0xf7670919]
 canonical_query_test(_ZN5mongo10logContextEPKc+0xF1) [0xf763aab1]
 canonical_query_test(_ZN17LogMessageWarningD1Ev+0x26) [0xf7683e06]
 canonical_query_test(_ZN8S2LatLngC2ERK7Vector3IdE+0xDE) [0xf76a8fbe]
 canonical_query_test(_ZNK12S2LatLngRect8ContainsERK7Vector3IdE+0x2E) [0xf76aef3e]
 canonical_query_test(_ZNK6S2Loop8ContainsERK7Vector3IdE+0x39) [0xf76b5659]
 canonical_query_test(_ZN6S2Loop9InitBoundEv+0x247) [0xf76b6917]
 canonical_query_test(_ZN6S2Loop4InitERKSt6vectorI7Vector3IdESaIS2_EE+0x195) [0xf76b6cd5]
 canonical_query_test(_ZN6S2LoopC2ERKSt6vectorI7Vector3IdESaIS2_EE+0xDA) [0xf76b6dda]
 canonical_query_test(+0x127216) [0xf7535216]
 canonical_query_test(_ZN5mongo9GeoParser19parseGeoJSONPolygonERKNS_7BSONObjEPNS_14PolygonWithCRSE+0x378) [0xf7536878]
 canonical_query_test(_ZN5mongo17GeometryContainer16parseFromGeoJSONERKNS_7BSONObjE+0xBAE) [0xf752d7be]
 canonical_query_test(_ZN5mongo17GeometryContainer14parseFromQueryERKNS_11BSONElementE+0x702) [0xf752eaa2]
 canonical_query_test(_ZN5mongo13GeoExpression10parseQueryERKNS_7BSONObjE+0x715) [0xf756d6f5]
 canonical_query_test(_ZN5mongo13GeoExpression9parseFromERKNS_7BSONObjE+0x38) [0xf756da08]
 canonical_query_test(_ZN5mongo31expressionParserGeoCallbackRealEPKciRKNS_7BSONObjE+0x26D) [0xf758497d]
 canonical_query_test(_ZN5boost6detail8function17function_invoker3IPFN5mongo10StatusWithIPNS3_15MatchExpressionEEEPKciRKNS3_7BSONObjEES7_S9_iSC_E6invokeERNS1_15function_bufferES9_iSC_+0x27) [0xf7583157]
 canonical_query_test(_ZN5mongo21MatchExpressionParser14_parseSubFieldERKNS_7BSONObjEPKNS_18AndMatchExpressionEPKcRKNS_11BSONElementEi+0x178) [0xf757f028]
 canonical_query_test(_ZN5mongo21MatchExpressionParser9_parseSubEPKcRKNS_7BSONObjEPNS_18AndMatchExpressionEi+0x150) [0xf7580370]
 canonical_query_test(_ZN5mongo21MatchExpressionParser6_parseERKNS_7BSONObjEi+0x4F1) [0xf7580d91]
 canonical_query_test(_ZN5mongo14CanonicalQuery12canonicalizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjESB_SB_xxSB_SB_SB_bbPPS0_RKNS_21MatchExpressionParser13WhereCallbackE+0xE4) [0xf7596fa4]
 canonical_query_test(_ZN5mongo14CanonicalQuery12canonicalizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjEPPS0_RKNS_21MatchExpressionParser13WhereCallbackE+0x71) [0xf7597561]
 canonical_query_test(+0x8D8C5) [0xf749b8c5]
 canonical_query_test(+0x9685E) [0xf74a485e]
 canonical_query_test(_ZN5mongo8unittest4Test3runEv+0x2D) [0xf761cb5d]
 canonical_query_test(+0x8D489) [0xf749b489]
 canonical_query_test(_ZN5boost6detail8function22void_function_invoker0IPFvvEvE6invokeERNS1_15function_bufferE+0x9) [0xf74a6ea9]
 canonical_query_test(_ZN5mongo8unittest5Suite3runERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi+0x858) [0xf761ff88]
 canonical_query_test(_ZN5mongo8unittest5Suite3runERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKS8_i+0x88C) [0xf762262c]
 canonical_query_test(main+0x80) [0xf7497840]
 libc.so.6(__libc_start_main+0xF7) [0xf6b77797]
 canonical_query_test(+0x8C4AB) [0xf749a4ab]
-----  END BACKTRACE  -----
2015-03-05T08:28:05.958+0000 W GEO      src/third_party/s2/s2latlng.cc:34:  Check failed: is_valid()
2015-03-05T08:28:05.960+0000 I CONTROL  
 0xf7670919 0xf763aab1 0xf7683e06 0xf76a8fbe 0xf76aef3e 0xf76b5659 0xf76b6a69 0xf76b6cd5 0xf76b6dda 0xf7535216 0xf7536878 0xf752d7be 0xf752eaa2 0xf756d6f5 0xf756da08 0xf758497d 0xf7583157 0xf757f028 0xf7580370 0xf7580d91 0xf7596fa4 0xf7597561 0xf749b8c5 0xf74a485e 0xf761cb5d 0xf749b489 0xf74a6ea9 0xf761ff88 0xf762262c 0xf7497840 0xf6b77797 0xf749a4ab
...

also some jstests fails (for example jstests/core/geo_allowedcompariosons.js)

 *******************************************
         Test : geo_allowedcomparisons.js ...
      Command : /builddir/build/BUILDROOT/mongodb-3.0.0-1.fc23.i386/usr/bin/mongo --port 27999 --writeMode commands /builddir/build/BUILD/mongodb-src-r3.0.0/jstests/core/geo_allowedcomparisons.js --eval TestData = new Object();TestData.storageEngine = "";TestData.wiredTigerEngineConfigString = "";TestData.wiredTigerCollectionConfigString = "";TestData.wiredTigerIndexConfigString = "";TestData.testPath = "/builddir/build/BUILD/mongodb-src-r3.0.0/jstests/core/geo_allowedcomparisons.js";TestData.testFile = "geo_allowedcomparisons.js";TestData.testName = "geo_allowedcomparisons";TestData.setParameters = "";TestData.setParametersMongos = "";TestData.noJournal = false;TestData.noJournalPrealloc = true;TestData.auth = false;TestData.keyFile = null;TestData.keyFileData = null;TestData.authMechanism = "SCRAM-SHA-1";TestData.useSSL = false;TestData.useX509 = false;MongoRunner.dataDir = "/builddir/build/BUILD/mongodb-src-r3.0.0/var/data/db";MongoRunner.dataPath = MongoRunner.dataDir + "/";
         Date : Thu Mar  5 08:32:26 2015
2015-03-05T08:32:26.849+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:34292 #16 (1 connection now open)
2015-03-05T08:32:26.850+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:34293 #17 (2 connections now open)
2015-03-05T08:32:26.850+0000 I NETWORK  [conn16] end connection 127.0.0.1:34292 (1 connection now open)
2015-03-05T08:32:26.850+0000 I NETWORK  [conn17] end connection 127.0.0.1:34293 (0 connections now open)
MongoDB shell version: 3.0.0
connecting to: 127.0.0.1:27999/test
2015-03-05T08:32:26.907+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:34294 #18 (1 connection now open)
/builddir/build/BUILD/mongodb-src-r3.0.0/var/data/db/
2015-03-05T08:32:26.909+0000 I COMMAND  [conn18] CMD: drop test.geo_allowedcomparisons
2015-03-05T08:32:26.912+0000 I INDEX    [conn18] build index on: test.geo_allowedcomparisons properties: { v: 1, key: { geo: "2d" }, name: "geo_2d", ns: "test.geo_allowedcomparisons" }
2015-03-05T08:32:26.912+0000 I INDEX    [conn18] 	 building index using bulk method
2015-03-05T08:32:26.912+0000 I INDEX    [conn18] build index done.  scanned 0 total records. 0 secs
2015-03-05T08:32:26.931+0000 I QUERY    [conn18] assertion 17287 Can't canonicalize query: BadValue Point must be an array or object ns:test.geo_allowedcomparisons query:{ geo: { $geoWithin: { $polygon: { type: "Polygon", coordinates: [ [ [ -5.0, -5.0 ], [ -5.0, 5.0 ], [ 5.0, 5.0 ], [ 5.0, -5.0 ], [ -5.0, -5.0 ] ] ] } } } }
2015-03-05T08:32:26.933+0000 I QUERY    [conn18] assertion 17287 Can't canonicalize query: BadValue Point must only contain numeric elements ns:test.geo_allowedcomparisons query:{ geo: { $geoWithin: { $geometry: [ [ -5.0, -5.0 ], [ -5.0, 5.0 ], [ 5.0, 5.0 ], [ 5.0, -5.0 ], [ -5.0, -5.0 ] ] } } }
2015-03-05T08:32:26.934+0000 I QUERY    [conn18] assertion 17287 Can't canonicalize query: BadValue Point must only contain numeric elements ns:test.geo_allowedcomparisons query:{ geo: { $geoWithin: { $geometry: [ [ -5.0, -5.0 ], [ 5.0, 5.0 ] ] } } }
2015-03-05T08:32:26.934+0000 I QUERY    [conn18] assertion 17287 Can't canonicalize query: BadValue Point must only contain numeric elements ns:test.geo_allowedcomparisons query:{ geo: { $geoWithin: { $geometry: [ [ 0.0, 0.0 ], 1.0 ] } } }
2015-03-05T08:32:26.934+0000 I QUERY    [conn18] assertion 17287 Can't canonicalize query: BadValue Point must only contain numeric elements ns:test.geo_allowedcomparisons query:{ geo: { $geoWithin: { $geometry: [ [ 0.0, 0.0 ], 0.0174532925199433 ] } } }
2015-03-05T08:32:26.943+0000 I CONTROL  [conn18] 
 0xf749d3d9 0xf74213c1 0xf74b4a86 0xf74d9c3e 0xf74dfbbe 0xf74e62d9 0xf74e7597 0xf74e7955 0xf74e7a5a 0xf6dfe406 0xf6dffa68 0xf6df6e5e 0xf6df8142 0xf6e808d5 0xf6e80be8 0xf6e9652d 0xf6e94e37 0xf6e90d28 0xf6e92070 0xf6e92a91 0xf6f81d08 0xf6f82215 0xf6f940d2 0xf6e60bd2 0xf6a74c0a 0xf743dd78 0xf5bed420 0xf5b0d10e
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"F680D000","o":"C903D9"},{"b":"F680D000","o":"C143C1"},{"b":"F680D000","o":"CA7A86"},{"b":"F680D000","o":"CCCC3E"},{"b":"F680D000","o":"CD2BBE"},{"b":"F680D000","o":"CD92D9"},{"b":"F680D000","o":"CDA597"},{"b":"F680D000","o":"CDA955"},{"b":"F680D000","o":"CDAA5A"},{"b":"F680D000","o":"5F1406"},{"b":"F680D000","o":"5F2A68"},{"b":"F680D000","o":"5E9E5E"},{"b":"F680D000","o":"5EB142"},{"b":"F680D000","o":"6738D5"},{"b":"F680D000","o":"673BE8"},{"b":"F680D000","o":"68952D"},{"b":"F680D000","o":"687E37"},{"b":"F680D000","o":"683D28"},{"b":"F680D000","o":"685070"},{"b":"F680D000","o":"685A91"},{"b":"F680D000","o":"774D08"},{"b":"F680D000","o":"775215"},{"b":"F680D000","o":"7870D2"},{"b":"F680D000","o":"653BD2"},{"b":"F680D000","o":"267C0A"},{"b":"F680D000","o":"C30D78"},{"b":"F5BE7000","o":"6420"},{"b":"F5A10000","o":"FD10E"}],"processInfo":{ "mongodbVersion" : "3.0.0", "gitVersion" : "nogitversion", "uname" : { "sysname" : "Linux", "release" : "3.18.5-201.fc21.x86_64", "version" : "#1 SMP Mon Feb 2 21:00:58 UTC 2015", "machine" : "i686" }, "somap" : [ { "b" : "F680D000", "elfType" : 3, "buildId" : "EE760393CE67AAAE8E24E71567C066D852CEE185" }, { "b" : "F67E6000", "path" : "linux-gate.so.1", "elfType" : 3, "buildId" : "20E597ED0059ED35B90FA3D12AEC41933D5A55D5" }, { "b" : "F679F000", "path" : "/lib/libstemmer.so.0", "elfType" : 3, "buildId" : "0F2E7482A60C526D50AFE8B4C6ED48C6D7AA54C8" }, { "b" : "F6731000", "path" : "/lib/libboost_program_options.so.1.57.0", "elfType" : 3, "buildId" : "0E52BBB4AFBA8DAB506A24742B51277AF6CA7EFF" }, { "b" : "F671B000", "path" : "/lib/libboost_filesystem.so.1.57.0", "elfType" : 3, "buildId" : "F8271106A21B816B91D10ABF88803780C1266017" }, { "b" : "F66F7000", "path" : "/lib/libboost_thread.so.1.57.0", "elfType" : 3, "buildId" : "C6551F2AF022A75DC4D3755B4F26617FBB497BE3" }, { "b" : "F66F1000", "path" : "/lib/libboost_system.so.1.57.0", "elfType" : 3, "buildId" : "19876339BB27B2D0282D87F5DF1D276846F7B89A" }, { "b" : "F666E000", "path" : "/lib/libyaml-cpp.so.0.5", "elfType" : 3, "buildId" : "EC2D0F033344983E7B0E7FC598B532D469B300AD" }, { "b" : "F6127000", "path" : "/lib/libv8.so.3", "elfType" : 3, "buildId" : "9F4F66ACA7E7991F80D6D50D441A593C3AFAFEDA" }, { "b" : "F6120000", "path" : "/lib/libsnappy.so.1", "elfType" : 3, "buildId" : "E5218954D9625BEC8A2F13FE7E9DDBB9C2ED4CFF" }, { "b" : "F60AE000", "path" : "/lib/libpcre.so.1", "elfType" : 3, "buildId" : "33451CD8F911183F9463C95C608CBD1E7C5A40DA" }, { "b" : "F60A3000", "path" : "/lib/libpcrecpp.so.0", "elfType" : 3, "buildId" : "25A632EAD5E7DCFC923381FEDCB5C2BAE3D52F86" }, { "b" : "F6038000", "path" : "/lib/libtcmalloc.so.4", "elfType" : 3, "buildId" : "06F604FC695C582A24D128F07F5912B81269E410" }, { "b" : "F5FCD000", "path" : "/lib/libssl.so.10", "elfType" : 3, "buildId" : "707C798B835A5D16FE246B4598EE61CDE0D59724" }, { "b" : "F5DF7000", "path" : "/lib/libcrypto.so.10", "elfType" : 3, "buildId" : "50D488D8DB357A67AED1C59B151F74E8249429CB" }, { "b" : "F5DEE000", "path" : "/lib/librt.so.1", "elfType" : 3, "buildId" : "F2B9BFF313D784FC188CC2FF27751E546841C472" }, { "b" : "F5DE9000", "path" : "/lib/libdl.so.2", "elfType" : 3, "buildId" : "E1F5B879ED170A3B75E41BF79BA23466EE1332CB" }, { "b" : "F5C72000", "path" : "/lib/libstdc++.so.6", "elfType" : 3, "buildId" : "8102E4ECC85388238AF2CDFD38F5F6A7951D9030" }, { "b" : "F5C22000", "path" : "/lib/libm.so.6", "elfType" : 3, "buildId" : "0A497E0AC0F4161CA848120695FC9CD07685CBE7" }, { "b" : "F5C04000", "path" : "/lib/libgcc_s.so.1", "elfType" : 3, "buildId" : "28642F7138253D2258675FAA2AB61C55632AB9CD" }, { "b" : "F5BE7000", "path" : "/lib/libpthread.so.0", "elfType" : 3, "buildId" : "EE0CBF308EDDB25DAF101D94170B31B1C01E8779" }, { "b" : "F5A10000", "path" : "/lib/libc.so.6", "elfType" : 3, "buildId" : "33217031AC3355C4C614CF94202647C5C807ED0A" }, { "b" : "F57AB000", "path" : "/lib/libicui18n.so.54", "elfType" : 3, "buildId" : "260EA5D4FCC662C8F8ACBC05FD3243BA35C39788" }, { "b" : "F5619000", "path" : "/lib/libicuuc.so.54", "elfType" : 3, "buildId" : "471457014879AA7B03E97906E0D4C8A1DF487D75" }, { "b" : "F3DED000", "path" : "/lib/libicudata.so.54", "elfType" : 3, "buildId" : "A420902092223A1853BD1BB2B79659FD0371308D" }, { "b" : "F3DD8000", "path" : "/lib/libunwind.so.8", "elfType" : 3, "buildId" : "AA14A9EE8B6A78772045024058A29285E7E03DBE" }, { "b" : "F67E7000", "path" : "/lib/ld-linux.so.2", "elfType" : 3, "buildId" : "16FFC39F694222373A3EAC28460041F2EAB0DCC1" }, { "b" : "F3D8B000", "path" : "/lib/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "4CB71B2CD915624CD20DA31C125F9007FEF85272" }, { "b" : "F3CB5000", "path" : "/lib/libkrb5.so.3", "elfType" : 3, "buildId" : "63B0B6A145E0B70E1DD1671EFA9AB498C49FF6DE" }, { "b" : "F3CAF000", "path" : "/lib/libcom_err.so.2", "elfType" : 3, "buildId" : "980961E8F64AA412B3A2D3802507D0A4F442DA3F" }, { "b" : "F3C7B000", "path" : "/lib/libk5crypto.so.3", "elfType" : 3, "buildId" : "D14D29C5E67FCA7060ECBF79418155A25BE5E163" }, { "b" : "F3C5F000", "path" : "/lib/libresolv.so.2", "elfType" : 3, "buildId" : "D53D3ED980E666E89A3D1978C464083EBC211F4A" }, { "b" : "F3C47000", "path" : "/lib/libz.so.1", "elfType" : 3, "buildId" : "61BD9738D3A26D072C40A50439A08A4B7DE9FCB1" }, { "b" : "F3C38000", "path" : "/lib/libkrb5support.so.0", "elfType" : 3, "buildId" : "6C5BBACFE4F91EEB9CFD8F6907AC14084EB66427" }, { "b" : "F3C32000", "path" : "/lib/libkeyutils.so.1", "elfType" : 3, "buildId" : "D72A0BB73DDF9B5A7B661A457A99FFED4C6E83D2" }, { "b" : "F3C0D000", "path" : "/lib/libselinux.so.1", "elfType" : 3, "buildId" : "DD60B8B038B7A8A3B438C5B2ADA6292E611649A0" }, { "b" : "F3BE2000", "path" : "/lib/liblzma.so.5", "elfType" : 3, "buildId" : "15366A2089431339D7722BA1FC96A0501986732A" } ] }}
 mongod(_ZN5mongo15printStackTraceERSo+0x39) [0xf749d3d9]
 mongod(_ZN5mongo10logContextEPKc+0xF1) [0xf74213c1]
 mongod(_ZN17LogMessageWarningD1Ev+0x26) [0xf74b4a86]
 mongod(_ZN8S2LatLngC2ERK7Vector3IdE+0xDE) [0xf74d9c3e]
 mongod(_ZNK12S2LatLngRect8ContainsERK7Vector3IdE+0x2E) [0xf74dfbbe]
 mongod(_ZNK6S2Loop8ContainsERK7Vector3IdE+0x39) [0xf74e62d9]
 mongod(_ZN6S2Loop9InitBoundEv+0x247) [0xf74e7597]
 mongod(_ZN6S2Loop4InitERKSt6vectorI7Vector3IdESaIS2_EE+0x195) [0xf74e7955]
 mongod(_ZN6S2LoopC1ERKSt6vectorI7Vector3IdESaIS2_EE+0xDA) [0xf74e7a5a]
 mongod(+0x5F1406) [0xf6dfe406]
 mongod(_ZN5mongo9GeoParser19parseGeoJSONPolygonERKNS_7BSONObjEPNS_14PolygonWithCRSE+0x378) [0xf6dffa68]
 mongod(_ZN5mongo17GeometryContainer16parseFromGeoJSONERKNS_7BSONObjE+0xBAE) [0xf6df6e5e]
 mongod(_ZN5mongo17GeometryContainer14parseFromQueryERKNS_11BSONElementE+0x702) [0xf6df8142]
 mongod(_ZN5mongo13GeoExpression10parseQueryERKNS_7BSONObjE+0x715) [0xf6e808d5]
 mongod(_ZN5mongo13GeoExpression9parseFromERKNS_7BSONObjE+0x38) [0xf6e80be8]
 mongod(_ZN5mongo31expressionParserGeoCallbackRealEPKciRKNS_7BSONObjE+0x26D) [0xf6e9652d]
 mongod(_ZN5boost6detail8function17function_invoker3IPFN5mongo10StatusWithIPNS3_15MatchExpressionEEEPKciRKNS3_7BSONObjEES7_S9_iSC_E6invokeERNS1_15function_bufferES9_iSC_+0x27) [0xf6e94e37]
 mongod(_ZN5mongo21MatchExpressionParser14_parseSubFieldERKNS_7BSONObjEPKNS_18AndMatchExpressionEPKcRKNS_11BSONElementEi+0x178) [0xf6e90d28]
 mongod(_ZN5mongo21MatchExpressionParser9_parseSubEPKcRKNS_7BSONObjEPNS_18AndMatchExpressionEi+0x150) [0xf6e92070]
 mongod(_ZN5mongo21MatchExpressionParser6_parseERKNS_7BSONObjEi+0x4F1) [0xf6e92a91]
 mongod(_ZN5mongo14CanonicalQuery12canonicalizeEPNS_15LiteParsedQueryEPPS0_RKNS_21MatchExpressionParser13WhereCallbackE+0x48) [0xf6f81d08]
 mongod(_ZN5mongo14CanonicalQuery12canonicalizeERKNS_12QueryMessageEPPS0_RKNS_21MatchExpressionParser13WhereCallbackE+0xB5) [0xf6f82215]
 mongod(_ZN5mongo8runQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERKNS_15NamespaceStringERNS_5CurOpES3_b+0x342) [0xf6f940d2]
 mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortEb+0xC62) [0xf6e60bd2]
 mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xFA) [0xf6a74c0a]
 mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x3B8) [0xf743dd78]
 libpthread.so.0(+0x6420) [0xf5bed420]
 libc.so.6(clone+0x5E) [0xf5b0d10e]
-----  END BACKTRACE  -----
2015-03-05T08:32:26.943+0000 W GEO      [conn18] src/third_party/s2/s2latlng.cc:34:  Check failed: is_valid()
2015-03-05T08:32:26.951+0000 I CONTROL  [conn18] 
 0xf749d3d9 0xf74213c1 0xf74b4a86 0xf74d9c3e 0xf74dfbbe 0xf74e62d9 0xf74e76e9 0xf74e7955 0xf74e7a5a 0xf6dfe406 0xf6dffa68 0xf6df6e5e 0xf6df8142 0xf6e808d5 0xf6e80be8 0xf6e9652d 0xf6e94e37 0xf6e90d28 0xf6e92070 0xf6e92a91 0xf6f81d08 0xf6f82215 0xf6f940d2 0xf6e60bd2 0xf6a74c0a 0xf743dd78 0xf5bed420 0xf5b0d10e
...



 Comments   
Comment by Marek Skalický [ 05/Oct/18 ]

Hi,
I've tried to build mongodb with gcc 8.2 and used -O2 for s2 library again. And core js tests are passing again.

So I guess this issue can be closed as solved by gcc upstream.

Comment by Marek Skalický [ 02/Apr/15 ]

Thanks.

Do you know there could be problems with building only s2 without optimizations?

Comment by Andrew Morrow (Inactive) [ 02/Apr/15 ]

Hi mskalick -

My best guess is that there is probably undefined behavior of some sort in S2, and the more aggressive optimizations in GCC 5 are now surfacing that UB as a crash. GCC 5 is presumably going to ship soon and we will begin our process of validating with that compiler soon after, so we should be able to resolve this in the not too distant future.

Also, thank you for the link on the upcoming ABI changes in Fedora, that is very useful information for us.

Comment by Marek Skalický [ 02/Apr/15 ]

With building s2 without optimizations (adding sed -i -r "s|(env.Append(CCFLAGS=['-DDEBUG_MODE=false')(]))|\1,'-O0'\2|" src/third_party/s2/SConscript) mongodb is building fine. But I am not sure if this is the best solution (but maybe the easiest)...

Comment by Marek Skalický [ 02/Apr/15 ]

I am sorry, but I was doing something wrong. I have tried to compile again with --opt=off and test is working. I hope it is a good news...

There is post about Fedora 23 changes - http://developerblog.redhat.com/2015/02/10/gcc-5-in-fedora/

glibc sources used for fedora building are saved there http://pkgs.fedoraproject.org/lookaside/pkgs/glibc/ so first version causing this problem is http://pkgs.fedoraproject.org/lookaside/pkgs/glibc/glibc-2.21-104-gbdf1ff0.tar.gz/dbe7f3b03a46ea6b2a22b9f4c721dd5a/glibc-2.21-104-gbdf1ff0.tar.gz . But I don't know what in ChangeLog from "2015-02-11 Samuel Thibault <samuel.thibault@ens-lyon.org>" to "2015-02-22 Paul Pluzhnikov <ppluzhnikov@google.com>" is causing this problem...

With valgrind even test compiled with optimization works well...

Do you have any idea?

Comment by Andrew Morrow (Inactive) [ 01/Apr/15 ]

mskalick -

Thanks for trying those alternatives. I didn't know about gcc 5 defaulting to C++11 in Fedora 23. Can you point me to a reference about that, as it bears on some future work of ours.

Re glibc: of course it is possible either that there was a latent bug in s2 that the newer glibc exposed, or that there is a bug in the newer glibc, though I would pursue the former before the latter. However, my clone of the glibc repo doesn't seem to have the SHA's that are referenced in the commit you pointed to. This is probably a misunderstanding on my part about redhat manages glibc, but could you either point me to the repo in which those shas are intelligible so I can examine what changed in glibc, or, if the diff is small enough, just post it here?

Also, have you tried running the failing test under valgrind and/or address sanitizer? You can enable ASAN instrumentation in the mongodb build by building with clang and passing --sanitize=address and an appropriate value for --llvm-symbolizer-path to the build. Seeing if the failure reproduces with clang with and without the updated glibc might be another interesting axis of variation to explore, as would swapping out libc++ for libstdc++ by using the --libc++ flag.

Thanks,
Andrew

Comment by Marek Skalický [ 01/Apr/15 ]

Thanks Andrew,

Does the crash reproduce if you disable optimization by building with --opt=off???
Does the crash reproduce if you build with our vendored third party libraries, by disabling the --use-system-all?
Does the crash reproduce in a 64-bit build? With or without optimization?

Nothing helps.

The 3.0.0 release can still be built in C++03 build by passing --c++11=off. Does the crash reproduce then?

In fedora 23 gcc (5.0) has default setting to use C++11. So system libraries are also build with C++11.

But I've figured out what cause this problem. It is not gcc5, but glibc. (I don't know if it is also partially connected with gcc, but there is version built with this new version of gcc which works fine)

This update/commit is causing problem http://pkgs.fedoraproject.org/cgit/glibc.git/commit/?id=5c979090d812bf2884b152fa5047e912f8086627
So glibc-2.21.90-3.1 works and glibc-2.21.90-4 doesn't work.

Is it possible that s2 is wrongly using glibc functions? Or this is bug in glibc?

Thanks,
Marek

Comment by Andrew Morrow (Inactive) [ 30/Mar/15 ]

Hi mskalick -

The developers here more or less use the tools you would expect: strace, GDB or LLDB, valgrind, address sanitizer, and falling back to printf when necessary.

There may be a few differential diagnosis steps that yield some interesting information without reaching for those tools:

  • Does the crash reproduce if you disable optimization by building with --opt=off?
  • Does the crash reproduce if you build with our vendored third party libraries, by disabling the --use-system-all?
  • Does the crash reproduce in a 64-bit build? With or without optimization?
  • The 3.0.0 release can still be built in C++03 build by passing --c++11=off. Does the crash reproduce then?

Also it is important to note that building in C++11 mode with --use-system is not assured to work. Some of the libraries on which we depend, in particular boost, do not offer a stable ABI across C++03 vs C++11 builds. Compiling in C++11 mode with the system libraries may not produce a working build if the system libraries themselves were not built in C++11 mode. The build system should issue a warning when building in C++11 mode with the system libraries. Did you observe this warning in your build?

Thanks,
Andrew

Comment by Marek Skalický [ 30/Mar/15 ]

Hi,
thanks.

What is prefered way how to debug mongodb? Is there any page with information about it?

Comment by Andrew Morrow (Inactive) [ 27/Mar/15 ]

Hi mskalick -

Unfortunately, the upstream s2 project has had no updates in several years. We have made some small changes to the library over the years to keep it working on new toolchains and platforms and will probably continue to do so.

If you would like to see the accumulated diff of s2 modifications we have made, you can run 'git diff 88b0468..HEAD – src/third_party/s2' from the root of the mongodb git repository.

Comment by Marek Skalický [ 09/Mar/15 ]

I know that gcc5 is untested and unsupported. But c++11 is in experimental support and gcc5 switched to use this standard.

This error only occur in a 32-bit. (not in 64-bit)

So my question was mainly about if you don't know, where could be the problem? Is my assumption that problem is in bad functionality of s2 right?

What is the state of upstream s2 project? And what changes are done by mongodb in s2?

Comment by Andrew Morrow (Inactive) [ 09/Mar/15 ]

Hi mskalick -

Thanks for the report.

Since GCC 5 is an unreleased development compiler, we are not currently testing with it. Once it is released we will begin our validation.

I notice as well that this is a 32-bit build. Out of curiosity, do the same failures occur in a 64-bit build?

Thanks,
Andrew

Generated at Thu Feb 08 03:44:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.