Re: [Twisted-Python] Cause epollreactor to busyspin

2016-04-20 Thread Glyph
> On Apr 20, 2016, at 10:37, Tim Hughes wrote: > > Hi All, > > I have a latency sensitive application that gets affected when it is moved > between cores or the system has to wake from idling. Can you explain "gets affected" in more detail? If moving between cores

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Glyph
> On Apr 20, 2016, at 3:42 PM, Jonathan Vanasco wrote: > > > On Apr 20, 2016, at 1:31 PM, Jonathan Vanasco wrote: > >> A specific library was keeping the port open. I'm tracking down how/why >> right now. > > So this was fun thing to learn... > > An undocumented

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Jonathan Vanasco
On Apr 20, 2016, at 1:31 PM, Jonathan Vanasco wrote: > A specific library was keeping the port open. I'm tracking down how/why > right now. So this was fun thing to learn... An undocumented (yay) feature of python appears to be... python binds to a random port on all interfaces (0.0.0.0)

[Twisted-Python] Cause epollreactor to busyspin

2016-04-20 Thread Tim Hughes
Hi All, I have a latency sensitive application that gets affected when it is moved between cores or the system has to wake from idling. I would like to run the thread in as tight a loop as possible and to do this i need to cause epollreactor to busyspin on receiving data. I have worked out

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Jonathan Vanasco
Thanks all. I was going to write everything below, then finally tracked it down. A specific library was keeping the port open. I'm tracking down how/why right now. The worry on this, FYI, was that there is a critical vulnerability in glibc from a few months ago where a server could be

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Jean-Paul Calderone
Hi, What do the logs for the app say? Twisted logs a message when it binds a UDP port. Or, another though, you could put a breakpoint on listenUDP (or socket.bind or something) and then run the process under pdb and look at the stack trace. You could also try sending some traffic to the port

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Phil Mayers
On 20/04/16 01:01, Glyph wrote: Perhaps this is libc's DNS client? Twisted doesn't do anything like this. It does something similar with win32reactor IIRC? http://twistedmatrix.com/trac/browser/tags/releases/twisted-16.1.1/twisted/internet/posixbase.py#L60 ...but that binds to 127.0.0.1