)]}'
{"id":"openstack%2Foslo.concurrency~855713","triplet_id":"openstack%2Foslo.concurrency~master~Ibc193c855b49b95b46ebd2aac82ea89e33f885f0","project":"openstack/oslo.concurrency","branch":"master","topic":"bug/1988311","attention_set":{},"removed_from_attention_set":{"9708":{"account":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"last_update":"2022-09-06 09:18:29.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"Ibc193c855b49b95b46ebd2aac82ea89e33f885f0","subject":"Prove that spawn_n with fair lock is broken","status":"MERGED","created":"2022-09-03 13:38:38.000000000","updated":"2022-09-06 09:19:40.000000000","submitted":"2022-09-06 09:18:29.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":1,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"855713-bug/1988311","meta_rev_id":"1ea19c35c23e1fd269e8f811b8d143e278f8cdfa","_number":855713,"virtual_id_number":855713,"owner":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":0,"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2022-09-06 09:18:28.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"all":[{"value":2,"date":"2022-09-05 14:56:38.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":2,"date":"2022-09-06 07:35:26.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"all":[{"value":0,"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":1,"date":"2022-09-06 07:35:26.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Backport-Candidate":{"all":[{"value":0,"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":0,"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do Not Backport","-1":"Not A Backport Candidate"," 0":"Backport Review Needed","+1":"Proposed Backport","+2":"Should Backport"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2022-09-03 16:44:16.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2022-09-05 14:56:38.000000000","updated_by":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"reviewer":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"state":"REVIEWER"},{"updated":"2022-09-06 07:35:26.000000000","updated_by":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"reviewer":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"state":"REVIEWER"}],"messages":[{"id":"b6eda006d4e3ce305ce17e490a3d163fd076b552","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2022-09-03 13:38:38.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"2708ef6504018532d2c4f29e8b9c8480cb3f7ec7","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2022-09-03 15:24:58.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"253be35462f1f099be43e1e2a14cccbab0e2479f","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-03 16:44:16.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/8bde26844dbb4106b03fc4eef91e43bc\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/f638c866cd7b49618a7f8bb959f04660 : SUCCESS in 1h 17m 27s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/a323701a259b46e99b8702f1d8688840 : SUCCESS in 3m 50s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/75e860f34ade435294c3af46ec9f24f2 : SUCCESS in 5m 31s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/2b6545781ebe44c686ffe01a40942b48 : SUCCESS in 3m 36s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/7be426de5644496fb623fd78ba01d372 : SUCCESS in 4m 14s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/32bde76f05814aa4bf0967a3bb475836 : SUCCESS in 4m 03s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/2f589112fa9a410fb5f30eabbf3e53eb : SUCCESS in 3m 29s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/99654e8216274b8c971ae7af187ecaba : SUCCESS in 4m 05s","accounts_in_message":[],"_revision_number":2},{"id":"0a1cecad4bd2d84c18ec0678a7569b02b75e3051","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2022-09-05 11:30:12.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"3e2a06b6d114815ad00907d3d2197973c4caaced","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-05 13:48:35.000000000","message":"Patch Set 3: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\n\nhttps://zuul.opendev.org/t/openstack/buildset/bdfbe1bbe97d42e8aaa99e2fd85985af\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/bc4d974e3f2c4cefb1bb42a1c0896427 : TIMED_OUT in 2h 12m 18s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/57260ca275c045d2b25a67dc19727005 : SUCCESS in 4m 33s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/9821ffbfb176477894727646b0b22ea5 : SUCCESS in 5m 44s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/30cb4e5eb24e43659499d390c76a22b2 : SUCCESS in 3m 51s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/731813755b5c47d0878375c0849ba3db : SUCCESS in 3m 20s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/e0eabedfee6d4792bbb600e715a34998 : SUCCESS in 3m 13s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/f0aa4faea6474cb3b7cffff730382225 : SUCCESS in 3m 07s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/23b746e25cd54f85993511b72096d104 : SUCCESS in 2m 37s","accounts_in_message":[],"_revision_number":3},{"id":"052a32e0a9abb9b49731dad64bf87a133e4ead8b","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2022-09-05 14:38:13.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"45e06d7766706b2836f85b4154ec1385ec46742a","author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"date":"2022-09-05 14:56:38.000000000","message":"Patch Set 3: Code-Review+2","accounts_in_message":[],"_revision_number":3},{"id":"14d8f0816cf65958cfb6b0ab77aefc247b575933","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-05 16:13:40.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/e868d1e8279b410590791679be20ac75\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/aec3ebcff53640138495d96a3c8abf99 : SUCCESS in 1h 33m 35s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/d0b66624325b43a689b5240cf8c2d468 : SUCCESS in 3m 52s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/e1decf5230494348b9e1d83acd7047ad : SUCCESS in 3m 42s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/0b3c18870c5840f99de7063792016f2c : SUCCESS in 4m 09s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/eae5d44035704991958f5d07e946f255 : SUCCESS in 4m 09s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/1d7a4824ce66439c8df2e25d20d6f731 : SUCCESS in 4m 06s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/27b61f8f00204057934b59e5c2e351d6 : SUCCESS in 3m 40s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/e43959589fd34b1e9241d78a504203c3 : SUCCESS in 4m 23s","accounts_in_message":[],"_revision_number":3},{"id":"39b879440b5b014390a881a7bd7f8681beeab83b","author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"date":"2022-09-06 07:35:26.000000000","message":"Patch Set 3: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":3},{"id":"ad6007c590f99cff94496dbb08b7db4102280cf9","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-06 07:35:59.000000000","message":"Patch Set 3: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":3},{"id":"80cb2c2fa8a5c94b5af919ba8ef2fad380788bc8","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-06 09:18:28.000000000","message":"Patch Set 3: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/5e71b77a3d824502ae9a5407d1b4113b\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/c7dc024de6e64cd3b54d472575cfa8dd : SUCCESS in 1h 37m 47s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/a00c5a71f7564b9eb74ccf8177112c1c : SUCCESS in 3m 25s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/3c299becc0f34270bb22df6c126de63b : SUCCESS in 3m 53s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/9cd6ef15dbcb45e39a2d565baba0162b : SUCCESS in 3m 48s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/a78fd40d7f3c45108427a3cc3ae1341b : SUCCESS in 4m 13s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/b0ac12b5a870456bb8c0f10f52c799a2 : SUCCESS in 3m 26s","accounts_in_message":[],"_revision_number":3},{"id":"a936e597f840aecdedaa5108ba5da8100ce100e9","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-06 09:18:29.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":3},{"id":"1ea19c35c23e1fd269e8f811b8d143e278f8cdfa","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-09-06 09:19:40.000000000","message":"Patch Set 3:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/a6266d8883cb4491a885d86138241217\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/e82b233124ee4e609803b3f0fb05a5be : SUCCESS in 52s\n- promote-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/5b91064864bf46759c660e263b55112b : SUCCESS in 46s","accounts_in_message":[],"_revision_number":3}],"current_revision_number":3,"current_revision":"796203c94846d44237d869e3b20a6cd8a3602e36","revisions":{"c2a4898b843dfa4878a7cc191d36e53108179f52":{"kind":"REWORK","_number":1,"created":"2022-09-03 13:38:38.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/13/855713/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/oslo.concurrency","ref":"refs/changes/13/855713/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/1"}}},"commit":{"parents":[{"commit":"052b2f23572900601b0f41387dbbb07153d88982","subject":"Merge \"Fix formatting of release list\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/052b2f23572900601b0f41387dbbb07153d88982"}]}],"author":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-03 11:16:56.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-03 13:38:30.000000000","tz":120},"subject":"Prove that spawn_n with fair lock is broken","message":"Prove that spawn_n with fair lock is broken\n\nThe fasteners lib in version 0.15.0 removed the\nthreading.current_thread workaround for eventlet[1] because eventlet\nseemed to fixed the current_thread issues tracked in [2]. However the\nfix for [2] only fixed half of the problem. The threading.current_thread\ncall works if it is called from thread created by eventlet.spawn.\nHowever if the thread is created with eventlet.spawn_n then\nthreading.current_thread is still broken and returns the ID of the\npython native thread.\n\nThe fasteners\u0027 ReaderWriterLock depends heavily on\nthreading.current_thread to decide which thread holds a lock and to\nallow re-entry of that thread. This leads to the situation that\nmultiple threads created from spawn_n could take the same\nReaderWriterLock at the same time.\n\nThe fair internal lock in oslo.concurrency uses ReaderWriterLock and\nas a result such lock is broken for threads created with spawn_n.\n\nNote that this issue was raised with eventlet in [3] when the nova team\ndetected it via a direct usage of ReaderWriterLock in the nova test\ncode. As [3] did not lead to a solution in eventlet nova implemented a\nnova local fix for the test code in [4].\n\nHowever now we detected that oslo.concurrency is affected by this issue\nas well.\n\nThis patch adds tests to show the scope of the problem.\n\n[1] https://github.com/harlowja/fasteners/commit/467ed75ee1e9465ebff8b5edf452770befb93913\n[2] https://github.com/eventlet/eventlet/issues/172\n[3] https://github.com/eventlet/eventlet/issues/731\n[4] https://review.opendev.org/c/openstack/nova/+/813114\n\nRelated-Bug: #1988311\nChange-Id: Ibc193c855b49b95b46ebd2aac82ea89e33f885f0\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/c2a4898b843dfa4878a7cc191d36e53108179f52"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/c2a4898b843dfa4878a7cc191d36e53108179f52"}]},"branch":"refs/heads/master"},"431b56d3831d9301faa09f23934ac784807475b9":{"kind":"REWORK","_number":2,"created":"2022-09-03 15:24:58.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/13/855713/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/oslo.concurrency","ref":"refs/changes/13/855713/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/2"}}},"commit":{"parents":[{"commit":"052b2f23572900601b0f41387dbbb07153d88982","subject":"Merge \"Fix formatting of release list\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/052b2f23572900601b0f41387dbbb07153d88982"}]}],"author":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-03 11:16:56.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-03 15:10:18.000000000","tz":120},"subject":"Prove that spawn_n with fair lock is broken","message":"Prove that spawn_n with fair lock is broken\n\nThe fasteners lib in version 0.15.0 removed the\nthreading.current_thread workaround for eventlet[1] because eventlet\nseemed to fixed the current_thread issues tracked in [2]. However the\nfix for [2] only fixed half of the problem. The threading.current_thread\ncall works if it is called from thread created by eventlet.spawn.\nHowever if the thread is created with eventlet.spawn_n then\nthreading.current_thread is still broken and returns the ID of the\npython native thread.\n\nThe fasteners\u0027 ReaderWriterLock depends heavily on\nthreading.current_thread to decide which thread holds a lock and to\nallow re-entry of that thread. This leads to the situation that\nmultiple threads created from spawn_n could take the same\nReaderWriterLock at the same time.\n\nThe fair internal lock in oslo.concurrency uses ReaderWriterLock and\nas a result such lock is broken for threads created with spawn_n.\n\nNote that this issue was raised with eventlet in [3] when the nova team\ndetected it via a direct usage of ReaderWriterLock in the nova test\ncode. As [3] did not lead to a solution in eventlet nova implemented a\nnova local fix for the test code in [4].\n\nHowever now we detected that oslo.concurrency is affected by this issue\nas well.\n\nThis patch adds tests to show the scope of the problem.\n\nNote that the coverage tox target is changed to explicitly enable native\nthreading otherwise it runs eventlet specific tests in a native\nenvironment.\n\n[1] https://github.com/harlowja/fasteners/commit/467ed75ee1e9465ebff8b5edf452770befb93913\n[2] https://github.com/eventlet/eventlet/issues/172\n[3] https://github.com/eventlet/eventlet/issues/731\n[4] https://review.opendev.org/c/openstack/nova/+/813114\n\nRelated-Bug: #1988311\nChange-Id: Ibc193c855b49b95b46ebd2aac82ea89e33f885f0\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/431b56d3831d9301faa09f23934ac784807475b9"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/431b56d3831d9301faa09f23934ac784807475b9"}]},"branch":"refs/heads/master"},"796203c94846d44237d869e3b20a6cd8a3602e36":{"kind":"REWORK","_number":3,"created":"2022-09-05 11:30:12.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/13/855713/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/oslo.concurrency","ref":"refs/changes/13/855713/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/oslo.concurrency refs/changes/13/855713/3"}}},"commit":{"parents":[{"commit":"052b2f23572900601b0f41387dbbb07153d88982","subject":"Merge \"Fix formatting of release list\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/052b2f23572900601b0f41387dbbb07153d88982"}]}],"author":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-03 11:16:56.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2022-09-05 11:27:37.000000000","tz":120},"subject":"Prove that spawn_n with fair lock is broken","message":"Prove that spawn_n with fair lock is broken\n\nThe fasteners lib in version 0.15.0 removed the\nthreading.current_thread workaround for eventlet[1] because eventlet\nseemed to fixed the current_thread issues tracked in [2]. However the\nfix for [2] only fixed half of the problem. The threading.current_thread\ncall works if it is called from thread created by eventlet.spawn.\nHowever if the thread is created with eventlet.spawn_n then\nthreading.current_thread is still broken and returns the ID of the\npython native thread.\n\nThe fasteners\u0027 ReaderWriterLock depends heavily on\nthreading.current_thread to decide which thread holds a lock and to\nallow re-entry of that thread. This leads to the situation that\nmultiple threads created from spawn_n could take the same\nReaderWriterLock at the same time.\n\nThe fair internal lock in oslo.concurrency uses ReaderWriterLock and\nas a result such lock is broken for threads created with spawn_n.\n\nNote that this issue was raised with eventlet in [3] when the nova team\ndetected it via a direct usage of ReaderWriterLock in the nova test\ncode. As [3] did not lead to a solution in eventlet nova implemented a\nnova local fix for the test code in [4].\n\nHowever now we detected that oslo.concurrency is affected by this issue\nas well.\n\nThis patch adds tests to show the scope of the problem.\n\nNote that the coverage tox target is changed to explicitly enable native\nthreading otherwise it runs eventlet specific tests in a native\nenvironment.\n\nAlso note that [5] was opened to reintroduce the workaround[1] in fasteners.\n\n[1] https://github.com/harlowja/fasteners/commit/467ed75ee1e9465ebff8b5edf452770befb93913\n[2] https://github.com/eventlet/eventlet/issues/172\n[3] https://github.com/eventlet/eventlet/issues/731\n[4] https://review.opendev.org/c/openstack/nova/+/813114\n[5] https://github.com/harlowja/fasteners/issues/96\n\nRelated-Bug: #1988311\nChange-Id: Ibc193c855b49b95b46ebd2aac82ea89e33f885f0\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/796203c94846d44237d869e3b20a6cd8a3602e36"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/oslo.concurrency/commit/796203c94846d44237d869e3b20a6cd8a3602e36"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"OK","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"}},{"label":"Workflow","status":"OK","applied_by":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"}},{"label":"Backport-Candidate","status":"MAY"}]}],"submit_requirements":[]}
