[SERVER-6442] memory error in smoke test Created: 13/Jul/12  Updated: 11/Jul/16  Resolved: 14/Jul/12

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 2.1.2
Fix Version/s: 2.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Unassigned
Resolution: Done Votes: 0
Labels: buildbot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-6328 Solaris core test failure Closed
Operating System: ALL
Participants:

 Description   

If you run 'test' under Valgrind Memcheck, you get this:

Fri Jul 13 13:02:50 [testsuite] { $err: "can't have an empty ns", code: 16332 }
==31788== Invalid read of size 4
==31788==    at 0x776194: _ZNK5mongo7BSONObj8getFieldERKNS_10StringDataE.constprop.251 (bsonobj.h:280)
==31788==    by 0x77716C: DirectClientTests::BadNSQuery::run() (bsonobj.h:227)
==31788==    by 0x7772E2: void mongo::unittest::Suite::runTestObject<DirectClientTests::BadNSQuery>() (unittest.h:269)
==31788==    by 0xC67D36: mongo::unittest::Suite::run(std::string const&, int) (function_template.hpp:760)
==31788==    by 0xC68B74: mongo::unittest::Suite::run(std::vector<std::string, std::allocator<std::string> > const&, std::string const&, int) (unittest.cpp:207)
==31788==    by 0xBBA677: mongo::dbtests::runDbTests(int, char**, std::string) (framework.cpp:271)
==31788==    by 0x685A49: main (dbtests.cpp:29)
==31788==  Address 0x4f68854 is 36 bytes inside a block of size 512 free'd
==31788==    at 0x4A06624: free (vg_replace_malloc.c:427)
==31788==    by 0xB33242: mongo::Message::~Message() (message.h:229)
==31788==    by 0xDAC774: mongo::DBClientCursor::~DBClientCursor() (auto_ptr.h:170)
==31788==    by 0xDACC78: mongo::DBClientCursor::~DBClientCursor() (dbclientcursor.cpp:350)
==31788==    by 0x77710D: DirectClientTests::BadNSQuery::run() (auto_ptr.h:170)
==31788==    by 0x7772E2: void mongo::unittest::Suite::runTestObject<DirectClientTests::BadNSQuery>() (unittest.h:269)
==31788==    by 0xC67D36: mongo::unittest::Suite::run(std::string const&, int) (function_template.hpp:760)
==31788==    by 0xC68B74: mongo::unittest::Suite::run(std::vector<std::string, std::allocator<std::string> > const&, std::string const&, int) (unittest.cpp:207)
==31788==    by 0xBBA677: mongo::dbtests::runDbTests(int, char**, std::string) (framework.cpp:271)
==31788==    by 0x685A49: main (dbtests.cpp:29)
==31788== 
==31788== 
==31788== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----

This is probably the same reason why the Solaris and Windows debug builds are failing in the DirectClientTests suite.



 Comments   
Comment by Eric Milkie [ 14/Jul/12 ]

commit 317f6adf20f4e707335e10316f8f30f8a1d0e48c
Author: Eliot Horowitz <eliot@10gen.com>
Date: Sat Jul 14 00:19:39 2012 -0400

fix direct test - make sure memory is owned by the right thing

Comment by Eric Milkie [ 13/Jul/12 ]

Windows:
http://buildbot.mongodb.org/builders/Windows%2064-bit%202008%2B%20DEBUG/builds/1/steps/test/logs/stdio
Solaris:
http://buildbot.mongodb.org/builders/Solaris-SmartOS%2064-bit/builds/90/steps/test/logs/stdio

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