<div dir="ltr">On Thu, Aug 1, 2013 at 7:50 PM,  <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com" target="_blank">exarkun@twistedmatrix.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><span style="color:rgb(34,34,34)">I suggest you take a look at TimerService and figure out why pickling one of those ever tries to pickle a LoopingCall (take a look around `__getstate__` and `volatile`, I think that's where the problem is).  I think you'll find an existing bug that the unit test previously failed to reveal but which your changes have revealed.</span></div>
</blockquote><div><br></div><div style>Thanks for your help. I've found that the bug is due to a typo. The "_loopFinshed" in `TimerService.volatile` should be "_loopFinished". So when pickling a `TimerService` it will actually try to pickle "_loopFinished"(the Deferred returned by `LoopingCall.start`). When the Deferred has a reference to the `LoopingCall` instance it will then try to pickle the `LoopingCall`, thus causes the problem.</div>
</div><br></div><div class="gmail_extra" style>I've searched and there is no ticket about this. So I will file a new ticket and fix this.</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>-Kai</div>
</div>