Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build python failed on test_socket due to unused_port is actually used. #73953

Closed
ShuoLi mannequin opened this issue Mar 9, 2017 · 5 comments
Closed

build python failed on test_socket due to unused_port is actually used. #73953

ShuoLi mannequin opened this issue Mar 9, 2017 · 5 comments
Labels
build The build process and cross-build

Comments

@ShuoLi
Copy link
Mannequin

ShuoLi mannequin commented Mar 9, 2017

BPO 29767
Nosy @vstinner, @zhangyangyu

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-09-11.21:46:47.106>
created_at = <Date 2017-03-09.03:54:20.780>
labels = ['build']
title = 'build python failed on test_socket due to unused_port is actually used.'
updated_at = <Date 2017-09-11.21:46:47.104>
user = 'https://bugs.python.org/ShuoLi'

bugs.python.org fields:

activity = <Date 2017-09-11.21:46:47.104>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2017-09-11.21:46:47.106>
closer = 'vstinner'
components = ['Build']
creation = <Date 2017-03-09.03:54:20.780>
creator = 'Shuo Li'
dependencies = []
files = []
hgrepos = []
issue_num = 29767
keywords = []
message_count = 5.0
messages = ['289268', '289279', '289351', '289354', '301908']
nosy_count = 3.0
nosy_names = ['vstinner', 'xiang.zhang', 'Shuo Li']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue29767'
versions = ['Python 3.6']

@ShuoLi
Copy link
Mannequin Author

ShuoLi mannequin commented Mar 9, 2017

I am running a debian system. And trying to build cpython3.6 from source.
When I run make altinstall, it failed on test_socket. Reporting cli attribute is missing.

After some trouble shooting, it seems the support.get_unused_port() is not reliable. Then I modified it and return a port I am sure no one is using, the build succeeded.

@ShuoLi ShuoLi mannequin added the build The build process and cross-build label Mar 9, 2017
@zhangyangyu
Copy link
Member

Could you show the failure message here? And you could make your patch a PR on GitHub.

@ShuoLi
Copy link
Mannequin Author

ShuoLi mannequin commented Mar 10, 2017

The error message is just a "Port already used".

Possible cause 1: find_port default interface is HOST, which is 127.0.0.1. And in most test cases, they use 0.0.0.0. So they are on different interface.

2: system reuse the port, since I build python on a busy server, that is possible.

@ShuoLi
Copy link
Mannequin Author

ShuoLi mannequin commented Mar 10, 2017

Another error message:
Unhandled exception in thread started by <bound method ThreadableTest.clientRun of <test.test_socket.NetworkConnectionAttributesTest testMethod=testSourceAddress>>
Traceback (most recent call last):
  File "/tmp/python3.6/Python-3.6.0/Lib/test/test_socket.py", line 293, in clientRun
    self.clientTearDown()
  File "/tmp/python3.6/Python-3.6.0/Lib/test/test_socket.py", line 4379, in clientTearDown
    self.cli.close()
AttributeError: 'NetworkConnectionAttributesTest' object has no attribute 'cli'

@vstinner
Copy link
Member

I am sorry but it is not possible to fix the issue since we don't have enough information to identify or reproduce the bug.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

2 participants