Opened 11 years ago

Closed 10 years ago

#2327 defect closed fixed (fixed)

Intermittent failure in PB tests

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: pb Keywords:
Cc: Branch: branches/test_publishable-win32-2327
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun


[ERROR]: twisted.test.test_pb.BrokerTestCase.testPublishable

Traceback (most recent call last):
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\test\", line 651, in testPublishable
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\test\", line 71, in flush
    while self.pump():
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\test\", line 93, in pump
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 218, in dataReceived
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 148, in gotItem
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 113, in callExpressionReceived
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 523, in expressionReceived
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 892, in proto_answer
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 784, in unserialize
    return unjelly(sexp,, None, self)
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 900, in unjelly
    return _Unjellier(taster, persistentLoad, invoker).unjellyFull(sexp)
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 523, in unjellyFull
    o = self.unjelly(obj)
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 546, in unjelly
    val = method(self, obj)
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 458, in unjellyFor
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 86, in setCopyableState
    newself = jelly.unjelly(banana.decode(data))
  File "c:\twistedbuildbot\W32-full2.4-scmikes-select\Twisted\twisted\spread\", line 349, in decode
    return l[0]
exceptions.IndexError: list index out of range

I expect this is a test bug related to the mock transport implemented and used by these tests, rather than a bug in PB itself.

Change History (7)

comment:1 Changed 10 years ago by Jean-Paul Calderone

#2879 was a duplicate of this.

comment:2 Changed 10 years ago by Jean-Paul Calderone

author: exarkun
Branch: branches/test_publishable-win32-2327

(In [24177]) Branching to 'test_publishable-win32-2327'

comment:3 Changed 10 years ago by Jean-Paul Calderone

Keywords: review added
Owner: warner deleted

I don't know how this test could have ever passed. It wrote banana data, including \x1a (aka EOF on Windows) to a binary file. Later, it tried to read it back from a text file, resulting in truncated data. Should have always failed.

comment:4 Changed 10 years ago by therve

Keywords: review removed
Owner: set to Jean-Paul Calderone

It looks good. It would be nice though if the file were explicitly closed (same thing in _cbGotUpdate). But please merge when you want.

comment:5 Changed 10 years ago by Jean-Paul Calderone

(In [24241]) Explicitly close opened files

refs #2327

comment:6 Changed 10 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [24244]) Merge test_publishable-win32-2327

Author: exarkun Reviewer: therve Fixes: #2327

Read publishable data files in binary mode so that the data is not corrupted on Windows. Also, explicitly close the files rather than relying on refcounting to do it.

comment:7 Changed 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.