Wednesday, 2024-12-11

hberaud[m]@itamarst ongoing release https://github.com/eventlet/eventlet/pull/100808:57
ralonsohhi hberaud[m], I've identified the issue with RPC (oslo.messaging), Neutron and eventlet09:45
ralonsohthis is the last patch pushed: https://github.com/eventlet/eventlet/commit/06ec82896ebb9a26edaf6e1ad4d63393990f15b7#diff-029df1ae9b7431e9cdd6fa95ae7a2eed832727e6054f7f4b050f3d2c754e8816R36709:45
ralonsohand makes sense because the error we are receiving is related to 09:45
ralonsohself._cond = threading.Condition()09:46
ralonsohhttps://paste.opendev.org/show/bwb1L0WAhKAODIWyiep1/09:46
hberaud[m]I'd argue that normally it should be fixed by https://github.com/eventlet/eventlet/pull/100209:46
hberaud[m]sorry wrong link09:46
hberaud[m]https://github.com/eventlet/eventlet/issues/100109:47
hberaud[m]which python version are you using?09:48
ralonsoh3.1009:48
ralonsohSo the last patch in the repo should fix that?09:49
ralonsohI can try it09:49
hberaud[m]ah if you are using python 3.10 then that could be something else09:51
hberaud[m]but, yeah, please try it with the latest version, just to be sure09:52
hberaud[m]there is also another ongoing release09:52
ralonsohI'm still seeing this error with eventlet master09:58
hberaud[m]ack09:59
ralonsohthe call "_green_existing_locks(original_rlock_type)" is breaking somehow the existing rlocks09:59
hberaud[m]ralonsoh: please can you fill a github issue with your observations, and, if possible a reproducer?09:59
ralonsohbut the rlock is created before, when "self._cond = threading.Condition()" is called10:00
ralonsohhberaud[m], right now10:00
hberaud[m]thanks10:00
ralonsohhberaud[m], ohhh my, I think this is **our** error (Neutron error)10:05
ralonsohwe are multi monkey_patching!!10:05
hberaud[m]indeed, could be the problem10:05
ralonsohif I add a condition to check if monkey_patched has been called, everything works10:05
ralonsohpfffff10:05
ralonsohsorry for the noise!10:05
hberaud[m]no problem10:05
ralonsoh(1 day because of this)10:05
hberaud[m]ralonsoh: but10:05
hberaud[m]you could interested by https://github.com/eventlet/eventlet/pull/100510:06
hberaud[m](not yet released)10:06
ralonsohahhhhh exactly this!10:07
ralonsohyes10:07
ralonsohwe need (1) monkey patch ASAP and (2) do it only once10:07
hberaud[m]Eventlet is like an escape game...10:09
fricklerso running "EVENTLET_MONKEYPATCH=1 tox -e py3" seems to explode pretty early for multiple repos where I tried that (with 0.39.0)12:09
fricklerI'm also seeing some weird issue with heat unit tests, with eventlet >= 0.37.0 some of the individual tests take about 3s each instead of like 30ms, causing job timeouts. the tests are still passing though12:11
fricklerif you want to reproduce, take a subset like "tox -e py3 heat.tests.clients.test_clients", that gives me 20s vs. 5m12:12
frickler(also please complain if eventlet-bumping is considered offtopic here, as that's not actually removing it)12:13
hberaud[m]frickler: thanks for the heads up12:35
hberaud[m]frickler: no problem, having this kind of discussion help us to triagge things and to observe problem as soon as possible12:37
hberaud[m]s/triage/12:38
amorinone question about EVENTLET_MONKEYPATCH=1. If we do that, do we need to remove all eventlet.monkey_patch() from code? I am asking because of ralonsoh message stating that we should do it only once?13:52
ralonsohamorin, but there will be some kind of variable/method to know that13:54
ralonsohI mean, to know if eventlet did the monkey_patch by its own13:54
amorinfrom your patch here: https://review.opendev.org/c/openstack/neutron/+/93752713:56
amorinif we do EVENTLET_MONKEYPATCH=1 tox -e py313:56
amorinit will monkey_patch twice, isn't it?13:56
ralonsohyes, and without this patch it will call monkey_patch 3 times13:57
ralonsohso this method in Neutron should also consider the env variable EVENTLET_MONKEYPATCH13:57
ralonsohis that correct?13:57
amorinok, that's what I understand also, correct for me13:58
ralonsohperfect, I'll propose another patch saying that this will required with eventlet 0.39.013:58
itamarstDoes OpenStack still support Python 3.8?15:32
itamarstwondering if we can drop support from eventlet or if I should try to make it work15:32
hberaud[m]itamarst: https://governance.openstack.org/tc/reference/runtimes/2025.1.html15:53
hberaud[m]technically, it is not anymore supported15:53
hberaud[m]but I suppose that lot of deliverables still test it in some ways15:54
hberaud[m](openstack deliverables)15:54
hberaud[m]amorin: concerning the EVENTLET_MONKEYPATCH=1, IIUC it will avoid to monkey patche our projects here and there thousand of times. itamarst correct me if I'm wrong15:56
itamarstok, I'm working on fix16:00
itamarstre EVENTLET_MONKEYPATCH, the issue is you want to monkey patch before _anything_ gets imported16:00
itamarstand this can be very difficult16:00
itamarste.g. if you're running tests, the stdlib unittest module may import asyncio, which we don't want16:01
itamarstso this way the patching happens even before e.g. a test runner starts up16:01
itamarstit's probably also helpful for applications, yes, although it's a little trickier there because if you don't set that env variable your application is now broken16:02
itamarstand also maybe less necessary because you have control of the application (vs e.g. pytest or stestr or whatever where you don't)16:02
hberaud[m]ralonsoh: FYI ^16:03
ralonsohhberaud[m], I've proposed a patch16:03
amorinI did try to use EVENTLET_MONKEYPATCH and removed all call of monkey_patch from mistral code before running py3. I am ending in some sort of infinite loop16:03
ralonsohhttps://review.opendev.org/c/openstack/neutron/+/93753516:03
amorin    super(SSLContext, SSLContext).verify_mode.__set__(self, value)16:03
amorin  [Previous line repeated 481 more times]16:03
amorinhave you hit that somewhere maybe on neutron side?16:04
amorin(I am using python3.10)16:04
ralonsohamorin, what library is that? 16:04
ralonsohok, yes but I dont' remember now where...16:04
amorinhere is the full stacktrace: https://plik.ovh/file/W6OJ1yYpFgcEfrnY/YU1Bz0piLyXjFghx/t16:06
ralonsohyes  yes one sec16:06
ralonsohamorin, https://review.opendev.org/c/openstack/neutron/+/92537616:07
ralonsohhttps://bugs.launchpad.net/neutron/+bug/207514716:07
ralonsohthis is your problem16:07
ralonsohI need to go now, please ping me tomorrow if you still have problems16:07
amorinthanks!16:08
itamarstah so16:08
itamarstI guess that's a problem with EVENTLET_MONKEYPATCH which is maybe worth documenting16:08
itamarstit will patch _all_ Python programs16:08
itamarstor it could be solved by removing the env variable on startup, which is maybe a better idea16:09
itamarstno that wouldn't solve it16:09
itamarstso yeah maybe better just to use it for testing16:10
itamarstand not recommend people use it16:10
itamarsthberaud[m]: gonna file an issue for that I guess :(16:10
itamarstI really hate eventlet :(16:10
hberaud[m]yeah eventlet is a nightmare16:11
hberaud[m]ack16:11
hberaud[m]thanks for your clarifications16:11
itamarstI filed an issue and will update docs etc16:13
itamarst😢16:13
hberaud[m]thanks16:26
JayFthere's something mildly humorous about the fact that eventlet is the best maintained it's been in years ... because we're trying to get rid of it16:36
itamarstit's possible EVENTLET_MONKEYPATCH isn't actually what I need for oslo.log either16:43
itamarstand that I misdiagnosed problem, and you need to just create the hub early, rather than monkey patch early16:47
frickleramorin: are you running tox with that env var set or what command produces your stacktrace?16:58
itamarstnote that EVENTLET_MONKEYPATCH is not in any released version and might get ripped out depending how my experiments go17:04
itamarstyep, gonna rip it out17:24
itamarstthis whole thing is soooo brittle18:09
JayFI'm honestly more than a little excited about the state of things once we've excised eventlet from everything. Wondering how many little random breakages/edge cases are going to melt away. 18:14
itamarstono18:19
itamarstasyncio hub's thing means there might be _two_ original unpatched threading modules in existence 😭18:20
itamarstso maybe I'm introducing subtle bizarre bugs18:20
itamarstI am also actively trying ton ot think about all the new brokenness I keep encountering18:51
itamarstthe idea that you have multiple copies of a stdlib module is sooo broken19:17
itamarstit's possible a rewrite of the monkey patching system might need to happen, but not going to try that unless it becomes clearly necessary19:20
-opendevstatus- NOTICE: Gerrit will undergo a short restart to pick up some bugfixes for the 3.10 release that we upgraded to.19:25
itamarstor maybe much more fine grained monkeypatching for asyncio modules 19:29
itamarstor rather, unmonkeypatching19:29

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!