Opened 5 years ago

Closed 5 years ago

#3982 defect closed duplicate (duplicate)

twisted.names.client.getHostByName() UDP socket leak

Reported by: pythonologist Owned by:
Priority: normal Milestone:
Component: names Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

The utility function twisted.names.client.getHostByName() does not seem to close the UDP socket it opens, resulting over time in a build-up of UDP ports in use. See attached test program dns_test.py.

On Linux you can see the socket count increase via: lsof -i -nP | grep UDP | wc -l
On Windows it runs out of file descriptors after a period of 10 mins or so

Attachments (1)

dns_test.py (766 bytes) - added by pythonologist 5 years ago.
DNS test program

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by pythonologist

DNS test program

comment:1 Changed 5 years ago by exarkun

  • Resolution set to duplicate
  • Status changed from new to closed

I can't reproduce this with Twisted trunk@HEAD on Linux. What version of Twisted did you test this with?

On Windows, there is a known file descriptor leak; I think that with respect to that, this is a duplicate of #970.

comment:2 Changed 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.