[tahoe-lafs-trac-stream] [tahoe-lafs] #1646: nondeterministic failure of mydata.test.test_runner.RunNode.test_introducer

tahoe-lafs trac at tahoe-lafs.org
Thu Dec 29 03:02:26 UTC 2011


#1646: nondeterministic failure of mydata.test.test_runner.RunNode.test_introducer
----------------------------+---------------------------------------
     Reporter:  davidsarah  |      Owner:  davidsarah
         Type:  defect      |     Status:  new
     Priority:  major       |  Milestone:  undecided
    Component:  code        |    Version:  1.9.0
   Resolution:              |   Keywords:  test heisenbug introducer
Launchpad Bug:              |
----------------------------+---------------------------------------
Description changed by davidsarah:

Old description:

> {{{allmydata.test.test_runner.RunNode.test_introducer}}} sometimes fails
> with the following error:
> {{{
>   RunNode
>     test_introducer ... Traceback (most recent call last):
>   File "/home/bb-tahoe/bb-tahoe/sickness-
> openbsd-x86-py2.7/build/src/allmydata/test/test_runner.py", line 441, in
> _check_same_furl_and_port
>     self.failUnlessEqual(self.furl, fileutil.read(INTRODUCER_FURL_FILE))
> twisted.trial.unittest.FailTest: not equal:
> a = ''
> b =
> 'pb://w6x2bwklda63sm26ki7tqhieri5fl3fz@192.168.0.120:30549,127.0.0.1:30549/introducer\n'
>
> [FAIL]
> }}}
>
> I believe the problem is due to an incorrect assumption in the test, that
> {{{introducer.furl}}} will be written before {{{node.url}}}. In fact they
> may be written in either order, because the {{{init_introducer}}} method
> of [source:src/allmydata/introducer/server.py IntroducerNode] writes
> {{{introducer.furl}}} concurrently with the {{{init_web}}} method of the
> same class (indirectly) writing {{{node.url}}}.
>
> {{{test_runner.py}}} is prone to race conditions because we don't have a
> particularly reliable way to determine that a node has started, and so
> these tests rely on implementation details of when files ware created
> during the startup process.

New description:

 {{{allmydata.test.test_runner.RunNode.test_introducer}}} sometimes fails
 with the following error (found on sickness' buildslave):
 {{{
   RunNode
     test_introducer ... Traceback (most recent call last):
   File "/home/bb-tahoe/bb-tahoe/sickness-
 openbsd-x86-py2.7/build/src/allmydata/test/test_runner.py", line 441, in
 _check_same_furl_and_port
     self.failUnlessEqual(self.furl, fileutil.read(INTRODUCER_FURL_FILE))
 twisted.trial.unittest.FailTest: not equal:
 a = ''
 b =
 'pb://w6x2bwklda63sm26ki7tqhieri5fl3fz@192.168.0.120:30549,127.0.0.1:30549/introducer\n'

 [FAIL]
 }}}

 I believe the problem is due to an incorrect assumption in the test, that
 {{{introducer.furl}}} will be written before {{{node.url}}}. In fact they
 may be written in either order, because the {{{init_introducer}}} method
 of [source:src/allmydata/introducer/server.py IntroducerNode] writes
 {{{introducer.furl}}} concurrently with the {{{init_web}}} method of the
 same class (indirectly) writing {{{node.url}}}.

 {{{test_runner.py}}} is prone to race conditions because we don't have a
 particularly reliable way to determine that a node has started, and so
 these tests rely on implementation details of when files are created
 during the startup process.

--

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1646#comment:1>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list