From owner-freebsd-ports@FreeBSD.ORG Fri Jan 25 08:41:12 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E7DC4CCB for ; Fri, 25 Jan 2013 08:41:12 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id BBA7B74A for ; Fri, 25 Jan 2013 08:41:12 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id r0P8f57q005171 for ; Fri, 25 Jan 2013 00:41:05 -0800 (PST) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id r0P8f5on005170 for freebsd-ports@freebsd.org; Fri, 25 Jan 2013 00:41:05 -0800 (PST) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" Subject: databases/mongodb fails to start, assertion failure in unit test To: freebsd-ports@freebsd.org Message-Id: <1359103265.5165@da3m0n8t3r.com> X-Originating-IP: 50.197.134.190 X-Mailer: Usermin 1.510 Date: Fri, 25 Jan 2013 00:41:05 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1359103265" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 08:41:13 -0000 This is a multi-part message in MIME format. --bound1359103265 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Hi, I've installed databases/mongodb and get an error when starting. # /usr/local/etc/rc.d/mongod start Starting mongod. forked process: 59576 all output going to: /var/db/mongodb/mongod.log /usr/local/etc/rc.d/mongod: WARNING: failed to start mongod # cat /var/db/mongodb/mongod.log Fri Jan 25 00:30:57 Assertion failure l < bigl src/mongo/db/btree.cpp 1973 0x5a503d 0x5eb41d 0x74dce9 0x547638 0x545ed9 0x542bc1 0x5a503d <_ZN5mongo12verifyFailedEPKcS1_j+285> at /usr/local/bin/mongod 0x5eb41d <_ZN5mongo10BTUnitTest3runEv+333> at /usr/local/bin/mongod 0x74dce9 <_ZN5mongo11StartupTest8runTestsEv+57> at /usr/local/bin/mongod 0x547638 at /usr/local/bin/mongod 0x545ed9 at /usr/local/bin/mongod 0x542bc1 <_start+145> at /usr/local/bin/mongod Fri Jan 25 00:30:57 Got signal: 6 (Abort trap: 6). # portversion -v mongodb mongodb-2.2.0_1 = up-to-date with port # uname -a FreeBSD kamira.waitman.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r245772M: Tue Jan 22 06:09:00 PST 2013 root@kamira.waitman.net:/usr/obj/usr/src/sys/BURPLEX amd64 I added a couple lines to print the values before the failure. src/mongo/db/btree.h .. struct BTUnitTest : public StartupTest { void run() { DiskLoc big(0xf12312, 0x70001234); DiskLoc56Bit bigl; { bigl = big; verify( big == bigl ); DiskLoc e = bigl; verify( big == e ); } { DiskLoc d; verify( d.isNull() ); DiskLoc56Bit l; l = d; verify( l.isNull() ); d = l; verify( d.isNull() ); printf("bigl %s\n",bigl.toString().c_str()); printf("l %s\n",l.toString().c_str()); verify( l < bigl ); } } } btunittest; .. output: bigl f12312:70001234 l null Thu Jan 24 23:18:17 Assertion failure l < bigl src/mongo/db/btree.cpp 1978 looking at src/mongo/db/diskloc.h bool isNull() const { return _a == -1; } .. int compare(const DiskLoc& b) const { int x = _a - b._a; if ( x ) return x; return ofs - b.ofs; } bool operator<(const DiskLoc& b) const { return compare(b) < 0; } .. void Null() { _a = -1; ofs = 0; /* note NullOfs is different. todo clean up. see refs to NullOfs in code - use is valid but outside DiskLoc context so confusing as-is. */ } it seems that this should be working! test model: #include int compare (int a, int b) { int x = a - b; if ( x ) return x; return 555; } bool ncompare (int a, int b) { return compare(a,b) < 0; } int main (void) { int a, b; a = -1; b = 0xf12312; int c = a - b; printf("%d\n",c); c = compare(a,b); printf("%d\n",c); bool d = ncompare(a,b); printf("%d\n",d); bool e = ncompare(b,a); printf("%d\n",e); return 0; } # clang++ -o test test.cpp # ./test -15803155 -15803155 1 0 I'm missing something... Suggestions, tips, hints much appreciated. Thanks, -- Waitman Gobble San Jose California USA --bound1359103265--