This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bsddb/test/test_replication.py bus error, segfault, assertion error, pass
Type: Stage:
Components: Extension Modules Versions: Python 2.6
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: jcea Nosy List: gregory.p.smith, jcea
Priority: high Keywords:

Created on 2008-05-25 03:18 by gregory.p.smith, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (10)
msg67318 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-05-25 03:18
Using Linux with BerkeleyDB 4.7.25 the bsddb/test/test_replication.py
test is very flaky.  It alternately passes, raises an AssertionError
because of the timeout or gets a segmentation fault or bus error.

(side note: i updated test_replication to not use hard coded port numbers)

I have not tried this test using other BerkeleyDB versions.
msg70009 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2008-07-19 09:44
Gregory, could you possibly try my svn, revision 529?
msg70048 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-19 19:08
python 2.6b1+, bdb 4.7.25 on x86 ubuntu linux.


% ../../../../python/trunk/python bsddb3/tests/test_replication.py -v
test01_basic_replication (__main__.DBReplicationManager) ... zsh:
segmentation fault  ../../../../python/trunk/python
bsddb3/tests/test_replication.py -v


% ../../../../python/trunk/python bsddb3/tests/test_replication.py -v
test01_basic_replication (__main__.DBReplicationManager) ... FAIL
test01_basic_replication (__main__.DBBaseReplication) ... ERROR
test02_test_request (__main__.DBBaseReplication) ... ERROR
test03_master_election (__main__.DBBaseReplication) ... ERROR

======================================================================
ERROR: test01_basic_replication (__main__.DBBaseReplication)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bsddb3/tests/test_replication.py", line 228, in setUp
    self.dbenvMaster.rep_set_transport(13,m2c)
AttributeError: rep_set_transport

======================================================================
ERROR: test02_test_request (__main__.DBBaseReplication)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bsddb3/tests/test_replication.py", line 228, in setUp
    self.dbenvMaster.rep_set_transport(13,m2c)
AttributeError: rep_set_transport

======================================================================
ERROR: test03_master_election (__main__.DBBaseReplication)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bsddb3/tests/test_replication.py", line 228, in setUp
    self.dbenvMaster.rep_set_transport(13,m2c)
AttributeError: rep_set_transport

======================================================================
FAIL: test01_basic_replication (__main__.DBReplicationManager)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bsddb3/tests/test_replication.py", line 134, in
test01_basic_replication
    self.assertTrue(time.time()<timeout)
AssertionError

----------------------------------------------------------------------
Ran 4 tests in 2.198s

FAILED (failures=1, errors=3)
[27429 refs]
msg70049 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-19 19:08
(that last comment was using pybsddb svn r529)
msg70050 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-19 19:13
hmm.  nevermind.

those last results clearly used the wrong bsddb library.
msg70054 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-19 20:08
Okay, now i've run the correct test suite on the correct modules with
pybsddb r530:

The problems still happen.  Sometimes it passes.  Other times it raises
an assertion error.

test01_basic_replication DBReplicationManger error:

File
"/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6-pydebug/bsddb3/tests/test_replication.py",
line 134, in test01_basic_replication
    self.assertTrue(time.time()<timeout)

test01_basic_replication DBBaseReplication error:

File
"/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6-pydebug/bsddb3/tests/test_replication.py",
line 342, in test01_basic_replication
    self.assertEquals("123", v)


and some others.

i haven't seen it segfault anymore though.
msg70116 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2008-07-21 18:36
Are you using a python pydebug version?. Can you reproduce the issue
with a no "pydebug" python interpreter?
msg70117 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-21 18:59
using a python trunk optimized (non-debug) build and pybsddb r530:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Berkeley DB 4.7.25: (May 15, 2008)
bsddb.db.version():   (4, 7, 25)
bsddb.db.__version__: 4.7.2devel3
bsddb.db.cvsid:       $Id: _bsddb.c 527 2008-07-19 09:06:38Z jcea $
py module:           
/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6/bsddb3/__init__.py
extension module:    
/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6/bsddb3/_pybsddb.so
python version:       2.6b2+ (trunk:65173M, Jul 21 2008, 11:46:04)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
My pid:               9144
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Failure in test test01_basic_replication
(bsddb3.tests.test_replication.DBReplicationManager)
Traceback (most recent call last):
  File "/home/greg/sandbox/python/trunk/Lib/unittest.py", line 279, in run
    testMethod()
  File
"/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6/bsddb3/tests/test_replication.py",
line 134, in test01_basic_replication
    self.assertTrue(time.time()<timeout)
  File "/home/greg/sandbox/python/trunk/Lib/unittest.py", line 325, in
failUnless
    if not expr: raise self.failureException, msg
AssertionError

Failure in test test01_basic_replication
(bsddb3.tests.test_replication.DBBaseReplication)
Traceback (most recent call last):
  File "/home/greg/sandbox/python/trunk/Lib/unittest.py", line 279, in run
    testMethod()
  File
"/home/greg/sandbox/pybsddb/trunk/build/lib.linux-i686-2.6/bsddb3/tests/test_replication.py",
line 352, in test01_basic_replication
    self.assertEquals(None, v)
  File "/home/greg/sandbox/python/trunk/Lib/unittest.py", line 350, in
failUnlessEqual
    (msg or '%r != %r' % (first, second))
AssertionError: None != '123'
msg74382 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2008-10-06 16:38
Greg, is this issue still pending?. Can we close it?.
msg101105 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2010-03-15 13:34
Greg, is this issue still pending?. Can we close it?.
History
Date User Action Args
2022-04-11 14:56:34adminsetgithub: 47209
2010-03-22 14:47:31jceasetstatus: open -> closed
resolution: works for me
2010-03-15 13:34:21jceasetmessages: + msg101105
2008-10-06 16:38:26jceasetmessages: + msg74382
2008-07-21 18:59:19gregory.p.smithsetmessages: + msg70117
2008-07-21 18:36:01jceasetmessages: + msg70116
2008-07-19 20:08:32gregory.p.smithsetmessages: + msg70054
2008-07-19 19:13:23gregory.p.smithsetmessages: + msg70050
2008-07-19 19:08:54gregory.p.smithsetmessages: + msg70049
2008-07-19 19:08:28gregory.p.smithsetmessages: + msg70048
2008-07-19 09:44:35jceasetmessages: + msg70009
2008-05-25 03:18:03gregory.p.smithcreate