** Description changed:
+ [Impact]
+
+ * Causes random tracebacks on DNS lookups when break functionality of
+ packages that use the module. In the case the bug was filed for, the
+ impact would be a postfix server returning servfail and deferring
+ message traffic.
+
+ * The code represents a missed change for the port from python to
+ python3.
+
+ [Test Case]
+
+ * This bug only happens when multiple DNS queries attempt to use the
+ same port at the same time. It's very difficult to reproduce and as far
+ as I know impossible to do it consistently. The attached script
+ demonstrates the new code working and the old code failing. That and
+ code inspection are the best ways to verify this.
+
+ [Regression Potential]
+
+ * Regression potential is nil.
+
Note: This is an extract from a private bug.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/DNS/Base.py", line 192, in getSource
self.s.bind(('', source_port))
OSError: [Errno 98] Address already in use
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/policyd-spf", line 662, in <module>
instance_dict, configData, peruser)
File "/usr/bin/policyd-spf", line 508, in _spfcheck
res = spf.check2(ip, sender, helo)
File "/usr/lib/python3/dist-packages/spf.py", line 363, in check2
receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check()
File "/usr/lib/python3/dist-packages/spf.py", line 607, in check
spf = self.dns_spf(self.d)
File "/usr/lib/python3/dist-packages/spf.py", line 1179, in dns_spf
a = [t for t in self.dns_txt(domain) if RE_SPF.match(t)]
File "/usr/lib/python3/dist-packages/spf.py", line 1227, in dns_txt
dns_list = self.dns(domainname, rr)
File "/usr/lib/python3/dist-packages/spf.py", line 1357, in dns
for k, v in DNSLookup(name, qtype, self.strict, timeout):
File "/usr/lib/python3/dist-packages/spf.py", line 193, in DNSLookup
resp = req.req()
File "/usr/lib/python3/dist-packages/DNS/Base.py", line 238, in req
self.sendUDPRequest(server)
File "/usr/lib/python3/dist-packages/DNS/Base.py", line 263, in sendUDPRequest
self.conn()
File "/usr/lib/python3/dist-packages/DNS/Base.py", line 199, in conn
self.getSource()
File "/usr/lib/python3/dist-packages/DNS/Base.py", line 196, in getSource
if msg[0] != 98: raise
TypeError: 'OSError' object is not subscriptable
warning: missing attribute action in input from private/policyd-spf
warning: command /usr/bin/policyd-spf exit status 1
Note that the policy server exiting non-zero will intefere with mail
delivery.
** Attachment added: "Reduced test case showing the problem and the fix"
https://bugs.launchpad.net/ubuntu/+source/py3dns/+bug/1318264/+attachment/4109593/+files/dns_sockettest.py
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1318264
Title:
Fix traceback to correctly deal with source port already in use errors
To manage notifications about this bug go to:
https://bugs.launchpad.net/py3dns/+bug/1318264/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs