From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7534566568157178129==" MIME-Version: 1.0 From: Lorne Li Subject: Re: [SPDK] Report a potential race condition in nvmf target Date: Sat, 28 Sep 2019 02:06:19 +0000 Message-ID: <25fe9f4b.bcb4.16b89b20df8.Coremail.lorneli@163.com> In-Reply-To: FA6C2217B01E9D48A581BB48660210143E1433B1@shsmsx102.ccr.corp.intel.com List-ID: To: spdk@lists.01.org --===============7534566568157178129== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Ziye, Sasha, Thanks for your quick response. I have submitted a patch trying to fix this. https://review.gerrithub.io/= c/spdk/spdk/+/459144 Please correct me if I didn't fix it in the right way. | Lorne Li lorneli(a)163.com | =E7=AD=BE=E5=90=8D=E7=94=B1=E7=BD=91=E6=98=93=E9=82=AE=E7=AE=B1=E5=A4=A7=E5= =B8=88=E5=AE=9A=E5=88=B6 On 6/24/2019 16:22=EF=BC=8CYang, Ziye wrote=EF=BC=9A Hi Lorne, I think that your concern is right. When a subsystem is adding/deleting a n= amespace. The event should be propagated to any active ctrlr built on this = subsystem, and the operation on the ctrlr's operation should be executed on= the thread who creates the ctrlr. Can you submit a patch to address this if you have time? Thanks. Best Regards Ziye Yang -----Original Message----- From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Lorne Li Sent: Monday, June 24, 2019 3:15 PM To: spdk-dev Subject: [SPDK] Report a potential race condition in nvmf target Hi all, I think there may exist a race condition in nvmf target. When adding or removing a namespace, nvmf target using `spdk_nvmf_ctrlr_ns= _changed` to notify its ctrlr that ns has been changed from subsystem's thr= ead('app thread'). But I think func `spdk_nvmf_ctrlr_ns_changed` should be= called in ctrlr's thread, since it touches ctrlr's variables and even tran= sfers out ctrlr's aer_req. Last week, I launched a issue https://github.com/spdk/spdk/issues/837 in gi= thub to describe this race condition in detail and a panic likely caused by= this. It would be great if someone could take a look at it. Thanks in advance. | Lorne Li lorneli(a)163.com | =E7=AD=BE=E5=90=8D=E7=94=B1=E7=BD=91=E6=98=93=E9=82=AE=E7=AE=B1=E5=A4=A7=E5= =B8=88=E5=AE=9A=E5=88=B6 _______________________________________________ SPDK mailing list SPDK(a)lists.01.org https://lists.01.org/mailman/listinfo/spdk _______________________________________________ SPDK mailing list SPDK(a)lists.01.org https://lists.01.org/mailman/listinfo/spdk --===============7534566568157178129==--