Re: protential deadlock problem in daos/src/client/dfuse/il/int_posix.c


Lombardi, Johann
 

Hi Chengfeng,

 

Good catch and thanks for the patch!

 

Cheers,

Johann

 

From: <daos@daos.groups.io> on behalf of "cyeaa@..." <cyeaa@...>
Reply-To: "daos@daos.groups.io" <daos@daos.groups.io>
Date: Wednesday 25 August 2021 at 15:49
To: "daos@daos.groups.io" <daos@daos.groups.io>
Subject: [daos] protential deadlock problem in daos/src/client/dfuse/il/int_posix.c

 

Hi developers,

I am about to report a protential bug, but I couldn't get access to the issue tracker in this site https://daosio.atlassian.net . I just put the description here, and thanks a lot if someone could reply.

The problem here is that the lock ioil_iog.iog_lock will become an unreleased lock if the program return at line 719. Normally this lock will be released at the end of the function, but the code in this branch(line 719) seems forget to release the lock. If this lock is required again in other place, there will be a deadlock problem. 
The link of the code is here https://github.com/daos-stack/daos/blob/1cd2ae176878393051df10c73e6adc62668ec330/src/client/dfuse/il/int_posix.c#L710



I think the fixing of it should be simple, just need to release the lock before the return statement at line 719.

Thanks,
Chengfeng

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Join daos@daos.groups.io to automatically receive all group messages.