Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919052 - dev-python/pycurl-7.45.2-r1 tests hang in tests/multi_socket_test.py::MultiSocketTest::test_multi_socket
Summary: dev-python/pycurl-7.45.2-r1 tests hang in tests/multi_socket_test.py::MultiSo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2023-12-02 17:23 UTC by Jonathan Lovelace
Modified: 2024-02-29 07:03 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python:pycurl-7.45.2-r1:20231201-221722.log (dev-python:pycurl-7.45.2-r1:20231201-221722.log,70.32 KB, text/plain; charset=utf-8)
2023-12-02 17:23 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,9.26 KB, text/plain; charset=utf-8)
2023-12-02 17:24 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2023-12-02 17:23:19 UTC
On my system, the test suite of =dev-python/pycur-7.45.2-r1 hangs in the test tests/multi_socket_test.py::MultiSocketTest::test_multi_socket . In the first try at building the package (log attached), I finally killed the package after 13 hours. (qlop says that the average time it's taken to build in the past is "1′02″ average for 45 merges".) The next attempt is still going after more than an hour and a half.
Comment 1 Jonathan Lovelace 2023-12-02 17:23:50 UTC
Created attachment 876415 [details]
dev-python:pycurl-7.45.2-r1:20231201-221722.log
Comment 2 Jonathan Lovelace 2023-12-02 17:24:27 UTC
Created attachment 876416 [details]
emerge-info.txt
Comment 3 M Sirabella 2023-12-19 22:49:01 UTC
Seeing the same issue, of note is that test_multi_socket_action & test_multi_socket_select both previously fail prior to this happening.
Comment 4 M Sirabella 2023-12-19 23:10:24 UTC
Yeah, the prior failures seem related, if you run the tests like this: pytest -k test_multi_socket

then the two previously mentioned failing tests fail & the third test hangs, if you run specifically just the hanging test: pytest -k test_multi_socket_select

then just that one fails

There are similar reports of failing/hanging tests on the github:

https://github.com/pycurl/pycurl/issues/819
https://github.com/pycurl/pycurl/issues/12
Comment 5 Alfred Wingate 2023-12-20 01:25:45 UTC
I see the tests pass with curl-8.3.0-r2, but fail with 8.4.0 and 8.5.0.

Most likely some change in multi lead to this.

multi: do CURLM_CALL_MULTI_PERFORM at two more places
multi: fix small timeouts
multi: remove Curl_multi_dump
multi: round the timeout up to prevent early wakeups
multi: set CURLM_CALL_MULTI_PERFORM after switch to DOING_MORE
Comment 6 M Sirabella 2023-12-21 18:54:37 UTC
> tests pass with curl-8.3.0-r2, but fail with 8.4.0

can confirm that downgrading curl to 8.3.0 fixes this for me (was seeing the issue on 8.4.0)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-28 00:05:50 UTC
commit b450193edb70aa6c5f80fd1c2797e4f3570c187c
Author: Michał Górny <mgorny@gentoo.org>
Date:   Mon Feb 19 21:36:07 2024 +0100

    dev-python/pycurl: Bump to 7.45.3

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

adds timeouts & skips for the bad ones for now.
Comment 8 Gabi Falk 2024-02-28 12:14:40 UTC
(In reply to Sam James from comment #7)
> commit b450193edb70aa6c5f80fd1c2797e4f3570c187c
> Author: Michał Górny <mgorny@gentoo.org>
> Date:   Mon Feb 19 21:36:07 2024 +0100
> 
>     dev-python/pycurl: Bump to 7.45.3
> 
>     Signed-off-by: Michał Górny <mgorny@gentoo.org>
> 
> adds timeouts & skips for the bad ones for now.

I suppose a similar workaround should be added to the stable pycurl-7.45.2-r1?
Comment 9 Larry the Git Cow gentoo-dev 2024-02-29 07:03:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf3840abb9f8b7a7efc03bcd4c2ad8fcb5fab297

commit bf3840abb9f8b7a7efc03bcd4c2ad8fcb5fab297
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-29 07:02:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-29 07:03:29 +0000

    dev-python/pycurl: backport test improvements to stable
    
    Backport the test improvements from b450193edb70aa6c5f80fd1c2797e4f3570c187c
    so we don't have tests hanging forever in the stable ebuild.
    
    Closes: https://bugs.gentoo.org/919052
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/pycurl/pycurl-7.45.2-r1.ebuild | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)