Opened at 2017-07-26T15:26:59Z
Last modified at 2017-07-27T07:15:59Z
#2896 new defect
intermittent allmydata.test.test_introducer.NonV1Server.test_failure failure
Reported by: | exarkun | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | code | Version: | 1.12.1 |
Keywords: | test | Cc: | |
Launchpad Bug: |
Description
Traceback (most recent call last): Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean. DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug) <DelayedCall 0x10a5a0bd8 [240.085453033s] called=0 cancelled=0 Broker.keepaliveTimerFired()> <DelayedCall 0x10a5a04d0 [240.08481288s] called=0 cancelled=0 Broker.keepaliveTimerFired()>
and
Traceback (most recent call last): Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean. Selectables: <Negotiation #0 on 55074> <<class 'twisted.internet.tcp.Client'> to ('127.0.0.1', 55074) at 10a3a4b50>
ie, a leaked TCP client and a couple delayed calls.
Change History (4)
comment:1 Changed at 2017-07-26T15:47:18Z by exarkun
comment:2 Changed at 2017-07-26T17:38:08Z by exarkun
It looks like Tub.stopService doesn't actually wait for its (Foolscap) Broker connections to close. Instead, it closes them and waits about a reactor tick ("eventually"). Evidently this is good enough most of the time but it's not a guarantee the connections will have been closed in time.
Fortunately, Broker already has an API for being notified when its connection is actually lost. Unfortunately, for some reason, Tub.stopService explicitly disables that functionality when disconnecting its Brokers! I don't know why it does this.
comment:3 Changed at 2017-07-26T20:14:39Z by exarkun
I think this will be fixed by a Foolscap change, https://github.com/warner/foolscap/pull/38
comment:4 Changed at 2017-07-27T07:15:59Z by warner
Foolscap-0.12.7 has been released, with that change.
This was observed on the OS X travis-ci job. It may be that this test can only realistically fail on OS X due to distinctive ordering of TCP events on that platform.