<div dir="ltr">The oslo patches have been approved, I'll propose a new release, in a couple of hours, when they will be merged.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 5 sept. 2022 à 18:27, Balazs Gibizer <<a href="mailto:gibi@redhat.com">gibi@redhat.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
It is hard to properly figure out which OpenStack project is affected <br>
exactly. But I want to give a heads up. If the following is true for <br>
your project then you are affected:<br>
* using eventlet and<br>
* using oslo.concurrency fair internal lock (external lock or non fair <br>
locks are not affected) or using fasteners.ReaderWriterLock directly.<br>
<br>
I know that nova is affected and based on code search taskflow is <br>
affected at least.<br>
<br>
The oslo.concurrency's fair lock uses fasteners.ReaderWriterLock[1]. <br>
The fasteners.ReaderWriterLock relies on threading.current_thread to <br>
identify a thread and decide if a thread already has a lock and <br>
therefore can reenter the lock. However in an eventlet monkey patched <br>
environment, a thread that is created with eventlet.spawn_n() or the <br>
patched threading.Thread() the threading.current_thread call does not <br>
return an eventlet unique ID. This causes that the lock can be <br>
reentered from multiple eventlets at the same time.<br>
<br>
We have 4 ways forward:<br>
<br>
0) Fix eventlet. There is an open issue in eventlet[3] for this open <br>
since October 2021. Based on the ticket this direction does not seems <br>
to feasible.<br>
<br>
1) Sean recently opened an issue[4] on fasteners to restore a <br>
previously existing workaround that could fix our issues. If an new <br>
fasteners lib is released with the workaround[5] then at least <br>
oslo.concurrency requirements needs to be bumped and a new oslo release <br>
is pushed.<br>
<br>
2) If the fasteners' maintainer does not accept [4][5] in time then I <br>
have an oslo.concurrency patch[6] that implements a workaround in oslo. <br>
This also requires a new olso.concurrency release. Also this means that <br>
projects that are using fasteners.ReaderWriterLock directly need to <br>
re-implement the fix locally.<br>
<br>
3) If all odds fails I have a nova only patch[7] that implements the <br>
workaround locally in nova.<br>
<br>
<br>
Note that this issue is present in stable/yoga and on master. On <br>
stable/xena we uses fasteners < 0.15.0 which is not affected.<br>
<br>
Cheers,<br>
gibi<br>
<br>
[1] <br>
<a href="https://github.com/openstack/oslo.concurrency/blob/052b2f23572900601b0f41387dbbb07153d88982/oslo_concurrency/lockutils.py#L287-L288" rel="noreferrer" target="_blank">https://github.com/openstack/oslo.concurrency/blob/052b2f23572900601b0f41387dbbb07153d88982/oslo_concurrency/lockutils.py#L287-L288</a><br>
[2] <a href="https://bugs.launchpad.net/oslo.concurrency/+bug/1988311" rel="noreferrer" target="_blank">https://bugs.launchpad.net/oslo.concurrency/+bug/1988311</a><br>
[3] <a href="https://github.com/eventlet/eventlet/issues/731" rel="noreferrer" target="_blank">https://github.com/eventlet/eventlet/issues/731</a><br>
[4] <a href="https://github.com/harlowja/fasteners/issues/96" rel="noreferrer" target="_blank">https://github.com/harlowja/fasteners/issues/96</a><br>
[5] <a href="https://github.com/harlowja/fasteners/pull/97" rel="noreferrer" target="_blank">https://github.com/harlowja/fasteners/pull/97</a><br>
[6] <br>
<a href="https://review.opendev.org/q/topic:bug/1988311+project:openstack/oslo.concurrency" rel="noreferrer" target="_blank">https://review.opendev.org/q/topic:bug/1988311+project:openstack/oslo.concurrency</a><br>
[7] <br>
<a href="https://review.opendev.org/q/topic:bug/1988311+project:openstack/nova" rel="noreferrer" target="_blank">https://review.opendev.org/q/topic:bug/1988311+project:openstack/nova</a><br>
<br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Hervé Beraud</div><div>Senior Software Engineer at Red Hat</div><div>irc: hberaud</div><div><a href="https://github.com/4383/" target="_blank">https://github.com/4383/</a></div><div><a href="https://twitter.com/4383hberaud" target="_blank">https://twitter.com/4383hberaud</a><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div>