Activity log for bug #1873435

Date Who What changed Old value New value Message
2020-04-17 10:52:37 Takashi Kajinami bug added bug
2020-04-17 10:55:51 Takashi Kajinami description When we use python2.7 and python-swiftclient-3.9.0, we observe that established connection is not closed after the method like get_account, get_container, and etc. returns. ~~~ >>> import swiftclient >>> url, token = swiftclient.get_auth(auth_url, ptoject + ':' + user, password, os_options={'user_domain_name': 'Default', 'project_name': ptojrvy}, auth_version=3)\ >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) ~~~ ~~~ vagrant@ubuntu1804:~$ lsof -p 16245 ... Output information may be incomplete. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME python 16245 vagrant cwd DIR 8,3 4096 400663 /home/vagrant/storlets ... python 16245 vagrant 3u IPv4 2193105 0t0 TCP localhost:52412->localhost:http-alt (ESTABLISHED) python 16245 vagrant 4u IPv4 2195534 0t0 TCP localhost:52800->localhost:http-alt (ESTABLISHED) python 16245 vagrant 5u IPv4 2195673 0t0 TCP localhost:52974->localhost:http-alt (ESTABLISHED) python 16245 vagrant 6u IPv4 2195695 0t0 TCP localhost:52978->localhost:http-alt (ESTABLISHED) python 16245 vagrant 7u IPv4 2195717 0t0 TCP localhost:52982->localhost:http-alt (ESTABLISHED) python 16245 vagrant 13r CHR 1,9 0t0 11 /dev/urandom ~~~ This issue was observed in storlets functional test, which use swiftclient to test api requests, and this causes 'too many open files' error because the test process keeps lots of established connections opened. We don't observe the same in our py3 tests, so it seems that this happens only on Python2.7. Also, we don't reproduce the issue after we switch to swiftclient 3.8.1, so the issue caused by some changes during 3.8.1 and 3.9.0 . When we use python2.7 and python-swiftclient-3.9.0, we observe that an connection established during a request is not closed after request method like get_account, get_container, and etc. returns. For example if you run 5 swiftclient.get_account ~~~ >>> import swiftclient >>> url, token = swiftclient.get_auth(auth_url, ptoject + ':' + user, password, os_options={'user_domain_name': 'Default', 'project_name': ptojrvy}, auth_version=3)\ >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) >>> swiftclient.get_account(url, token) ~~~ You see that the process still has 5 TCP connection in ESTABLISHED status. ~~~ vagrant@ubuntu1804:~$ lsof -p 16245 ...       Output information may be incomplete. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME python 16245 vagrant cwd DIR 8,3 4096 400663 /home/vagrant/storlets ... python 16245 vagrant 3u IPv4 2193105 0t0 TCP localhost:52412->localhost:http-alt (ESTABLISHED) python 16245 vagrant 4u IPv4 2195534 0t0 TCP localhost:52800->localhost:http-alt (ESTABLISHED) python 16245 vagrant 5u IPv4 2195673 0t0 TCP localhost:52974->localhost:http-alt (ESTABLISHED) python 16245 vagrant 6u IPv4 2195695 0t0 TCP localhost:52978->localhost:http-alt (ESTABLISHED) python 16245 vagrant 7u IPv4 2195717 0t0 TCP localhost:52982->localhost:http-alt (ESTABLISHED) python 16245 vagrant 13r CHR 1,9 0t0 11 /dev/urandom ~~~ This issue was observed in storlets functional tests, which use swiftclient to test api requests, and this remaining connections cause 'too many open files' error because the test process keeps lots of opened connections. We don't observe the same in our py3 tests, so it seems that this happens only on Python2.7. Also, we don't reproduce the issue after we switch to swiftclient 3.8.1, so the issue caused by some changes during 3.8.1 and 3.9.0 .
2020-04-19 05:47:39 Tim Burke python-swiftclient: status In Progress Confirmed
2020-04-19 05:49:30 Tim Burke python-swiftclient: importance Undecided High
2020-04-19 05:49:38 Tim Burke python-swiftclient: assignee Tim Burke (1-tim-z)
2020-04-20 02:08:13 OpenStack Infra python-swiftclient: status Confirmed In Progress
2020-09-19 03:44:35 OpenStack Infra python-swiftclient: status In Progress Fix Released