Bug 2133853
| Summary: | Downstream-only patch in Python 3: #371 Revert "bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589)" | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomas Orsava <torsava> |
| Component: | python3.13 | Assignee: | Victor Stinner <vstinner> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | cstratak, ksurma, mhroncok, python-maint, python-packagers-sig, thrnciar, torsava, vstinner |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python3.13-3.13.0~a6-2.fc41 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-05-02 19:03:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2244836 | ||
|
Description
Tomas Orsava
2022-10-11 15:19:24 UTC
Previously tracked in BZ#1287556. The revert was motivated by a FreeIPA+mod_wsgi failure. First report of this issue: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e152ce5f31#comment-2278745 Lumir then reported the issue to mod_wsgi: https://github.com/GrahamDumpleton/mod_wsgi/issues/730 mod_wsgi shutdown was modified in version 4.9.1 to better handle Python 3.9 shutdown: https://modwsgi.readthedocs.io/en/master/release-notes/version-4.9.1.html#features-changed Fedora 36 provides python3-mod_wsgi version 4.9.0-3.fc36. > Fedora 36 provides python3-mod_wsgi version 4.9.0-3.fc36. That was not good enough to remove the patch, see bz2100282. I tried to reproduce the issue, but so far I failed. == Step 1: Install FreeIPA and test it without the bug == I installed a fresh Fedora 38 VM. I set the hostname to "server.ipa.test" and I added "192.168.122.17 server.ipa.test" to /etc/hosts. The "server.ipa.test" hostname must not be used as localhost in /etc/hosts. I ran the following commands as root to install FreeIPA: --- firewall-cmd --add-service=freeipa-ldap --add-service=freeipa-ldaps firewall-cmd --add-service=freeipa-ldap --add-service=freeipa-ldaps --permanent dnf install freeipa-server ipa-server-install --- I added "vstinner" user. I tested kinit: --- [vstinner@server ~]$ kinit admin Password for admin: --- It works. I tested a different user: --- [vstinner@server ~]$ kinit vstinner Password for vstinner: --- It works as well. On the host, my laptop, I added "server.ipa.test" hostname to /etc/hosts as 127.0.0.1: --- 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 server.ipa.test --- To test the web interface, I ran the following command to expose VM tcp/443 as tcp/443 local port on the host (my laptop): sudo ssh -L 443:localhost:443 vstinner@fedora I open https://server.ipa.test/ipa/ui/ in Firefox: * I log in as "admin" * The UI lists users * I can see an user details by clicking on an user == Step 2: try to reproduce the bug == To introduce the bug, I built Python manually: --- wget 'https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz' tar -xf Python-3.11.6.tar.xz cd Python-3.11.6 ./configure --prefix /usr --with-platlibdir=lib64 --libdir=/usr/lib64 --enable-shared make -j8 --- I created a backup of system Python in ~/BACKUP: --- mkdir ~/BACKUP cd ~/BACKUP cp /usr/bin/python3.11 . cp /lib64/libpython3.11.so.1.0 . --- I override Python with: --- SRC=/home/vstinner/Python-3.11.6 # needed to override /usr/bin/python3.11 program sudo systemctl stop ipa sudo systemctl stop firewalld sudo cp $SRC/python /usr/bin/python3.11 sudo cp $SRC/libpython3.11.so.1.0 /lib64/libpython3.11.so.1.0 --- Then I restarted FreeIPA and firewalld: --- sudo systemctl start ipa sudo systemctl start firewalld --- I did again kinit and web UI tests. Finally, I tried to reproduce the bug with: --- [vstinner@server ~]$ time sudo systemctl stop ipa real 0m3.970s user 0m0.014s sys 0m0.019s --- Problem: FreeIPA stops in less than 5 seconds, it does not time out after 90 seconds. My test is incomplete. Links about this issue: * https://bodhi.fedoraproject.org/updates/FEDORA-2021-e152ce5f31 * https://pagure.io/freeipa/issue/9034 * https://github.com/GrahamDumpleton/mod_wsgi/issues/730 * https://src.fedoraproject.org/rpms/python3.11/blob/rawhide/f/00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-gh-28549-gh-28589.patch * https://bugzilla.redhat.com/show_bug.cgi?id=2133853 For the record, when upgrading python3.13 from 3.13.0a5 to 3.13.0a6, we removed the patch/revert, as it no longer applies at all after https://github.com/python/cpython/commit/33da0e844c922b3dcded75fbb9b7be67cb013a17 We need to monitor the freeipa situation and rework the patch entirely in case it is still needed. I am setting this to block the PYTHON3.13 tracker, not to forget. Testing with OpenQA + Python 3.13 Copr. It works now without the patch. https://openqa.stg.fedoraproject.org/tests/3847928 It seems that we no longer need the patch. |