Bug 1408273 - "OSError: [Errno 98] Address already in use"
Summary: "OSError: [Errno 98] Address already in use"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3-py3dns
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-22 17:18 UTC by Harald Reindl
Modified: 2017-02-14 15:48 UTC (History)
5 users (show)

Fixed In Version: python3-py3dns-3.1.1-1.fc25 python3-py3dns-3.1.1-1.fc24
Clone Of:
Environment:
Last Closed: 2017-02-13 22:21:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1184102 0 None None None 2017-01-18 05:23:14 UTC

Description Harald Reindl 2016-12-22 17:18:50 UTC
"OSError: [Errno 98] Address already in use" - why does that stuff deal at it's own with the source-port? on a busy machine running dns-resolvers and all sort of milters and deamons for mail-processing that is racy by definition

it happens not too often because a majority of junk is blocked here by psoscreen and RBL scoring as well as a very strict rate-limiting just dropping new connections after hit from a source IP
________________________________

logwatch for 24 hours

 **Unmatched Entries**
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]: During handling of the above exception, another exception occurred:
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1182, in dns_txt
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/libexec/postfix/policyd-spf", line 531, in _spfcheck
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]: OSError: [Errno 98] Address already in use
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 608, in check1
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 569, in check
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 564, in check
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1216, in <listcomp>
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]: OSError: [Errno 98] Address already in use
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]: TypeError: 'OSError' object is not subscriptable
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]: During handling of the above exception, another exception occurred:
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/libexec/postfix/policyd-spf", line 707, in <module>
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/libexec/postfix/policyd-spf", line 531, in _spfcheck
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]: TypeError: 'OSError' object is not subscriptable
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 922, in check0
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1216, in dns_mx
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/libexec/postfix/policyd-spf", line 707, in <module>
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1133, in dns_spf
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup
        1   Dec 21 13:16:38 mail-gw policyd-spf[10092]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1222, in dns_a
        1   Dec 21 17:11:45 mail-gw policyd-spf[30809]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn

________________________________

Dec  6 12:03:20 mail-gw policyd-spf[8410]: Traceback (most recent call last):
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    self.s.bind(('', source_port))
Dec  6 12:03:20 mail-gw policyd-spf[8410]: OSError: [Errno 98] Address already in use
Dec  6 12:03:20 mail-gw policyd-spf[8410]: 
Dec  6 12:03:20 mail-gw policyd-spf[8410]: During handling of the above exception, another exception occurred:
Dec  6 12:03:20 mail-gw policyd-spf[8410]: Traceback (most recent call last):
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/libexec/postfix/policyd-spf", line 707, in <module>
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    instance_dict, configData, peruser)
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/libexec/postfix/policyd-spf", line 419, in _spfcheck
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    res = spf.check2(ip, helo_fake_sender, helo, querytime=configData.get('Lookup_Time'))
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check()
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 569, in check
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    rc = self.check1(spf, self.d, 0)
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 608, in check1
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    return self.check0(spf, recursion)
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 917, in check0
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    if self.cidrmatch(self.dns_a(arg,self.A), cidrlength):
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1222, in dns_a
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    r = self.dns(domainname, A)
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    for k, v in DNSLookup(name, qtype, self.strict, timeout):
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    resp = req.req()
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    self.sendUDPRequest(server)
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    self.conn()
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    self.getSource()
Dec  6 12:03:20 mail-gw policyd-spf[8410]:  File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource
Dec  6 12:03:20 mail-gw policyd-spf[8410]:    if msg[0] != 98: raise
Dec  6 12:03:20 mail-gw policyd-spf[8410]: TypeError: 'OSError' object is not subscriptable

Comment 1 Anthony Messina 2017-01-14 18:31:08 UTC
This occurs in F25 as well.

Comment 2 Bojan Smojver 2017-01-18 05:23:15 UTC
It is possible that this is actually a python3-py3dns bug. According to just linked Launchpad bug, we need to be bringing 3.1.1 into fedora to get this fixed.

Comment 3 Alex Regan 2017-02-01 17:52:16 UTC
I'm also having this problem. Is there a temporary workaround? Which recent update caused this? Is it possible to back off the update and revert to a previous version?

Feb  1 12:47:53 mail03 policyd-spf[5364]: OSError: [Errno 98] Address already in use
Feb  1 12:47:53 mail03 policyd-spf[5364]: TypeError: 'OSError' object is not subscriptable
Feb  1 12:47:53 mail03 postfix/smtpd[5273]: warning: missing attribute action in input from private/policy-spf
Feb  1 12:47:53 mail03 postfix/spawn[5363]: warning: command /usr/libexec/postfix/policyd-spf exit status 1

When is the anticipated fix going to be available?

Comment 4 Harald Reindl 2017-02-01 17:54:58 UTC
maybe the problem existed long long ago and only got visible by the switch to python3 - that would explain RANDOM wrong SPF handling (whitelist_auth) of SpamAssassin over a very long time and so downgrade whatever would just mask it again but not fix it

Comment 5 Bojan Smojver 2017-02-02 00:40:39 UTC
If I'm reading that launchpad bug correctly, the issue is with the version of python3-py3dns that is in Fedora. This needs to be updated. I'm hoping maintainers of that package are reading this bug.

Comment 6 Fedora Update System 2017-02-02 17:46:09 UTC
python3-py3dns-3.1.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-29283660bd

Comment 7 Fedora Update System 2017-02-02 17:46:18 UTC
python3-py3dns-3.1.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b6bcc20b0c

Comment 8 Fedora Update System 2017-02-03 22:54:48 UTC
python3-py3dns-3.1.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b6bcc20b0c

Comment 9 Fedora Update System 2017-02-03 23:49:57 UTC
python3-py3dns-3.1.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-29283660bd

Comment 10 Fedora Update System 2017-02-13 22:21:59 UTC
python3-py3dns-3.1.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-02-13 22:47:41 UTC
python3-py3dns-3.1.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-02-14 15:48:40 UTC
python3-py3dns-3.1.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.