
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-08-10 20:29 byakhramov, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| connect_eintr.py | akhramov,2019-08-10 20:29 | Repro | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 15202 | merged | akhramov,2019-08-10 20:32 | |
| PR 15289 | merged | miss-islington,2019-08-14 21:22 | |
| PR 15290 | merged | miss-islington,2019-08-14 21:22 | |
| Messages (8) | |||
|---|---|---|---|
| msg349356 -(view) | Author: Artem Khramov (akhramov)* | Date: 2019-08-10 20:29 | |
FreeBSD implementation of poll(2) restricts timeout argument to be either zero, or positive, or equal to INFTIM (-1).Unless otherwise overridden, socket timeout defaults to -1. This value is then converted to milliseconds (-1000) and used as argument to the poll syscall.poll returns EINVAL (22), and the connection fails.I have discovered this bug during the EINTR handling testing, and have naturally found a repro code inhttps://bugs.python.org/issue23618 (see connect_eintr.py, attached). On GNU/Linux, the example runs as expected. | |||
| msg349382 -(view) | Author: Hai Shi (shihai1991)*![]() | Date: 2019-08-11 09:42 | |
I found an OS distinguishing behavior inhttps://github.com/python/cpython/blob/master/Modules/selectmodule.c#L603-L612 | |||
| msg349383 -(view) | Author: Kubilay Kocak (koobs)![]() | Date: 2019-08-11 09:47 | |
See Also:#31334 | |||
| msg349753 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-08-14 21:18 | |
> See Also:#31334Oh, I didn't knowbpo-31334. This issue is basically a duplicate ofbpo-31334, but triggered differently. | |||
| msg349754 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-08-14 21:21 | |
New changeset28146206578ebe1b84b48e6f255738a227058c04 by Victor Stinner (Artem Khramov) in branch 'master':bpo-37811: FreeBSD, OSX: fix poll(2) usage in sockets module (GH-15202)https://github.com/python/cpython/commit/28146206578ebe1b84b48e6f255738a227058c04 | |||
| msg349760 -(view) | Author: miss-islington (miss-islington) | Date: 2019-08-14 21:47 | |
New changeset123f6c4914827c4ced65d032fab74de62db31cd6 by Miss Islington (bot) in branch '3.8':bpo-37811: FreeBSD, OSX: fix poll(2) usage in sockets module (GH-15202)https://github.com/python/cpython/commit/123f6c4914827c4ced65d032fab74de62db31cd6 | |||
| msg349761 -(view) | Author: miss-islington (miss-islington) | Date: 2019-08-14 21:48 | |
New changesetb0b178a2b80974da910ce6a344d66cc4d9a2fcfa by Miss Islington (bot) in branch '3.7':bpo-37811: FreeBSD, OSX: fix poll(2) usage in sockets module (GH-15202)https://github.com/python/cpython/commit/b0b178a2b80974da910ce6a344d66cc4d9a2fcfa | |||
| msg349772 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-08-14 22:38 | |
Thanks Artem Khramov for the nice analysis of the root issue! And thanks for the fix! The bug is now fixed in 3.7, 3.8 and master branches.Python 2.7 is not affected: I added sock_call_ex() helper function in Python 3 when I implemeneted thePEP 475 (Retry system calls failing with EINTR). | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:18 | admin | set | github: 81992 |
| 2019-08-14 22:38:37 | vstinner | set | status: open -> closed versions: - Python 2.7, Python 3.5, Python 3.6 messages: +msg349772 resolution: fixed stage: patch review -> resolved |
| 2019-08-14 21:48:07 | miss-islington | set | messages: +msg349761 |
| 2019-08-14 21:47:49 | miss-islington | set | nosy: +miss-islington messages: +msg349760 |
| 2019-08-14 21:22:21 | miss-islington | set | pull_requests: +pull_request15014 |
| 2019-08-14 21:22:15 | miss-islington | set | pull_requests: +pull_request15013 |
| 2019-08-14 21:21:52 | vstinner | set | messages: +msg349754 |
| 2019-08-14 21:18:25 | vstinner | set | nosy: +vstinner messages: +msg349753 |
| 2019-08-14 03:22:20 | akhramov | set | nosy: +ned.deily,ronaldoussoren components: + Library (Lib), macOS, IO, FreeBSD |
| 2019-08-11 09:47:38 | koobs | set | messages: +msg349383 |
| 2019-08-11 09:43:58 | koobs | set | nosy: +koobs |
| 2019-08-11 09:42:12 | shihai1991 | set | nosy: +shihai1991 messages: +msg349382 |
| 2019-08-10 20:32:19 | akhramov | set | keywords: +patch stage: patch review pull_requests: +pull_request14931 |
| 2019-08-10 20:29:31 | akhramov | create | |