[Python-Dev] Meaty debugging mystery

Tim Peters tim.one@comcast.net
Sun, 29 Jun 2003 22:38:44 -0400


Neil Schemenauer was running regrtest with -r and got a segfault.  He
whittled it down to running just

    -u bsddb test_logging test_bsddb3

This was confirmed on Win2K, Win98, and some version of Linux.  He also
discovered that the problem went away if test_logging.py's

    locale.setlocale(locale.LC_ALL, '')

was commented out.

I've since found that the problem persists if

+ All the suite.addTest() calls in bsddb/test/test_basics.py are
  commented out except for

    suite.addTest(unittest.makeSuite(BTreeMultiDBTestCase))

and

+ All the entries in test_bsddb3.py's test_modules list are commented
  out except for

        'test_basics',

Then running yields this output:

test_bsddb3
test01_GetsAndPuts (bsddb.test.test_basics.BTreeMultiDBTestCase) ... ok
test02_DictionaryMethods (bsddb.test.test_basics.BTreeMultiDBTestCase) ...
ok
test03_SimpleCursorStuff (bsddb.test.test_basics.BTreeMultiDBTestCase) ...
ok
test04_PartialGetAndPut (bsddb.test.test_basics.BTreeMultiDBTestCase) ... ok
test05_GetSize (bsddb.test.test_basics.BTreeMultiDBTestCase) ... ok
test06_Truncate (bsddb.test.test_basics.BTreeMultiDBTestCase) ... ok
test09_MultiDB (bsddb.test.test_basics.BTreeMultiDBTestCase) ... FAIL

and that's when the crash happens.

I don't have time to dig into this more.  Looks like a good one, though!